RedHat Liunx 9 下面Redmin的安装手册
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安装
<span lang="EN-US" sizcache="1" sizset="35"><font face="Courier New"># wget </font><a href="http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz"><font face="Courier New" color="#ca0000">http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz</font></a><font face="Courier New"> </font></span>
# tar zxvf rubygems-1.3.5.tgz
<span lang="EN-US"><font face="Courier New"># cd rubygems-1.3.5</font></span>
<span lang="EN-US"><font face="Courier New"># ruby setup.rb</font></span>
<span lang="EN-US" sizcache="1" sizset="36">
<h4 style="MARGIN: 0mm 0mm 0pt">
<span lang="EN-US" style="FONT-SIZE: 12pt">3</span><span style="FONT-SIZE: 12pt">、<span lang="EN-US">Rake</span></span><span lang="ZH-CN" style="FONT-SIZE: 12pt; FONT-FAMILY: simsun">安装</span>
</h4>
<div style="MARGIN: 0mm 0mm 0pt">
<span lang="EN-US"># </span><span lang="EN-US">gem install rake</span><span lang="EN-US"> //</span><span lang="ZH-CN" style="FONT-FAMILY: simsun">直接使用</span><span lang="EN-US">gem</span><span lang="ZH-CN" style="FONT-FAMILY: simsun">命令安装</span><span lang="EN-US">rake.</span>
</div>
<div style="MARGIN: 0mm 0mm 0pt" sizcache="1" sizset="36">
<span lang="EN-US">//</span><span lang="ZH-CN" style="FONT-FAMILY: simsun">也可以下载安装地址:</span><span lang="EN-US" sizcache="1" sizset="36"><a href="http://rubyforge.org/frs/download.php/56872/rake-0.8.7.tgz"><font color="#ca0000">http://rubyforge.org/frs/download.php/56872/rake-0.8.7.tgz</font></a></span>
</div>
<div style="MARGIN: 0mm 0mm 0pt"> </div>
<h4 style="MARGIN: 0mm 0mm 0pt">
<span lang="EN-US" style="FONT-SIZE: 12pt">4</span><span style="FONT-SIZE: 12pt">、<span lang="EN-US">Ruby on Rails</span></span>
</h4>
<div style="MARGIN: 0mm 0mm 0pt"><span lang="EN-US"># gem install rails</span></div>
<div style="MARGIN: 0mm 0mm 0pt"><span lang="EN-US"><span style="COLOR: #ff0000">(注意:如果安装不成功,可能是RubyGems版本太低,可以用gem -v update 升级)</span></span></div>
<div style="MARGIN: 0mm 0mm 0pt"> </div>
<div style="MARGIN: 0mm 0mm 0pt" sizcache="1" sizset="37"><span lang="EN-US" sizcache="1" sizset="37">
<h4 style="MARGIN: 0mm 0mm 0pt">5、Redmine安装</h4>
<div style="MARGIN: 0mm 0mm 0pt" sizcache="1" sizset="37"><span lang="EN-US" sizcache="1" sizset="37"># wget <a href="http://rubyforge.org/frs/download.php/56909/redmine-0.8.4.tar.gz"><font color="#ca0000">http://rubyforge.org/frs/download.php/56909/redmine-0.8.4.tar.gz</font></a> </span></div>
<h4 style="MARGIN: 0mm 0mm 0pt"><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 12pt"># tar zxvf redmine-0.8.4.tar.gz </span></h4>
<h4 style="MARGIN: 0mm 0mm 0pt">
<span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 12pt"># mv </span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 12pt">redmine-0.8.4 /usr/local/redmine</span>
</h4>
<h4 style="MARGIN: 0mm 0mm 0pt"><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 12pt"># cd /usr/local/redmine/config</span></h4>
<h4 style="MARGIN: 0mm 0mm 0pt 21pt; TEXT-INDENT: -21pt">
<span lang="ZH-CN" style="FONT-SIZE: 12pt; FONT-FAMILY: simsun">设</span><span lang="ZH-CN" style="FONT-SIZE: 12pt">置数据</span><span lang="ZH-CN" style="FONT-SIZE: 12pt; FONT-FAMILY: simsun">库</span><span lang="ZH-CN" style="FONT-SIZE: 12pt">参数</span>
</h4>
<div style="MARGIN: 0mm 0mm 0pt"><span lang="EN-US"># cp database.yml.example database.yml</span></div>
<div style="MARGIN: 0mm 0mm 0pt"><span lang="EN-US"># vi database.yml</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"><span lang="EN-US">production:</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"><span lang="EN-US"> adapter: mysql</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"><span lang="EN-US"> database:redmine</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"><span lang="EN-US"> host: localhost</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"><span lang="EN-US"> username: redmineuser</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"><span lang="EN-US"> password: redminepw</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"><span lang="EN-US"> encoding: utf8</span></div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt">
<span lang="ZH-CN" style="FONT-FAMILY: simsun">保存退出</span><span lang="EN-US">:wq</span>
</div>
<div style="MARGIN: 0mm 0mm 0pt 10.5pt"> </div></span></div></span>
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>
<span lang="EN-US"><font face="Courier New">create database redmine default character set utf8;</font></span>
grant all on
<span lang="EN-US"><font face="Courier New">redmine</font></span>
.* to root;grant all on
<span lang="EN-US"><font face="Courier New">redmine</font></span>
.* to root@localhost;grant all on
<span lang="EN-US"><font face="Courier New">redmine</font></span>
.* to redmineuser;grant all on
<span lang="EN-US"><font face="Courier New">redmine</font></span>
.* to redmineuser @localhost;set password for redmineuser@localhost=password('redminpw');
Mysql>exit;
Remine设定
<span lang="ZH-CN" style="FONT-FAMILY: simsun">(注意此时的目录一定要在</span>
redmine/<span lang="EN-US"><font face="Courier New">config</font></span>
<span lang="ZH-CN" style="FONT-FAMILY: simsun">里,不然会出错,本文后面有错误信息。)</span>
<span lang="EN-US"><font face="Courier New"># rake db:migrate RAILS_ENV="production" //</font></span>
创建表#
<span lang="EN-US">rake redmine:load_default_data RAILS_ENV="production" </span><span lang="EN-US">/</span>
<span lang="EN-US">/</span>
<span lang="ZH-CN" style="FONT-FAMILY: simsun">加</span>
载默认配置这里会要求选择默认语言,我选的中文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里可以修改成其它语言。
<span lang="ZH-CN"><font face="Courier New">启</font></span>
<span lang="ZH-CN" style="FONT-FAMILY: simsun">动</span>
<span lang="EN-US">WEB</span>
<span lang="ZH-CN">服</span>
<span lang="ZH-CN" style="FONT-FAMILY: simsun">务</span>
#
<span lang="EN-US">ruby script/server</span>
<span lang="EN-US"> </span><span lang="EN-US">webrick -e production</span>
<span lang="ZH-CN" style="FONT-FAMILY: simsun">或</span>
# ruby /usr/local/redmine/script/server webrick -e production停止web服务方法:在当前启动窗口按ctrl+C
访问http://ip:3000/
初始用户名/密码:admin/admin
这样启动后,启动窗口是不能关闭的,所以要使Redmine作为服务启动,需添加-d参数:
<font face="Courier New"><span lang="EN-US"># </span><span lang="EN-US">ruby script/server webrick -e production</span></font>
-d<span lang="ZH-CN" style="FONT-FAMILY: simsun">或</span>
# 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
相关推荐
SoShellon 2013-06-01
周公周金桥 2020-09-06
zjuwangleicn 2020-09-04
hellowzm 2020-08-18
大象从不倒下 2020-07-31
AlisaClass 2020-07-19
尚衍亮 2020-06-12
淡风wisdon大大 2020-06-06
黎豆子 2020-05-07
hilary0 2020-05-04
zhanghao 2020-04-21
MaureenChen 2020-04-21
xingguanghai 2020-03-13
nercon 2020-02-22
impress 2020-02-20
ajaxtony 2020-02-18
teresalxm 2020-02-18
福叔 2020-02-16