标签:
原文地址:http://112.74.112.215/projects/james/wiki/本站redmine的搭建过程
阿里云创建和管理虚拟机过程见官方文档不详细介绍。
主要记录系统安装过程及问题的处理。
重新安装,部署,作为生产环境。
本地虚拟机作为开发环境。
redmine做为网站主站,进行项目管理。
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-server
vim /etc/apt/sources.list
add //trusty is for ubuntu1404
deb http://nginx.org/packages/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/ubuntu/ trusty nginx
When trying to install nginx in debian, you may encounter this error:
W: GPG error: http://nginx.org squeeze Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62
The solution is this:
gpg --keyserver keyserver.ubuntu.com --recv-key ABF5BD827BD9BF62
gpg -a --export ABF5BD827BD9BF62 | apt-key add -
Example output:
root@shell:~# gpg --keyserver keyserver.ubuntu.com --recv-key ABF5BD827BD9BF62
gpg: requesting key 7BD9BF62 from hkp server keyserver.ubuntu.com
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 7BD9BF62: public key "nginx signing key <signing-key@nginx.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
root@shell:~# gpg -a --export ABF5BD827BD9BF62 | apt-key add -
OK
Then type:
apt-get update
apt-get install nginx curl
/etc/nginx/site-available 或者 /etc/nginx/conf.d/
redmine.conf
upstream redmine {
server 127.0.0.1:3000;
}
server {
server_name 112.74.112.215;
root /usr/share/nginx/html/redmine/public;
location / {
try_files $uri @redmine;
}
location @redmine {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://redmine;
}
}
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
sudo curl -L https://get.rvm.io | sudo bash -s stable
source ~/.rvm/scripts/rvm
rvm -v // 确认版本
rvm install 2.2.3
ruby -v // 确认版本
rvm 2.2.3 --default // 设置默认版本
gem -v // 确认gem 版本
修改 gem source
$ gem sources -r https://rubygems.org/
$ gem source -a https://ruby.taobao.org
$ gem source -l // 查看当前的source
gem install rails
find . -name mkmf.log
查看log文件内容
缺少 -lgmp
安装gmp
sudo apt-get install libgmp-dev
rails -v //确认版本
sudo apt-get install mariadb-server libmysqlclient-dev
sudo apt-get install imagemagick libmagickwand-dev libcurl4-openssl-dev
wget http://www.redmine.org/releases/redmine-3.1.0.tar.gz
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER ‘james‘‘localhost‘ IDENTIFIED BY ‘******‘;
GRANT ALL PRIVILEGES ON redmine.* TO ‘james‘
‘localhost‘;
Copy config/database.yml.example to config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: james
password: **
gem install bundlervim Gemfile修改source 为: https://ruby.taobao.org/
bundle install --without development test
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
assuming you run the application with a redmine user account:
mkdir -p tmp tmp/pdf public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
ruby bin/rails server webrick -e production
ruby bin/rails server webrick -e production &
Use default administrator account to log in:
login: admin
password: admin
阿里云ubuntu1404LTS安装LNMR环境安装redmine项目管理软件
标签:
原文地址:http://www.cnblogs.com/jamesgone/p/5050092.html