標籤:
- 安裝環境:Centos、mysql、Ruby、Apache、Redmine
yum update
yum -y groupinstall "Development Tools"
yum -y install ntp zlib zlib-devel sqlite-devel httpd mysql-server mysql-devel curl curl-devel httpd-devel apr-devel apr-util-devel mlocate manlibxml2-devel libxslt-devel libffi-devel readline-devel
yum install -y ruby ruby-devel
yum install -y rubygems
yum install –y ImageMagick-devel
關閉selinux
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
sed -i "s/SELINUXTYPE=targeted/#SELINUXTYPE=targeted/g" /etc/selinux/config
安裝RVM
\curl -L https://get.rvm.io | bash
source /etc/profile.d/rvm.sh
開啟防火牆的80、443連接埠,並重啟防火牆
vi /etc/sysconfig/iptables
安裝php、phpMyAdmin
yum -y install php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap
rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
yum -y install phpmyadmin
vi /etc/httpd/conf.d/phpmyadmin.conf
將 "Allow from 127.0.0.1" 替換為 "Allow from all"
vi /usr/share/phpmyadmin/config.inc.php
將 $cfg[‘Servers‘][$i][‘auth_type‘] = ‘cookie‘ 替換為 $cfg[‘Servers‘][$i][‘auth_type‘] = ‘http‘;
- 建議參考的安裝文檔
http://www.redmine.org/projects/redmine/wiki/Install_Redmine_25x_on_Centos_65_complete
http://blog.csdn.net/win_lin/article/details/8514333
http://blog.tonycube.com/2013/11/redmine-centos-apache-ruby-on-rails.html
- 遇到過的問題,建議參考下面的幾個解決方案
http://stackoverflow.com/questions/22571206/netbeans-and-rails-error-bin-ruby-no-such-file-or-directory-script-rails-
- 遷移方法
https://ruby-china.org/topics/8340
技巧
A、預設需要加上連接埠3000才可以訪問,解決方案在vhost.conf中添加:
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
B、發送郵件
http://blog.csdn.net/maktub_haixue/article/details/39394111
C、開機啟動及指令碼
http://www.vipzhicheng.com/blog/2014/04/09/install-redmine-on-centos/
#!/bin/bash# Modify it to your configurationDIR=/var/www/html/redmine/ # Start Redmine in daemon mode.start(){ cd $DIR ruby script/rails server -d -e production}# Stop Redmine daemonstop(){ RUBYPID=`ps aux | grep "ruby script/rails" | grep -v grep | awk ‘{print $2}‘` if [ "x$RUBYPID" != "x" ]; then kill -2 $RUBYPID fi}# Check if Redmine is runningstatus(){ RUBYPID=`ps aux | grep "ruby script/rails" | grep -v grep | awk ‘{print $2}‘` if [ "x$RUBYPID" = "x" ]; then echo "* Redmine is not running" else echo "* Redmine is running" fi} case "$1" in start) start status ;; stop) stop sleep 2 status ;; status) status ;; restart|force-reload) stop start ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" exit 1esac
View Code
centos install redmine (專案管理工具)