Sie sind auf Seite 1von 6

Redmine Installation on Virtual Ubuntu We will install Redmine Project Management System on virtual operation system (Ubuntu) in top

down approach. If you follow all instructions correctly you will be installed your Redmine server successfully almost an hour. Installing VirtualBox: 1. Download last version of Sun VirtualBox(version 3.0.10 or newer) tool in your system. 2. Install to your system by following the instructions. Installing Ubuntu on VirtualBox: 1. Download last version of Ubuntu(version 9.10 or newer) OS in your system. 2. After installed VirtualBox on your system you will create a new virtual operating which will be Linux type and Ubuntu subtype. If you don't know anything about VirtualBox and/or its usage please refer to the google. 3. While installing Ubuntu you should type the related configurations as follows: (These all configurations are optional, you can give any name what you what.) Q: What is your name? A: Redmine Server Q: What name do you want to use to login? A: redmine Q: Choose to password to keep your account safe? A: redmine Q: What is the name of this computer? A: redmine-server Choose Log in automatically. radio button. 4. When you finished up installation all of them open up your new VirtualBox Ubuntu OS and open up terminal(console) screen and issuing these commands: > sudo apt-get update > sudo apt-get upgrade Configuring VirtualBox: 1. If you want to reach your VirtualBox Ubuntu OS from different machine, you have to configure VirtualBox Ubuntu OS's network setting to Bridged Adapter. So you can reach your VirtualBox Ubuntu from internal IP address easily. Because it get's same IP block as you from DHCP easily. I mean your guest and host computer is same IP block as different network client. 2. If you had assigned a static IP to your Network Consult by giving your static ethernet MAC address, you have to assign unique MAC address your VirtualBox Ubuntu OS by Setting>Network->MAC address initialization box. By this MAC address, you can get static ip easily or you can configure your Ubuntu system to not use DHCP, instead of that you can assign static IP manually. Requirements for Installing Redmine: Ruby on Rails 2.0.2 MySQL 4 or higher

Optional: SVN binaries (>= 1.3), for repository browsing (must be available in your PATH) Package Installation and Setup: 1. Once youve installed the VirtualBox Ubuntu OS and updated it, you need to install a bunch of packages that we will prepare the server for the Redmine installation. So, as root, install the following packages by issuing: > sudo apt-get install build-essential > sudo apt-get install ssh openssh-server mysql-server phpmyadmin rails rubygems mongrel ruby1.8-dev The packages were installing above are MySQL, phpMyAdmin, Rails, Ruby Gems, Mongrel and Ruby Dev environment. During the installation of the packages, when MySQL is installed, it will prompt you to create a password. Make sure you remember it. You will need it later to log in to the phpMyAdmin. To make simplicity you can set all passwords to redmine. 2. Create a new directory for Redmine. I put mine in /opt/redmine. And download last version of Redmine in it with wget command line downloader and extract it by issuing: > sudo mkdir /opt/redmine > sudo cd /opt/redmine > sudo wget http://rubyforge.org/frs/download.php/66633/redmine0.8.6.tar.gz > tar -xvf redmine-0.8.6.tar.gz Database Setup: 1. Now its time to create an empty database for Redmine. As you may have noticed, we installed phpMyAdmin earlier. phpMyAdmin will come in handy now. Head over to http://localhost/phpmyadmin You should be presented with the phpMyAdmin login screen. Type in root and the MySQL password you created when installing MySQL. 2. First, click on Databases Then, at the bottom of the screen, in the Create new database text box create a new database called redmine and set Collation to utf8_general_ci. 3. Now, go back to the home screen and click on: Privileges Add a new User Fill out the Login Information boxes. Call your user redmine. Make sure you remember password you create here. It will be used when you set up the database connection details in Redmine. In the Database for user section, check Create database with same name and grant all privileges and click on the Go button. 4. Log out of phpMyAdmin. Redmine Database Connection Configuration: 1. Its time to configure the database connection. If you installed Redmine as I did above, then

copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for production environment. Youll find the database.yml.example issuing: > sudo cd /opt/redmine/redmine-0.8.6/config 2. So now, assuming youre in the /opt/redmine/redmine-0.8.6/config directory, issue: > sudo cp database.yml.example database.yml 3. Then, open the database.yml file, issue: > sudo gedit database.yml and edit it as in the example for a MySQL database below: production: adapter: mysql socket: /var/run/mysqld/mysqld.sock database: redmine host: localhost username: redmine password: [password] Then save database.yml file and exit to the command prompt. On Ubuntu the mysql.sock is located in /var/run/mysqld/mysqld.sock, as noted in the config above. (The standard Redmine installation assumes the socket is located in /opt/redmine/redmine-0.8.6/tmp/mysqld.sock.) 4. Create the database structure, by running the following command under the application root directory(I mean /opt/redmine/redmine-0.8.6): > sudo rake db:migrate RAILS_ENV="production" It will create the necessary tables in the redmine database you created earlier and an administrator account. 5. Insert default configuration data in database, by issuing: > sudo rake redmine:load_default_data RAILS_ENV="production" (This step is optional but highly recommended, as you can define your own configuration from scratch. It will load default roles, trackers, statuses, work flows and enumerations. While loading default data command prompt wants to given language selection by you.) Setting up Permissions: 1. The user who runs Redmine must have write permission on the following sub directories: files, log, tmp (create the last one if not present). You probably already have a tmp directory in /opt/redmine/redmine-0.8.6, but if you dont, create one now by issuing: > sudo mkdir /opt/redmine/redmine-0.8.6 2. If you havent created a Redmine user, do it now by issuing: > sudo useradd redmine 3. Now, assuming you run Redmine with a redmine user, from your /opt/redmine/redmine0.8.6 directory issue: > sudo chown -R redmine:redmine files log tmp

