HowTo Install Redmine on Ubuntu step by step

  • HowTo Install Redmine on Ubuntu step by step
    • Prerequisite: check your ubuntu version against intended Redmine version
    • Introduction
    • Prerequisites: Apache,mod-passenger,and MySQL
    • Installing and configuring the Ubuntu Redmine package
    • Configuring Apache
    • Backing up Redmine
  • Additional semi-optional packages
    • Email setup
    • Revision control repository setup

Prerequisite: check your ubuntu version against intended Redmine version

Before using or studying this guide you should check which Redmine version you are going for. Be aware that only latest stable releases will be fully compatible with current releases of plugins.
To check redmine versions versus your ubuntu version have a look at http://www.ubuntuupdates.org/pm/redmine

Generally you Could also consider only installing ruby from ubuntu-repos and then heading for a release of redmine from redmine's download page: http://www.redmine.org/projects/redmine/wiki/Download (this is the more common way of installing redmine on ubuntu). In this case this guide is not suited for you and you should check for an alternate guide. Google provides lots of resources for this alternate installation procedure.

If you are sure that you want to install from ubuntu-repositories,keep on reading:

Introduction

This tutorial walks you step-by-step through installing Redmine on a clean/fresh Ubuntu 12.04 installation. This is intended to be a complete cookbook method for getting Redmine installed and running. It makes no assumptions about other things being installed or configured. Since I have had some issues when using the graphical package managers,we will be doing this from the command line prompt to keep things as clear and clean as possible.

I recommend that you install any Ubuntu updates prior to beginning this process. There are almost always some waiting to be applied after Ubuntu is first set up.

Prerequisites: Apache,and MysqL

There are several support packages that we will install first. The apache installation is pretty simple if you just follow the prompts and accept the defaults.

$ sudo apt-get install apache2 libapache2-mod-passenger

Installing MysqL takes just a little more,so the details are spelled out.

$ sudo apt-get install MysqL-server MysqL-client 

The installation process for MysqL is going to prompt you for a password for the "root" access for the database server,then ask you to confirm the password in a follow-up screen. This sets the database adminstration password.

Package configuration                                                           

  ┌────────────────────┤ Configuring MysqL-server-5.5 ├─────────────────────┐   
  │ While not mandatory,it is highly recommended that you set a password   │   
  │ for the MysqL administrative "root" user.                               │   
  │                                                                         │   
  │ If this field is left blank,the password will not be changed.          │   
  │                                                                         │   
  │ New password for the MysqL "root" user:                                 │   
  │                                                                         │   
  │ _______________________________________________________________________ │   
  │                                                                         │   
  │                                 <Ok>                                    │   
  │                                                                         │   
  └─────────────────────────────────────────────────────────────────────────┘   

  ┌────┤ Configuring MysqL-server-5.5 ├──────────┐
  │                                              │
  │ Repeat password for the MysqL "root" user.   │
  │                                              │
  │                                              │
  │ ____________________________________________ │
  │                                              │
  │                   <Ok>                       │
  │                                              │
  └──────────────────────────────────────────────┘

Installing and configuring the Ubuntu Redmine package

Now it is time to install redmine itself.

$ sudo apt-get install redmine redmine-MysqL

You want to allow dbconfig-common to configure the database when prompted so select Yes from the prompt in the panel below.

Package configuration                                                           

 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
 │                                                                           │  
 │ The redmine/instances/default package must have a database installed and  │  
 │ configured before it can be used.  This can be optionally handled with    │  
 │ dbconfig-common.                                                          │  
 │                                                                           │  
 │ If you are an advanced database administrator and kNow that you want to   │  
 │ perform this configuration manually,or if your database has already      │  
 │ been installed and configured,you should refuse this option.  Details    │  
 │ on what needs to be done should most likely be provided in                │  
 │ /usr/share/doc/redmine/instances/default.                                 │  
 │                                                                           │  
 │ Otherwise,you should probably choose this option.                        │  
 │                                                                           │  
 │ Configure database for redmine/instances/default with dbconfig-common?    │  
 │                                                                           │  
 │                    <Yes>                       <No>                       │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘  

Then you want to provide the "root" password for the database,so that the installer can create the redmine database. This is the password set when you installed MysqL.

Package configuration                                                           

 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
 │ Please provide the password for hte administrative account with which     │  
 │ this package should create its MysqL database and user.                   │  
 │                                                                           │  
 │ Password of the database's administrative user:                           │  
 │                                                                           │  
 │ ******__________________________________________________________________  │  
 │                                                                           │  
 │                   <Ok>                       <Cancel>                     │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘  

Tell the redmine installer we are using MysqL for this installation by highlighting "MysqL" from the list of database choices:

