Ubuntu10.04 install the integrated configuration of Redmine2.0 and Apache2

Source: Internet
Author: User
Tags redmine
Ubuntu 10.04 install Redmine2.0 and Apache2 integrated configuration zero, note 1, use Ruby1.9 + Redmine2.0, some plug-ins may encounter problems during installation, such as: A, Scrum plug-in scrum-pm (redmine_sprints) [html] Errormessage: nosuc...
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 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. solve them slowly. The following are 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 # vim 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:/usr/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/ Check whether it works properly. 4. Apache integration is extremely slow to run redmine with webrick, 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/passenger. conf [plain] PassengerRoot/usr/local/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.15/PassengerRuby/usr/local/ruby/bin/ruby passengerdefauser www-data 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] 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... Options + ExecCGI-MultiViews AllowOverride all RailsBaseURI/redmine PassengerResolveSymlinksInDocumentRoot on 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.