> sudo chmod -R 755 files log tmp

Testing the Installation: 1. It should all be working now. Test the installation by running the WEBrick web server issue: > sudo cd /opt/redmine/redmine-0.8.6 > sudo ruby script/server -e production Once WEBrick has started, point your browser to http://localhost:3000/. Or, if you are using a browser on another computer than what you installed Redmine on, point your browser to http://192.168.1.10:3000/ (if thats the IP address you gave your Redmine server). You should now see the application welcome page. Log in: 1. Use default administrator account to log in: Login : admin Password : admin 2. You can go to Admin & Settings to modify application settings. Setting Up Static IP: 1. A more easy method for configuring a static IP address is to use your local DHCP server to assign a permanent IP to the VirtualBox OS mac address. That way you will not have to do anything inside VBS. Consult your network administrator. 2. Or you should learn configuration parameters as given below, and can configure your system to get static IP address: The desired IP address Network mask and broadcast address Gateway address Your local DNS server address(es) Assigning Host Name and Domain for VirtualBox OS: 1. A more easy method for adding your IP address - Host name pair configurations to your DNS server . Consult your network administrator. Sendmail Server Configuration: 1. Before configure the email support of Redmine, we should download sendmail application for Ubuntu, issue: > sudo apt-get install sendmail > sudo sendmailconfig (Answer Yes to all questions which will be asked you) 2. Its time to configure the server connection. Copy config/email.yml.example to config/email.yml and edit this file in order to configure your database settings for production environment. Youll find the email.yml.example issue: > sudo cd /opt/redmine/redmine-0.8.6/config

3. So now, assuming youre in the /config directory, issue: > sudo cp email.yml.example email.yml 4. Then, open the email.yml file, issue: > sudo gedit email.yml and edit it as in the example for sendmail configuration below: production: delivery_method: :sendmail sendmail_settings: location: /usr/sbin/sendmail arguments: -i -t address: smtp.example.net port: 25 domain: example.net authentication: :none user_name: redmine@example.net password: redmine Then save email.yml file and exit to the command prompt. 5. Its time to configure the environmet.rb configuration. Open up the environment.rb and change config.action_mailer.perform_deliveries = false to config.action_mailer.perform_deliveries = true then save and close the environment.rb. Subversion Installation and Configuration: 1. Before configure the subversion support of Redmine, we should download subversion application for Ubuntu, issue: > sudo apt-get install subversion 2. If your Redmine can't find the subversion command you can help to find by issuing: > sudo cd /opt/redmine/redmine-0.8.6/config > sudo gedit environment.rb Add ENV['PATH'] = "#{ENV['PATH']}:/subversion/path" line in it. Save and close the environment.rb Start Application Boot Time: 1. To automatically start the application on booting your server you need to modify your crontab, issue: > export EDITOR=gedit > crontab -e 2. Your crontab file will be presented. This is the list of programs that start at certain times or at boot. Add the following to the crontab (all on one line): @reboot cd /opt/redmine/redmine-0.8.6 ; rm -f log/mongrel.pid ; mongrel_rails start -e production -p 3000 -d Backup:

1. Running backups is always a good idea. Redmine backups should include: data (stored in your redmine database) /usr/bin/mysqldump -u -p | gzip > /path/to/redmine/backup/db/redmine_`date +%y_%m_%d`.gz attachments (stored in the files directory of your Redmine install) rsync -a /path/to/redmine/files /path/to/redmine/backup/files 2. Or you can use bash shell to automate kind of this operation issue: > sudo cd /opt/redmine/redmine-0.8.6 > sudo mkdir backup > sudo mkdir backup/db > sudo mkdir backup/files > sudo gedit backup/runRedmineBackup.bash And after opened gedit with runRedmineBackup.bash write all commands below: #!/bin/bash data=`date -I` mysqldump --user=root --password="redmine" --all-databases | gzip > db/backup-$data.sql.gz cd db ftp -i -n << EOF open ftpserver.example.net user username password bin mput backup-$data.sql.gz bye EOF Then save runRedmineBackup.bash file and exit to the command prompt. After creation of runRedmineBackup.bash you can add this bash to run continually between specified periods. Issue: > export EDITOR=gedit > crontab -e Add 0 0 * * 0 cd /opt/redmine/redmine-0.8.6/backup ; sh runRedmineBackup.bash commands to crontab to backup database weekly.

To work this bush without any permission problem you have to change all of them modes to maxium permission issue: > sudo chmod -R 777 backup > sudo chown -R redmine:redmine backup

That's all. Now we completely installed Redmine our virtual Ubuntu OS and can reach from any machine at our network easily. Congratulations..!

mit Uzun 06/11/2009

Das könnte Ihnen auch gefallen