您好,登錄后才能下訂單哦!
這篇文章主要介紹“在Linux系統(tǒng)中怎么將Redmine和SVN整合入Nginx”的相關(guān)知識,小編通過實(shí)際案例向大家展示操作過程,操作方法簡單快捷,實(shí)用性強(qiáng),希望這篇“在Linux系統(tǒng)中怎么將Redmine和SVN整合入Nginx”文章能幫助大家解決問題。
redmine:是一個基于web的項(xiàng)目管理軟件,用ruby開發(fā)的。是基于ror框架開發(fā)的一套跨平臺項(xiàng)目管理系統(tǒng),是項(xiàng)目管理系統(tǒng)的后起之秀,據(jù)說是源于basecamp的ror版而來,支持多種數(shù)據(jù)庫,除了和dotproject的功能大致相當(dāng)外,還有不少自己獨(dú)特的功能,例如提供wiki、新聞臺、時間跟蹤、feed聚合、導(dǎo)出pdf等等,還可以集成其他版本管理系統(tǒng)和bug跟蹤系統(tǒng),例如svn、cvs、td等等。配置功能強(qiáng)大而且方便,自定義屬性和更新通知也很實(shí)用。下面我們來部署redmine+svn項(xiàng)目管理系統(tǒng)(需要嚴(yán)格的按照官方的安裝文檔安裝對應(yīng)的ruby包)
環(huán)境:centos-5.5 redmine-1.2.0 subversion-1.6.17
一、下載所需要軟件包
wget ftp://ftp.ruby-lang.org//pub/ruby/1.8/ruby-1.8.7.tar.gz wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz wget http://rubyforge.org/frs/download.php/74944/redmine-1.2.0.tar.gz wget http://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz wget http://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.gz
二、先配置lnmp環(huán)境
參考:centos 5.5下安裝mysql5.1.57+php5.2.17(fastcgi)+nginx1.0.1高性能web服務(wù)器
三、redmine安裝(對各軟件包版本要求非常嚴(yán)格,必須對應(yīng)相應(yīng)版本,否則會出現(xiàn)不可預(yù)知的錯誤)
1、ruby安裝:
tar zxvf ruby-1.8.7.tar.gz cd ruby-1.8.7 ./configure --prefix=/usr/local/ruby make && make install cd ..
修改~/.bash_profile,將ruby目錄加入root環(huán)境變量
或者
echo "export path=$path:/usr/local/ruby/bin/" >> /etc/profile
2、rubygems 安裝
安裝rubygems ,注意一定要是1.7.0以下的版本,不然無法正常啟動使用redmine。我就是因?yàn)榭戳艘粋€他人寫得中文文檔,安裝了1.7.0版本,所以redmine一直無法正常工作,為此走了一大圈彎路。最后在官方文檔上才找到問題所在。下面是官網(wǎng)上的一些對版本要求的描述。
復(fù)制代碼 代碼如下:
ruby 1.9 is not supported yet. you have to use ruby 1.8.x as stated above.
rubygems 1.3.7 or higher is required with following limitations :
rails 2.3.5 will fail with rubygems 1.5.0 or later, stick to previous versions of rubygems !
rails 2.3.11 will fail with rubygems 1.7.0 or later, stick to previous versions of rubygems !
rake 0.8.7 is required (rake 0.9.x is not supported by rails yet)
rack 1.1.x is required, 1.1.0 has a bug with quotes (#8416). database migration would fail with other version.
mongrel 1.1.5 needs a patch attached to #7688 to work fine with rails 2.3.11. in case of upgrade, another issue may appear for some time after migration (#7857).
i18n 0.4.2 is required for redmine >= 1.0.5
tar zxvf rubygems-1.6.2.tgz cd rubygems-1.6.2 ruby setup.rb cd ..
3、安裝rails rack i18n mysql passenger
gem install rails -v=2.3.11 gem install rack -v=1.1.1 gem install i18n -v=0.4.2 gem install mysql --no-rdoc --no-ri -- --with-mysql-dir=/data/soft/mysql #我的mysql是編譯安裝在/data/soft/mysql目錄下的 gem install passenger gem install mongrel mongrel_cluster
四、安裝配置redmine
1、解壓redmine
tar zxvf redmine-1.2.0.tar.gz mv redmine-1.2.0 /data/www/redmine chown -r www. /data/www/redmine
2、建立數(shù)據(jù)庫
/data/soft/mysql/bin/mysql -uroot -p mysql> createdatabase redmine characterset utf8; mysql> grantallon redmine.* to 'redmine'@'localhost' identified by 'redmine'; mysql> flush privileges;
3、修改redmine mysql數(shù)據(jù)庫配置.
cd /data/www/redmine/config cp database.yml.example database.yml vi database.yml production: adapter: mysql database: redmine host: localhost username: redmine password: redmine encoding: utf8
注意:冒號后面有一空格。。。
4、創(chuàng)建運(yùn)行數(shù)據(jù)庫:
生成會話存儲密鑰:
cd /data/www/redmine rake generate_session_store
然后開始創(chuàng)建數(shù)據(jù)庫表結(jié)構(gòu),在redmine的根目錄下運(yùn)行:
rails_env=production rake db:migrate
讀取默認(rèn)配置數(shù)據(jù),當(dāng)遇到選擇語言(select language)時,選擇zh:
rails_env=production rake redmine:load_default_data
5、配置mongrel_cluster
cd /data/www/redmine mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -n 3
6、啟用mongrel_cluster
cd /data/www/redmine mongrel_rails cluster::start
啟動如果出錯如下:
復(fù)制代碼 代碼如下:
starting port 8000
!!! path to pid file not valid: tmp/pids/mongrel.8000.pid
mongrel::start reported an error. use mongrel_rails mongrel::start -h to get help.
starting port 8001
!!! path to pid file not valid: tmp/pids/mongrel.8001.pid
mongrel::start reported an error. use mongrel_rails mongrel::start -h to get help.
starting port 8002
!!! path to pid file not valid: tmp/pids/mongrel.8002.pid
mongrel::start reported an error. use mongrel_rails mongrel::start -h to get help.
創(chuàng)建/data/www/redmine/tmp/pids目錄即可
mkdir -p /data/www/redmine/tmp/pids
啟動成功如下:
[root@centos5 redmine]# mongrel_rails cluster::start starting port 8000 starting port 8001 starting port 8002
7、配置nginx
復(fù)制代碼 代碼如下:
vi /data/soft/nginx/conf/nginx.conf
upstream mongrel
{
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
}
server
{
listen 80;
server_name 192.168.8.32;
root /data/www/redmine;
index index.html index.htm;
location /
{
proxy_pass http://mongrel;
proxy_redirect off;
proxy_set_header host $host;
proxy_set_header x-real-ip $remote_addr;
proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;
}
}
五: 訪問redmine測試:
直接用ruby內(nèi)置webrick也可啟動redmine
/usr/local/ruby/bin/ruby /data/www/redmine/script/server webrick -e production &
啟動成功如下:
[root@centos5 redmine]# /usr/local/ruby/bin/ruby /data/www/redmine/script/server webrick -e production & [1] 3526 [root@centos5 redmine]# => booting webrick => rails 2.3.11 application starting on http://0.0.0.0:3000 => call with -d to detach => ctrl-c to shutdown server [2011-06-2409:30:47] info webrick 1.3.1 [2011-06-2409:30:47] info ruby 1.8.7 (2008-05-31) [i686-linux] [2011-06-2409:30:47] info webrick::httpserver#start: pid=3526 port=3000
訪問redmine測試: http://192.168.8.32:3000
六、配置svn服務(wù)器
七、在redmine中配置svn
進(jìn)入redmine目錄下config,有文件“configuration.yml.example”,復(fù)制該文件重命名“configuration.yml”,修改其中的svn配置
復(fù)制代碼 代碼如下:
scm_subversion_command: svn
注意:這里需要在環(huán)境變量path中添加svn所在的目錄
再重啟服務(wù)器,配置scm
新建項(xiàng)目test,配置版本庫 scm-->選擇subversion
url-->填寫svn://192.168.8.32/test(根據(jù)自己svn配置自行修改)
登錄名-->test(根據(jù)自己svn配置自行修改)
密碼-->test(根據(jù)自己svn配置自行修改)
保存即可
關(guān)于“在Linux系統(tǒng)中怎么將Redmine和SVN整合入Nginx”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識,可以關(guān)注億速云行業(yè)資訊頻道,小編每天都會為大家更新不同的知識點(diǎn)。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。