歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RedHat Liunx 9 下面Redmin的安裝手冊

RedHat Liunx 9 下面Redmin的安裝手冊

日期:2017/2/28 15:59:21   编辑:Linux教程

1、Ruby安裝

Ruby on Rails網站推薦使用1.8.7版。 # wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz # tar zxvf ruby-1.8.7-p174.tar.gz # cd ruby-1.8.7-p174 # ./configure --prefix=/usr/local/ruby # make && make install 設置Ruby環境變量 # cd ~ # vi .bash_profile 添加下面一行 export PATH=$PATH:/usr/local/ruby/bin 保存退出:wq # . .bash_profile (注意:如果make不成功,可能是紅帽子沒有安裝GCC腳本庫) 2、RubyGems安裝 # wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz # tar zxvf rubygems-1.3.5.tgz # cd rubygems-1.3.5 # ruby setup.rb

3、Rake安裝

# gem install rake //直接使用gem命令安裝rake. //也可以下載安裝地址:http://rubyforge.org/frs/download.php/56872/rake-0.8.7.tgz

4、Ruby on Rails

# gem install rails (注意:如果安裝不成功,可能是RubyGems版本太低,可以用gem -v update 升級)

5、Redmine安裝

# wget http://rubyforge.org/frs/download.php/56909/redmine-0.8.4.tar.gz

# tar zxvf redmine-0.8.4.tar.gz

# mv redmine-0.8.4 /usr/local/redmine

# cd /usr/local/redmine/config

設置數據庫參數

# cp database.yml.example database.yml # vi database.yml production: adapter: mysql database:redmine host: localhost username: redmineuser password: redminepw encoding: utf8 保存退出:wq

6. 創建mysql數據庫

# wget http://download.mysql.cn/download_file/gz/5.0/mysql-5.0.22.tar.gz
# tar zxvf mysql-5.0.22.tar.gz
# cd mysql-5.0.22
# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data/ --without-innodb --without-debug --with-extra-charsets=gbk --with-extra-charsets=all --enable-assembler --with-pthread --enable-thread-safe-client --with-client-ldflags=-all-static
配置成功出現“Thank you for choosing MySQL!”提示。
# make && make install

Mysql配置 # cp ./support-files/mysql.server /etc/init.d/mysql # groupadd mysql # useradd –g mysql mysql # chmod 777 /etc/init.d/mysql # /usr/local/mysql/bin/mysql_install_db # chown -R mysql:mysql /usr/local/mysql/data/ 啟動Mysql # service mysql start # /usr/local/mysql/bin/mysqladmin –u root –p password 'rootpw' //設置密碼為rootpw Enter password: //默認密碼為空,所以直接回車 # /usr/local/mysql/bin/mysql –u root –p Enter password: //輸入新密碼後,登錄成功

# /usr/local/mysql/bin/mysql -u root -p

Mysql> create database redmine default character set utf8; grant all on redmine.* to root; grant all on redmine.* to root@localhost; grant all on redmine.* to redmineuser; grant all on redmine.* to redmineuser @localhost; set password for redmineuser@localhost=password('redminpw'); Mysql>exit;

Remine設定

(注意此時的目錄一定要在redmine/config裡,不然會出錯,本文後面有錯誤信息。) # rake db:migrate RAILS_ENV="production" //創建表 # rake redmine:load_default_data RAILS_ENV="production" //載默認配置 這裡會要求選擇默認語言,我選的中文zh: Select language: bg, ca, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, lt, nl, no, pl, pt, pt-br, ro, ru, sk, sr, sv, th, tr, uk, vn, zh, zh-tw [en] zh 這個默認設置只是在未登錄時的界面語言,當用戶登錄後,默認語言還是英語,在My account裡可以修改成其它語言。 WEB # ruby script/server webrick -e production # ruby /usr/local/redmine/script/server webrick -e production 停止web服務方法:在當前啟動窗口按ctrl+C 訪問http://ip:3000/ 初始用戶名/密碼:admin/admin 這樣啟動後,啟動窗口是不能關閉的,所以要使Redmine作為服務啟動,需添加-d參數: # ruby script/server webrick -e production -d # ruby /usr/local/redmine/script/server webrick -e production –d 停止服務方法:(ps命令查出此進程的pid號,再殺掉,目前好像只能這樣,我看了--help裡面,還沒有停止的參數。) (注意:如果你使用SSH這類工具遠程登錄Liunx, 你必須用以下命令啟動服務,然後CTRL+D斷開SSH ./UACenterSvr & ruby /usr/local/redmine/script/server webrick -e production –d
Copyright © Linux教程網 All Rights Reserved