2013年7月20日星期六

通过apt-get安装redmine on Ubuntu

http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step

本文主要是通过apt-get安装的redmine,安装过程简单,也非常顺利。
但是版本比较陈旧

apt 安装的 ruby 版本是 1.8.7
apt 安装的 passenger 版本是 2.2
apt 安装的 redmine 版本是 1.3


1、先决条件:安装 
Apache、mod_passenger、MySQL

Prerequisites: Apache, mod-passenger, 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:                                 │   
  │                                                                         │   
  │ _______________________________________________________________________ │   
  │                                                                         │   
  │                                                                     │   
  │                                                                         │   
  └─────────────────────────────────────────────────────────────────────────┘   

  ┌────┤ Configuring mysql-server-5.5 ├──────────┐
  │                                              │
  │ Repeat password for the MySQL "root" user.   │
  │                                              │
  │                                              │
  │ ____________________________________________ │
  │                                              │
  │                                          │
  │                                              │
  └──────────────────────────────────────────────┘

2、安装和配置 Redmine

如果想要安装 Redmine 最新版本,还需要提前安装一个Redmine的PPA,以保证安装到最新版本:
#    sudo apt-get install python-software-properties
#    sudo add-apt-repository ppa:ondrej/redmine
#    sudo apt-get update

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?    │  
 │                                                                           │  
 │                                                                  │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘  
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:                           │  
 │                                                                           │  
 │ ******__________________________________________________________________  │  
 │                                                                           │  
 │                                                               │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘  
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                                    │  
 │                                                                           │  
 │                                                                           │  
 │                                                               │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘  
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.
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:                 │  
 │                                                                           │  
 │ *******__________________________________________________________________ │  
 │                                                                           │  
 │                                                               │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘ 
Now confirm the redmine password.
Package configuration                                                           

   ┌────┤ Configuring redmine ├─────┐                       
   │                                │                       
   │                                │                       
   │ Password confirmation:         │                       
   │                                │                       
   │ *******_______________________ │                       
   │                                │                       
   │                    │                       
   │                                │                       
   └────────────────────────────────┘   

     

3、配置Apache 能够访问 Redmine

     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 here:

  PassengerDefaultUser www-data
  PassengerRoot /usr
  PassengerRuby /usr/bin/ruby

Now create a symlink to connect Redmine into the web document space:
$ sudo ln -s /usr/share/redmine/public /var/www/redmine
And modify /etc/apache2/sites-available/default to insert the following with the other sections so that apache knows to follow the symlink into Rails:

    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on

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.

没有评论:

发表评论