Package configuration                                                           

 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
 │ The redmine/instances/default package can be configured to use one of     │  
 │ several database types. Below,you will be presented with the available   │  
 │ choices.                                                                  │  
 │                                                                           │  
 │ Database type to be used by redmine/instances/default:                    │  
 │                                                                           │  
 │                                  sqlite3                                  │  
 │                                  pgsql                                    │  
 │                                  MysqL                                    │  
 │                                                                           │  
 │                                                                           │  
 │                    <Ok>                        <Cancel>                   │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘  

Now you are asked to provide a password that will be used to protect the redmine database. Redmine itself will use this when it wants to access MysqL.如123456

Package configuration                                                           

 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
 │ Please provide a password for redmine/instances/default to register with  │  
 │ the database server.  If left blank,a random password will be            │  
 │ generated.                                                                │  
 │                                                                           │  
 │ MysqL application password for redmine/instances/default:                 │  
 │                                                                           │  
 │ *******__________________________________________________________________ │  
 │                                                                           │  
 │                    <Ok>                        <Cancel>                   │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘ 

Now confirm the redmine password.

Package configuration                                                           

   ┌────┤ Configuring redmine ├─────┐                       
   │                                │                       
   │                                │                       
   │ Password confirmation:         │                       
   │                                │                       
   │ *******_______________________ │                       
   │                                │                       
   │     <Ok>         <Cancel>      │                       
   │                                │                       
   └────────────────────────────────┘   

Ensure the bundler gem is installed

$ sudo gem update
$ sudo gem install bundler

Configuring Apache

You need to modify two files for apache. The first is /etc/apache2/mods-available/passenger.conf which needs the text PassengerDefaultUser www-data added as seen below. Do not try to replace whole file content!

<IfModule mod_passenger.c>
  PassengerDefaultUser www-data
  PassengerRoot /usr
  PassengerRuby /usr/bin/ruby
</IfModule>

Now create a symlink to connect Redmine into the web document space:

$ sudo ln -s /usr/share/redmine/public /var/www/html/redmine

And modify /etc/apache2/sites-available/000-default.conf (before apache 2.4 /etc/apache2/sites-available/default) to insert the following with the other <Directory> sections so that apache kNows to follow the symlink into Rails:

<Directory /var/www/html/redmine>
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on
</Directory>

Create and set the ownership of a Gemfile.lock file so that apache's www-data user can access it:

$ sudo touch /usr/share/redmine/Gemfile.lock
$ sudo chown www-data:www-data /usr/share/redmine/Gemfile.lock

Now restart apache:

$ sudo service apache2 restart

You should Now be able to access redmine from the local host

$ firefox http://127.0.0.1/redmine

In the upper right corner of the browser window you should see the "Sign in" link. Click that and enter "admin" at both the Login: and Password: prompts. Note: this is not the password you set during the installation process. Click the Login button.

I recommend that the next thing you do is to click on My account in the upper right corner and change that password. In the page that is displayed there should be a Change password link in the upper right of the white area of the page. Click to change the password.

backing up Redmine

You should arrange a regular backup of the Redmine database and the files that users upload/attach. The database can be dumped to a text file with:

/usr/bin/MysqLdump -u root -p<password> redmine_default | gzip > /path/to/backups/redmine_db_`date +%y_%m_%d`.gz
where <password> is the one you set when installing MysqL.

The attachments are stashed in /var/lib/redmine/default/files and can be backed up with something like:

rsync -a /var/lib/redmine/default/files /path/to/backups/files

You can have these commands run automatically by creating a script called /etc/cron.daily/redmine that contains:

#!/bin/sh
/usr/bin/MysqLdump -u root -p<password> redmine_default | gzip > /path/to/backups/redmine_db_`date +%y_%m_%d`.gz
rsync -a /var/lib/redmine/default/files /path/to/backups/files

Again,be sure to substitute the MysqL root password for <password> in the MysqLdump command line. The file should be protected so that only root has read permission because you are storing the root password for your MysqL installation in this file. That the first line creates a new file every time the script is run. This can eventually create a large number of backups of your database files. You should have a script that purges old ones periodically.

Additional semi-optional packages

There are some services that Redmine can use that are not absolutely necessary,but are useful. These are email and software repository/revision control systems.

Email setup

At some point you will probably want Redmine to be able to send email. For this you will need to install and configure email. This can be achieved by installing the postfix package. I do not recommend the exim4 package,as there have been some incompatibilities in the way the "sendmail" command line is handled between Redmine and exim4. Unless everyone has an email account on the redmine server you will want to set up external email as a full internet host. Once email service is installed,you will have to restart apache for Redmine to kNow that it has access to email services.

$ sudo apt-get install postfix

Now that you can send email,you have to tell Redmine about it. You need to create/edit the file /etc/redmine/default/configuration.yml and add the following lines:

