Rumah > pangkalan data > tutorial mysql > Ubuntu 12.04安装Redmine 2.4.2

Ubuntu 12.04安装Redmine 2.4.2

WBOY
Lepaskan: 2016-06-07 15:26:49
asal
1183 orang telah melayarinya

官方安装文档参考: http://www.redmine.org/projects/redmine/wiki/RedmineInstall 首先安装MySQL, 参考: http://blog.csdn.net/csfreebird/article/details/6928733 创建Redmin数据库和用户 mysql -u root -p CREATE DATABASE redmine CHARACTER SET utf8

官方安装文档参考:

http://www.redmine.org/projects/redmine/wiki/RedmineInstall


首先安装MySQL, 参考:

http://blog.csdn.net/csfreebird/article/details/6928733

创建Redmin数据库和用户

mysql -u root -p 

CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
Salin selepas log masuk

现在下载Redmine 2.4.2代码:

wget http://www.redmine.org/releases/redmine-2.4.2.tar.gz
tar zxvf redmine-2.4.2.tar.gz
Salin selepas log masuk

安装ruby1.9.3
apt-get install ruby1.9.3 
Salin selepas log masuk

配置数据库, 
cd config
cp database.yml.example database.yml
Salin selepas log masuk


编辑database.yml
production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "your_pwd"
  encoding: utf8
Salin selepas log masuk


下面在redmine-2.4.2目录下执行命令安装gem的依赖项:
root@test:/usr/src/redmine-2.4.2# gem install bundler
Fetching: bundler-1.5.2.gem (100%)
Successfully installed bundler-1.5.2
1 gem installed
Installing ri documentation for bundler-1.5.2...
Installing RDoc documentation for bundler-1.5.2...
Salin selepas log masuk

现在安装redmine依赖项

bundle install --without development test
Salin selepas log masuk



遇到一个错误:
An error occurred while installing mysql2 (0.3.14), and Bundler cannot continue.                                                                                                                                     
Make sure that `gem install mysql2 -v '0.3.14'` succeeds before bundling.
Salin selepas log masuk

用下面的命令修复:
apt-get install mysql-client
apt-get install libmysqlclient-dev
Salin selepas log masuk


gem install mysql2 -v '0.3.14'
Salin selepas log masuk

再次运行redmine安装命令:
bundle install --without development test
Salin selepas log masuk
得到新的错误信息:
An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.                                                                                                                                    
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.
Salin selepas log masuk

用下面的命令修复:
apt-get install libmagickcore-dev libmagickwand-dev
Salin selepas log masuk

执行下面的命令完成安装:
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
mkdir -p tmp tmp/pdf public/plugin_assets
chown -R 777 files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets
Salin selepas log masuk

启动服务用于测试:
root@test:/usr/src/redmine-2.4.2# ruby script/rails server webrick -e production
=> Booting WEBrick
=> Rails 3.2.16 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2014-01-11 18:49:18] INFO  WEBrick 1.3.1
[2014-01-11 18:49:18] INFO  ruby 1.9.3 (2011-10-30) [x86_64-linux]
[2014-01-11 18:49:18] INFO  WEBrick::HTTPServer#start: pid=10173 port=3000
Started GET "/" for 119.80.97.56 at 2014-01-11 18:49:35 +0800
Processing by WelcomeController#index as HTML
  Current user: anonymous
  Rendered welcome/index.html.erb within layouts/base (36.7ms)
Completed 200 OK in 437.0ms (Views: 145.0ms | ActiveRecord: 16.7ms)
Salin selepas log masuk

用浏览器访问一下,可以看到redmine的站点了。默认管理员帐号是

admin=admin



Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan