您好,登錄后才能下訂單哦!
服務現狀
地址:http://ip:3000
主要用到了redmine(rails)服務、mysql服務,還有些其他服務!
基礎環境
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
yum -y install mysql-server mysql mysql-devel
安裝rvm(參考:http://blog.csdn.net/mydo/article/details/47748211)
mkdir rvm
cd rvm
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
gpg --verify rvm-installer.asc &&
bash rvm-installer stable
rvm -v
sed -i -e 's/ftp\.ruby-lang\.org\/pub\/ruby/ruby\.taobao\.org\/mirrors\/ruby/g' /usr/local/rvm/config/db
rvm list known #查看有哪些東東
rvm install 2.3
rvm 2.3.3 --default
ruby -v
gem -v
設置gem源(參考:https://ruby.taobao.org/)
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
gem sources -l
請確保只有 gems.ruby-china.org
gem install rails
ps:如果gem無法添加,可以修改vi /etc/resolv.conf,只保留nameserver 114.114.114.114,然后再次添加試試
rails -v
進入redmine的conf中,cp出來一個database.yml,然后修改production中的內容,參考下面的
production:
adapter: mysql2
database: redmine
host: localhost
username: root
password:
create database redmine character set utf8;
mysql -u root -p redmine < xxxx.sql
進入redmine的根目錄執行下面的命令
gem install bundler
bundle install --without development test rmagick
bundle exec rake generate_secret_token
rake db:migrate RAILS_ENV=production
若有插件更新:bundle exec rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production rake db:migrate_plugins RAILS_ENV=production
rake tmp:cache:clear
rake tmp:sessions:clear
啟動redmine3的命令:
bundle exec rails server webrick -e production -b 0.0.0.0 -d
linux防火墻屏蔽了端口3000
解決辦法: 配置防火墻,開放寬口3000
# /sbin/iptables -I INPUT -p tcp --dport 3000 -j ACCEPT
# /etc/rc.d/init.d/iptables save
# service iptables restart
redmine運行慢:
修改configuration.yml
找到 delivery_method: :smtp,將smtp改為async_smtp
重啟服務。這里就是改成了異步
自定義菜單插件安裝
解壓zip并上傳到redmine的plugins目錄,插件如下
custom_menu.zip
在redmine根目錄下分別執行如下命令
git clone https://bitbucket.org/dkuk/a_common_libs.git
bundle install
rake redmine:plugins:migrate RAILS_ENV=production
之后重啟redmine即可
最后在管理》插件中進行配置即可
統計圖插件
redmine的插件目錄執行:git clone https://github.com/masweetman/issue_charts.git
回到根目錄執行:
bundle install
rake redmine:plugins:migrate RAILS_ENV=production
重啟
圖片預覽插件
redmine的插件目錄執行:git clone https://github.com/paginagmbh/redmine_lightbox2.git
回到根目錄執行:rake redmine:plugins:migrate RAILS_ENV=production
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。