production:
  email_delivery:
    delivery_method: :sendmail

Then restart apache so that Redmine reloads the configuration file:

$ sudo service apache2 restart

Revision control repository setup

In order to have your software repository on the system Redmine will need the corresponding software installed.

$ sudo apt-get install git subversion cvs mercurial
$ sudo service apache2 restart

That covers it as far as I have gotten in my use of Redmine to date.


开启邮箱发送功能

打开配置文件

sudo vi /etc/redmin/default/configure.yml


配置如下

default:
 # Outgoing emails configuration (see examples above)
 email_delivery:
 delivery_method: :smtp
 smtp_settings:
 address: smtp.163.com
 port: 25
 domain: 163.com
 authentication: :login
 user_name: "zbcat_cyj@163.com"
 password: "密码"
用管理员登录后台,点击管理,->配置->邮件通知,发件人填写配置中的邮箱,其它随情况而定,


注意,在选者发送模式时,最好不要选'使用密件抄送 (bcc)',勾选了这个选项,有可能会导致发送测试邮件成功,而其它情况(如建立新问题时)会发送邮件失败的情况(我就遇到过,找了半天)


参考:

1、Postfix 基本设置指南

2、Ubuntu之邮件服务器

3、Ubuntu 16.04 布置postfix、dovecot邮件服务器

4、快速安装配置邮件服务器(详解 Postfix + Dovecot)



转自:http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_ste

HowTo Install Redmine on Ubuntu step by step的更多相关文章

  1. LoadError:无法加载这样的文件--redmine_favorite_parojects

    当我尝试安装redminefavorite插件时,它返回了以下错误。

  2. 在Ubuntu上安装Redmine ……现在怎样?

    我一直在虚拟机中修补/测试UbuntuServer10.04BetaLAMP堆栈,现在我来到Redmine安装.我发现了一个包,并发布:哪个(我认为差不多)有效,但我不知道如何测试它,甚至不知道它是否配置好了.我该如何测试?我正在使用10.04服务器,所以我没有本地GUI.不幸的是,redmineUbuntu软件包需要一些手动配置才能开始使用.现在安装了redmine,您仍然必须通过真实的Web服

  3. HowTo Install Redmine on Ubuntu step by step

    HowToInstallRedmineonUbuntustepbystepHowToInstallRedmineonUbuntustepbystepPrerequisite:checkyourubuntuversionagainstintendedRedmineversionIntroductionPrerequisites:Apache,mod-passenger,andMySQLInstall

  4. CentOS 7下基于bitnami的Redmine结合Subversion的设置

    不允许匿名用户访问:anon-access=noneanon-access=none#认证用户的权限,可以为read,write和none,默认值write。

  5. CentOS 7 下基于基 bitnami 安装部署 redmine

    系统更新:yum-yupdate模块要求:yuminstall-yperl-Module-Install.noarch1、下载BitnamiRedmine3.4.5.0并上传到服务网页地址:https://bitnami.com/stack/redmine/installer下载地址:https://bitnami.com/redirect/to/187911/bitnami-redmine-3.

  6. CentOS上安装Redmine-3.4项目管理软件

    以上表示执行成功,然后加载一下rvm命令。查看rvm库中已知的ruby版本5.安装Ruby6.如果gem的源所在的网络不好,可以更改源如果你使用Gemfile和Bundler你可以用Bundler的Gem源代码镜像命令。这样你不用改你的Gemfile的source。

  7. redmine 安装过程详解 问题管理系统

    第一步安装rubyaptyum第二步RubyGems安装第三步Rake安装第四步Rails安装第五步Redmine安装这里需要注意了,因为安装过程中会出现多个错误,下面详细叙述解决。Redmine官网下载下载安装更改数据库配置文件database.yml执行bundleinstall解决以上错误问题注意:六,七,八步需要在redmine/conf目录下执行第六步创建数据库redmine_development第七步创建表注意:此时数据库编码不是utf8,将不能录入中文,需要将所有的表改为utf8编码。

  8. Redmine出现500 Internal error错误

    上次部署完Redmine,登陆后,进入个人页面或设置中,就会提示500Internalerror错误:但首页等地方,却没有问题,翻阅资料查出可能是language的问题定位到这段代码替换成最后重启下httpd再次访问网页,错误消失。

  9. Redmine部署安装手记

    工作上杂事多,不能很好的汇报上级,所以想部署个项目管理规范规范。综合考虑后选择了很是折腾的Redmine,服务器上开了个虚拟机,装了Centos7minimal,参考Redmine官方文档开始部署。

  10. Ubuntu使用docker安装redmine

    2dockerpullMysqL:5.7dockerpullredmine:3.2安装成功之后,执行dockerimages,可以看到两个镜像的描述,类似如下:34#dockerimagesREPOSITORYTAGIMAGEIDCREATEDVIRTUALSIZEMysqL5.7b73014bcbc5b7hoursago400.2MBredmine3.26e320462770211hoursago636.1MB3docker启动MysqL这里为物理机和虚拟机的3306端口做了端口映射,以让外部用户可以通

