CentOS6.2安装redmine2.3
?
第1步:安裝支持插件和其它插件;
[root@localhost/]#?yum?-y?install?zlib-devel?curl-devel?openssl-devel?httpd-devel?apr-devel?apr-util-devel?
mysql-devel
[root@localhost?/]#?yum?–y?install?gcc?gcc-c++?make?wget?lrz*?(注:沒有安裝這一些的,要安裝)
?
第2步:安裝ruby、rubygems;
[root@localhost?/]#?yum?install?-y?ruby?ruby-devel
[root@localhost?/]#?yum?install?-y?rubygems
?
第3步:安裝MySQL后,開機啟動MySQL,設置root密碼,建用戶和庫;
[root@localhost?/]#?yum?install?mysql?mysql-devel?mysql-server
[root@localhost?/]#?chkconfig?--levels?235?mysqld?on
[root@localhost?/]#?/etc/init.d/mysqld?start
[root@localhost?/]#?mysqladmin?-u?root?password?'123456'
[root@localhost?/]#?mysql?-u?root?-p123456
mysql>?CREATE?DATABASE?redmine?CHARACTER?SET?utf8?COLLATE?utf8_general_ci;
mysql>?CREATE?USER?'redmine'@'localhost'?IDENTIFIED?BY?'redmine';
mysql>?GRANT?ALL?ON?redmine.*?TO?'redmine'@'localhost';
mysql>?create?database?redmine_development?character?set?utf8;
mysql>?flush?privileges;
?
第4步:安裝passenger;
[root@localhost?/]#?gem?install?passenger
[root@localhost?/]#?passenger-install-apache2-module?(一直回車斷續)
?
第5步:下載redmine-2.3.0.tar.gz放到/var/www;
redmine下載地址http://rubyforge.org/frs/?group_id=1850?
[root@localhost?/]#?cd?/var/www/
[root@localhost?www]#?rz???(上傳redmine-2.3.0.tar.gz)
[root@localhost?www]#?tar?-xzvf?redmine-2.3.0.tar.gz
[root@localhost?www]#?mv?redmine-2.3.0?redmine
[root@localhost?www]#?yum?install?-y?ImageMagick-devel
[root@localhost?www]#?gem?install?bundler?
[root@localhost?www]#?cd?redmine
[root@localhost?redmine]#?yum?–y?install?libxml2*
[root@localhost?redmine]#?yum?install?-y?libxslt*
[root@localhost?redmine]#?bundle?install??(時間比較長)
[root@localhost?redmine]#?ruby?-v
[root@localhost?redmine]#?gem?install?rdoc-data;?rdoc-data?–install?(時間比較長)
[root@localhost?redmine]#?cp?config/database.yml.example?config/database.yml
[root@localhost?redmine]#?vi?config/database.yml???(修改連接庫)
?
[root@localhost?redmine]#?cp?config/configuration.yml.example?config/configuration.yml
[root@localhost?redmine]#?vi?config/configuration.yml??(配置郵件)
?
[root@localhost?redmine]#?gem?install?mysql2
?
第6步:生成session存儲加密信息和數據庫;
[root@localhost?redmine]#?rake?generate_secret_token
[root@localhost?redmine]#?RAILS_ENV=production?rake?db:migrate
[root@localhost?redmine]#?RAILS_ENV=production?rake?redmine:load_default_data?(輸入zh)
[root@localhost?redmine]#?ruby?script/rails?server?webrick?-e?production??(啟動服務)
?
第6步:開啟3000端口號;
要注意的是,centos默認是打開iptables服務的,所以要遠程訪問還要在iptables中添加一個放行規則。?
[root@localhost?redmine]#?vi?/etc/sysconfig/iptables?
在?-A?INPUT?-j?REJECT??這行前添加
1:?-A?INPUT?-m?state?--state?NEW?-m?tcp?-p?tcp?--dport?8000?-j?ACCEPT
然后再重啟iptables服務,使修改生效。
[root@localhost?redmine]#?service?iptables?restart
這樣就可以遠程訪問了。
?
?http://[服務器IP]:3000?訪問redmine,默認的管理登錄用戶名和密碼都為?admin
?
總結
以上是生活随笔為你收集整理的CentOS6.2安装redmine2.3的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php遍历一个目录 并重命名
- 下一篇: yum错误---Running Tran