Install Redmine 10.04 and Apache2 in Ubuntu 2.0

Source: Internet
Author: User
Tags redmine


Ubuntu 10.04 installs Redmine 2.0 and Apache2 with zero integration configuration. Note 1. Use Ruby 1.9 + Redmine 2.0. Some plug-ins may encounter problems during installation, for example: a. Scrum plug-in scrum-pm (redmine_sprints) [html] Error message: no such file to load -- dispatcher Exception class: LoadError Application root: /usr/share/redmine third-party library reference problems may be caused by changes in Ruby 1.9 compared with earlier versions. Scrum-pm officially does not indicate support for Ruby 1.9, and scrum-pm officially stops support. 2. Currently, we recommend that you use lower Ruby (1.8) and earlier versions of Redmine (1.4) www.2cto.com I. installation environment 1. Operating System root @ cloudsoft :~ # Lsb_release-aNo LSB modules are available. distributor ID: UbuntuDescription: Ubuntu 10.04.1 LTSRelease: 10.04 Codename: lucid 2. MySql (sudo apt-get install mysql-server libmysqlclient-dev): root @ cloudsoft :~ # Mysql -- versionmysql Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (i686) using readline 6.2 3. Apache2root @ cloudsoft :~ # Apache2-v Server version: Apache/2.2.17 (Ubuntu) Server built: Feb 22 2011 18:34:09 II. Install ruby 1.9 (including gem) 1. Install the dependency package: root @ cloudsoft :~ # Sudo apt-get install gcc g ++ build-essential libssl-dev libreadline-dev zlib1g-dev linux-headers-generic libyaml-dev 2. download the latest stable version of ruby 1.9 root @ cloudsoft: ~ # Wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.9-stable.tar.gzroot@cloudsoft :~ # Tar-zxf./ruby-1.9-stable.tar.gz www.2cto.com 3, compile the ruby source code root @ cloudsoft :~ # D ruby-1.9.3-p194/root @ cloudsoft :~ /Ruby-1.9.3-p194 #./configure -- prefix =/usr/local/rubyroot @ cloudsoft :~ /Ruby-1.9.3-p194 # make & sudo make install 4, ruby environment variable settings # PATH settings root @ cloudsoft :~ /Ruby-1.9.3-p194 # sudo vi/etc/environment # Add/usr/local/ruby/bin: [plain] PATH = "/usr/local/sbin: /usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/ruby/bin "root @ cloudsoft :~ /Ruby-1.9.3-p194 # source/etc/environment # Check PATH settings root @ cloudsoft :~ /Ruby-1.9.3-p194 # ruby-vruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux] root @ cloudsoft :~ /Ruby-1.9.3-p194 # gem-v1.8.23 # modify GEM_HOMEroot @ cloudsoft :~ /Ruby-1.9.3-p194 # sudo vim/etc/profile #/etc/profile to add: [plain] export GEM_HOME =/usr/local/ruby/lib/ruby/gems/1.9.1/export RUBYOPT = rubygems root @ cloudsoft :~ /Ruby-1.9.3-p194 # source/etc/profile # modify the gem source (You know) root @ cloudsoft :~ # Gem source *** current sources *** www.2cto.com http://rubygems.org/root @ cloudsoft :~ # Gem source -- clear-all *** Removed specs cache *** root @ cloudsoft :~ # Gem source -- add http://ruby.taobao.org/http://ruby.taobao.org/ added to sources 5. Install bundlerroot @ cloudsoft :~ # Gem install bundlerroot @ cloudsoft :~ # Ln-s/usr/local/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/bin/bundle/usr/local/ruby/bin/bundle 3. Install redmine 2.0.31. Download redmineroot @ cloudsoft: ~ # Git clone https://github.com/redmine/redmine.gitroot@cloudsoft :~ # Mv-f./redmine // usr/share/redmineroot @ cloudsoft :~ # Cd/usr/share/redmine/root @ cloudsoft:/usr/share/redmine # rm-Rf. /. git 2. Modify Gemfileroot @ cloudsoft:/usr/share/redmine # vim. /Gemfile # Change source to http://ruby.taobao.org/(We All Know) [plain] source 'HTTP: // ruby.taobao.org/'www.2cto.com # If mysql is used, comment out [plain] # Database gems # platforms: mri,: mingw do # group: postgresql do # gem "pg", "> = 0.11.0" # end 3. Install the redmine dependency package # possible errors (there may be many errors. Please solve them slowly. Typical examples): A, An error occured while installing mysql2 (0.3.11), and Bundler cannot continue. # Install libmysqlclient-devroot @ cloudsoft :~ # Sudo apt-get install libmysqlclient-dev B, An error occured while installing pg (0.14.0), and Bundler cannot continue. # mysql can be used to delete pg from Gemfile or install postgresql. I choose not to install pg C, An error occured while installing rmagick (2.13.1), and Bundler cannot continue. # Install imagemagickroot @ cloudsoft :~ # Sudo apt-get install imagemagick 3. database creation and configuration (myql) root @ cloudsoft:/usr/share/redmine # mysql-p [SQL] create database redmine character set utf8; create user 'redmine '@ 'localhost' identified by 'my _ password'; grant all privileges on redmine. * to 'redmine '@ 'localhost'; www.2cto.com root @ cloudsoft:/usr/share/redmine # cp config/database. yml. example config/database. ymlroot @ cloudsoft:/usr/share/redmine # v Im config/database. yml [plain] production: adapter: mysql2 # ruby1.9 use mysql2 database: redmine host: localhost username: redmine password: my_password root @ cloudsoft: /usr/share/redmine # rake generate_secret_token # create a database root @ cloudsoft:/usr/share/redmine # RAILS_ENV = production rake db: migrateroot @ cloudsoft: /usr/share/redmine # RAILS_ENV = production rake redmine: load_default_data 4. Modify user permissions root @ cloudsoft:/us R/share/redmine # mkdir tmp public/plugin_assets # To use apache2, set the redmine running user to www-dataroot @ cloudsoft: /usr/share/redmine # sudo chown-R www-data: www-data files log tmp public/plugin_assetsroot @ cloudsoft: /usr/share/redmine # sudo chmod-R 755 files log tmp public/plugin_assets 5. Test Run root @ cloudsoft: /usr/share/redmine # ruby script/rails server webrick-e production # browser access: http: // 192.168.1.203: 3000/confirm whether the server is normal Regular Operation 4. Apache integration using webrick to run redmine is extremely slow, so Apache is used. 1. install Apache passenger module root @ cloudsoft :~ # Gem install passengerroot @ cloudsoft :~ # Passenger-install-apache2-module # follow the prompts to check the installation of the required dependency package, if there is a package that has not been installed, follow the prompts to install it # Install it will remind us how to configure Apache, for more information, see www.2cto.com 2. Modify the Apache Mode configuration root @ cloudsoft :~ # Vim/etc/apache2/mod-enabled/pasabled. conf [plain] <IfModule mod_passenger.c> PassengerRoot/usr/local/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.15/PassengerRuby/usr/local/ruby/bin/ ruby passengerdefauser user www-data </IfModule> root @ cloudsoft: ~ # Vim/etc/apache2/mod-enabled/pasabled. load [plain] LoadModule passenger_module/usr/local/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.15/ext/apache2/mod_passenger.so 3. Configure Apache VM # In create a symbolic link root @ cloudsoft in the Apache Virtual Host directory: ~ # Ln-s/usr/share/redmine_2/public/var/www/redmine # modify the VM configuration file root @ cloudsoft :~ # Vim/etc/apache2/sites-enabled/000-default [plain] <VirtualHost *: 80> ServerAdmin simba@cloudsofts.com DocumentRoot/var/www # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. logLevel warn CustomLog/var/log/apache2/access. log combined ErrorLog/var/log/apache2/error. log # other configurations foo... <Directory/var/www/redmine> Options + ExecCGI-MultiViews AllowOverride all Rails BaseURI/redmine PassengerResolveSymlinksInDocumentRoot on </Directory> </VirtualHost> www.2cto.com 4. Restart Apacheroot @ cloudsoft :~ #/Etc/init. d/apache2 reload 5, ENDenjoy 6, reference: http://www.redmine.org/projects/redmine/wiki/RedmineInstallhttp://blog.csdn.net/berryreload/article/details/7179969http://linuxiou.blog.51cto.com/1262466/867790http://stackoverflow.com/questions/11439207/rails-error-installing-pg-gemhttp://clark1231.iteye.com/blog/1504019 author yuleslie

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.