歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> 學習Linux

Centos 7安裝 redmine 3.X

Centos 7安裝 redmine 3.X


Centos 7安裝 redmine 3.X


一、配置網卡,能夠訪問互聯網(略)

========================================================

二、配置環境

yum -y install patch make gcc gcc-c++ gcc-g77 flex* bison file

yum -y install libtool libtool-libs libtool-ltdl-devel* autoconf kernel-devel automake libmcrypt*

yum -y install libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel

yum -y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel

yum -y install glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel

yum -y install ncurses ncurses-devel curl curl-devel e2fsprogs

yum -y install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel

yum -y install openssl openssl-devel vim-minimal nano sendmail

yum -y install fonts-chinese gettext gettext-devel

yum -y install gmp-devel pspell-devel

yum -y install readline* libxslt* pcre* net-snmp* gmp* libtidy*

yum -y install ImageMagick* subversion*

yum -y install wget

======================================================

三、安裝mysql

wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

rpm -ivh mysql-community-release-el7-5.noarch.rpm

yum install mysql-community-server mysql-community-devel

rpm -qa |grep mysql #檢查安裝

=======================================================

四、安裝rvm

\curl -sSL https://get.rvm.io | bash

source /etc/profile /usr/local/rvm/bin/rvm reload

rvm -v #:未出現版本號請重裝

=======================================================

五、安裝ruby

rvm list known #查看可安裝列表

rvm install ruby-2.1.8 #官方只支持1.9~2.2之間的版本

gem -v #如果未顯示版本,重新安裝ruby

===========================================================

六、更新gem源

gem source -l

gem source -r https://rubygems.org/ #:默認的url地址後必須有”/”,否則刪不掉。

gem source -a https://ruby.taobao.org/

gem source -l #:確認只有 https://ruby.taobao.org/

=======================================================

七、安裝gem組件

gem install rails

gem install rake

gem install mysql2

=======================================================

八、配置redmine數據庫文件

cd /usr/local/redmine/config

cp database.yml.example database.yml

vi database.yml

production:

adapter: mysql

database:redmine

host: localhost

username: redmineuser

password: redminepw

encoding: utf8

======================================================

九、配置mysql

service mysqld start

mysql -u root -p

Mysql> create database redmine default character set utf8;

grant all on redmine.* to root;

grant all on redmine.* to root@localhost;

grant all on redmine.* to redmineuser;

grant all on redmine.* to redmineuser @localhost;

set password for redmineuser@localhost=password('redminpw');

set password for root@localhost=password('newpass');

flush privileges;

exit;

=======================================================

十、安裝redmine

cd /usr/local/

svn co http://svn.redmine.org/redmine/branches/3.2-stable/

mv 3.2-stable redmine

cd redmine

bundle install #可能會被牆,如出現錯誤按提示進行修復

=====================================================

十一、初始化redmine

bundle exec rake generate_secret_token

RAILS_ENV=production bundle exec rake db:migrate

RAILS_ENV=production bundle exec rake redmine:load_default_data #初始化數據選擇zh

====================================================

十二、

mkdir -p tmp tmp/pdf public/plugin_assets

sudo chmod -R 755 files log tmp public/plugin_assets

===================================================

十三、開啟服務

bundle exec rails server -p80 webrick -e production -d -b 0.0.0.0 #使用所有IP地址的80端口提供服務

===================================================

十四、關閉服務

  1. (ps命令查出此進程的pid號,再殺掉,目前好像只能這樣,我看了--help裡面,還沒有停止的參數。)

  2. # ps aux | grep ruby

  3. # kill -9 [PID]

http://xxxxxx/Linuxjc/1134359.html TechArticle

Copyright © Linux教程網 All Rights Reserved