阅读更多
1、 建立文件夹:sudo mkdir -p /opt/redmine
2、下载最新版本源码:
cd /opt/tedmine
sudo wget http://rubyforge.org/frs/download.php/77023/redmine-2.3.2.tar.gz
3、解压缩:
sudo tar xvf redmine-2.3.2.tar.gz
4、安装ruby相关
cd redmine-2.3.2.tar.gz
sudo apt-get install rubygems
sudo gem install bundler
bundler
在此出现错误一般都是一些插件没有安装,我机器额外安装的有:
sudo apt-get install libxslt1-dev
sudo apt-get install libmysqlclient-dev
sudo apt-get install libmagickwand-dev
5、安装lampp
phpadmin 建数据库:
CREATE DATABASE redmine CHARACTER SET UTF8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
6、修改数据库配置文件:
mv config/database.yml.example config/database.yml
emacs config/database.yml
7、命令初始化,数据库,表结构:
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
如果出现:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 错误则做一个软链接:
sudo ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock
$ mkdir public/plugin_assets
8、这时可以配置到lampp上。
最简单方法是用命令:
ruby script/rails server webrick -e production
然后访问 http://localhost:3000/