随机推荐

  1. crontab发送一个月份的电子邮件

    ubuntu14.04邮件服务器:Postfixroot收到来自crontab的十几封电子邮件.这些邮件包含PHP警告.>我已经解决了这些警告的原因.>我已修复每个cronjobs不发送电子邮件(输出发送到>/dev/null2>&1)>我删除了之前的所有电子邮件/var/mail/root/var/spool/mail/root但我仍然每小时收到十几封电子邮件.这些电子邮件来自cronjobs,

  2. 模拟两个ubuntu服务器计算机之间的慢速连接

    我想模拟以下场景:假设我有4台ubuntu服务器机器A,B,C和D.我想在机器A和机器C之间减少20%的网络带宽,在A和B之间减少10%.使用网络模拟/限制工具来做到这一点?

  3. ubuntu-12.04 – 如何在ubuntu 12.04中卸载从源安装的redis?

    我从源代码在Ubuntu12.04上安装了redis-server.但在某些时候它无法完全安装,最后一次makeinstallcmd失败.然后我刚刚通过apt包安装.现在我很困惑哪个安装正在运行哪个conf文件?实际上我想卸载/删除通过源安装的所有内容,只是想安装一个包.转到源代码树并尝试以下命令:如果这不起作用,您可以列出软件自行安装所需的步骤:

  4. ubuntu – “apt-get source”无法找到包但“apt-get install”和“apt-get cache”可以找到它

    我正在尝试下载软件包的源代码,但是当我运行时它无法找到.但是当我运行apt-cache搜索squid3时,它会找到它.它也适用于apt-getinstallsquid3.我使用的是Ubuntu11.04服务器,这是我的/etc/apt/sources.list我已经多次更新了.我尝试了很多不同的debs,并没有发现任何其他地方的错误.这里的问题是你的二进制包(deb)与你的源包(deb-src)不

  5. ubuntu – 有没有办法检测nginx何时完成正常关闭?

    &&touchrestarted),因为即使Nginx没有完成其关闭,touch命令也会立即执行.有没有好办法呢?这样的事情怎么样?因此,pgrep将查找任何Nginx进程,而while循环将让它坐在那里直到它们全部消失.你可以改变一些有用的东西,比如睡1;/etc/init.d/Nginx停止,以便它会休眠一秒钟,然后尝试使用init.d脚本停止Nginx.你也可以在某处放置一个计数器,这样你就可以在需要太长时间时发出轰击信号.

  6. ubuntu – 如何将所有外发电子邮件从postfix重定向到单个地址进行测试

    我正在为基于Web的应用程序设置测试服务器,该应用程序发送一些电子邮件通知.有时候测试是使用真实的客户数据进行的,因此我需要保证服务器在我们测试时无法向真实客户发送电子邮件.我想要的是配置postfix,以便它接收任何外发电子邮件并将其重定向到一个电子邮件地址,而不是传递到真正的目的地.我正在运行ubuntu服务器9.10.先感谢您设置本地用户以接收所有被困邮件:你需要在main.cf中添加:然后

  7. ubuntu – vagrant无法连接到虚拟框

    当我使用基本的Vagrantfile,只配置了两条线:我看到我的虚拟框打开,但是我的流氓日志多次显示此行直到超时:然后,超时后的一段时间,虚拟框框终于要求我登录,但是太久了!所以我用流氓/流氓记录.然后在我的物理机器上,如果我“流氓ssh”.没有事情发生,直到:怎么了?

  8. ubuntu – Nginx – 转发HTTP AUTH – 用户?

    我和Nginx和Jenkins有些麻烦.我尝试使用Nginx作为Jenkins实例的反向代理,使用HTTP基本身份验证.它到目前为止工作,但我不知道如何传递带有AUTH用户名的标头?}尝试将此指令添加到您的位置块

  9. Debian / Ubuntu – 删除后如何恢复/ var / cache / apt结构?

    我在ubuntu服务器上的空间不足,所以我做了这个命令以节省空间但是现在在尝试使用apt时,我会收到以下错误:等等显然我删除了一些目录结构.有没有办法做apt-getrebuild-var-tree或类似的?

  10. 检查ubuntu上安装的rubygems版本?

    如何查看我的ubuntu盒子上安装的rubygems版本?只是一个想法,列出已安装的软件包和grep为ruby或宝石或其他:)dpkg–get-selections

返回
顶部