搜尋
首頁運維Nginx在Linux系統中怎麼將Redmine和SVN整合入Nginx

在Linux系統中怎麼將Redmine和SVN整合入Nginx

May 27, 2023 pm 05:13 PM
linuxnginxredmine

redmine:是一個基於web的專案管理軟體,用ruby開發的。是基於ror框架開發的一套跨平台專案管理系統,是專案管理系統的後起之秀,據說是源自於basecamp的ror版而來,支援多種資料庫,除了和dotproject的功能大致相當外,還有不少自己獨特的功能,例如提供wiki、新聞台、時間追蹤、feed聚合、匯出pdf等等,還可以整合其他版本管理系統和bug追蹤系統,例如svn、cvs、td等等。配置功能強大且方便,自訂屬性和更新通知也很實用。我們需要按照官方的安裝文檔,嚴格安裝對應的ruby套件來部署redmine svn專案管理系統

#環境: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環境

參考:centos 5.5下安裝mysql5.1.57 php5.2.17(fastcgi ) nginx1.0.1高效能web伺服器

三、redmine安裝(對各軟體包版本要求非常嚴格,必須對應對應版本,否則會出現不可預測的錯誤)

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環境變數
    或 

echo "export path=$path:/usr/local/ruby/bin/" >> /etc/profile

2、 rubygems 安裝

安裝rubygems ,注意一定要是1.7.0以下的版本,不然無法正常啟動使用redmine。我只是因為看了一個他人寫得中文文檔,安裝了1.7.0版本,所以redmine一直無法正常運作,為此走了一大圈彎路。最後在官方文檔上才找到問題所在。以下是官網上的一些對版本要求的描述。
 

複製程式碼 程式碼如下:

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 ruby​​gems 1.5.0 or later, stick to previous versions of ruby​​gems !
rails 2.3.11 will fail with ruby​​gems 1.7.ick to later, stversions, stversion 1.7.ick to 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) data fail mbaseig 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).#n#i#n# 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、建立資料庫

  /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資料庫配置.

  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、建立運行資料庫:

產生會話儲存金鑰:

  cd /data/www/redmine
  rake generate_session_store

然後開始建立資料庫表結構,在redmine的根目錄下運行:

  rails_env=production rake db:migrate

讀取預設配置數據,當遇到選擇語言(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

啟動如果出錯如下:

複製程式碼 程式碼如下:

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.
  !! 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.
  !!! 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.

##11 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

##複製程式碼 程式碼如下:

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测试:

在Linux系統中怎麼將Redmine和SVN整合入Nginx

直接用ruby内置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

在Linux系統中怎麼將Redmine和SVN整合入Nginx

六、配置svn服务器
七、在redmine中配置svn
进入redmine目录下config,有文件“configuration.yml.example”,复制该文件重命名“configuration.yml”,修改其中的svn配置

复制代码 代码如下:

scm_subversion_command: svn

注意:这里需要在环境变量path中添加svn所在的目录
再重启服务器,配置scm
新建项目test,配置版本库 scm-->选择subversion
url-->填写svn://192.168.8.32/test(根据自己svn配置自行修改)
登录名-->test(根据自己svn配置自行修改)
密码-->test(根据自己svn配置自行修改)
保存即可

在Linux系統中怎麼將Redmine和SVN整合入Nginx

以上是在Linux系統中怎麼將Redmine和SVN整合入Nginx的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述
本文轉載於:亿速云。如有侵權,請聯絡admin@php.cn刪除
NGINX與Apache:性能,可伸縮性和效率NGINX與Apache:性能,可伸縮性和效率Apr 19, 2025 am 12:05 AM

NGINX和Apache都是強大的Web服務器,各自在性能、可擴展性和效率上有獨特的優勢和不足。 1)NGINX在處理靜態內容和反向代理時表現出色,適合高並發場景。 2)Apache在處理動態內容時表現更好,適合需要豐富模塊支持的項目。選擇服務器應根據項目需求和場景來決定。

終極攤牌:nginx vs. apache終極攤牌:nginx vs. apacheApr 18, 2025 am 12:02 AM

NGINX適合處理高並發請求,Apache適合需要復雜配置和功能擴展的場景。 1.NGINX採用事件驅動、非阻塞架構,適用於高並發環境。 2.Apache採用進程或線程模型,提供豐富的模塊生態系統,適合複雜配置需求。

nginx行動:示例和現實應用程序nginx行動:示例和現實應用程序Apr 17, 2025 am 12:18 AM

NGINX可用於提升網站性能、安全性和可擴展性。 1)作為反向代理和負載均衡器,NGINX可優化後端服務和分擔流量。 2)通過事件驅動和異步架構,NGINX高效處理高並發連接。 3)配置文件允許靈活定義規則,如靜態文件服務和負載均衡。 4)優化建議包括啟用Gzip壓縮、使用緩存和調整worker進程。

NGINX單元:支持不同的編程語言NGINX單元:支持不同的編程語言Apr 16, 2025 am 12:15 AM

NGINXUnit支持多種編程語言,通過模塊化設計實現。 1.加載語言模塊:根據配置文件加載相應模塊。 2.應用啟動:調用語言運行時執行應用代碼。 3.請求處理:將請求轉發給應用實例。 4.響應返回:將處理後的響應返回給客戶端。

在Nginx和Apache之間進行選擇:適合您的需求在Nginx和Apache之間進行選擇:適合您的需求Apr 15, 2025 am 12:04 AM

NGINX和Apache各有優劣,適合不同場景。 1.NGINX適合高並發和低資源消耗場景。 2.Apache適合需要復雜配置和豐富模塊的場景。通過比較它們的核心特性、性能差異和最佳實踐,可以幫助你選擇最適合需求的服務器軟件。

nginx怎麼啟動nginx怎麼啟動Apr 14, 2025 pm 01:06 PM

問題:如何啟動 Nginx?答案:安裝 Nginx啟動 Nginx驗證 Nginx 是否已啟動探索其他啟動選項自動啟動 Nginx

怎麼查看nginx是否啟動怎麼查看nginx是否啟動Apr 14, 2025 pm 01:03 PM

確認 Nginx 是否啟動的方法:1. 使用命令行:systemctl status nginx(Linux/Unix)、netstat -ano | findstr 80(Windows);2. 檢查端口 80 是否開放;3. 查看系統日誌中 Nginx 啟動消息;4. 使用第三方工具,如 Nagios、Zabbix、Icinga。

nginx怎麼關閉nginx怎麼關閉Apr 14, 2025 pm 01:00 PM

要關閉 Nginx 服務,請按以下步驟操作:確定安裝類型:Red Hat/CentOS(systemctl status nginx)或 Debian/Ubuntu(service nginx status)停止服務:Red Hat/CentOS(systemctl stop nginx)或 Debian/Ubuntu(service nginx stop)禁用自動啟動(可選):Red Hat/CentOS(systemctl disable nginx)或 Debian/Ubuntu(syst

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱工具

MantisBT

MantisBT

Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

Atom編輯器mac版下載

Atom編輯器mac版下載

最受歡迎的的開源編輯器

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)