linux下redmine3.3迁移、升级、插件备忘录
服务现状
吉州网站建设公司创新互联建站,吉州网站设计制作,有大型网站制作公司丰富经验。已为吉州近千家提供企业网站建设服务。企业网站搭建\外贸网站制作要多少钱,请找那个售后服务好的吉州做网站的公司定做!
地址: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 clonehttps://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
分享标题:linux下redmine3.3迁移、升级、插件备忘录
分享路径:http://myzitong.com/article/psioig.html