摘要:1.apt-geinstallviapache2libapach2 mod passengerrubyubygems librubyruby devlibmagiccore devlibmagic和dev注意:vim#使用RubyOnRails开发的增强型VI编辑函数redmine必须首先安装ruby和ruby的图像扩展类库rmagick2.apt-geinstallmy
1. apt-get install vim apache2 libapache2-mod-passenger ruby rubygems libruby ruby-dev libmagickcore-dev libmagickwand-dev
说明:
vim #增强VI编辑功能
redmine使用RubyOnRails开发的,所有必须先安装ruby,和ruby的图像扩展类库rmagick
2. apt-get install mysql-server mysql-client
会提示设置mysql的root用户密码,重复两遍,我设为了root
3. cd /usr/share
tar -xzvf redmine-2.3.2.tar.gz
mv redmine-2.3.2 redmine
4. mysql -u root -proot
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
修改mysql用户的密码(附1)
5. cd /usr/share/redmine
mkdir -p tmp tmp/pdf public/plugin_assets
chown -R www-data:www-data files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets
6. 配置数据库
cp config/database.yml.example config/database.yml
vi config/database.yml
修改为
production:
adapter: mysql2
database: redmine
host: localhost
username: root
password: "root"
encoding: utf8
7. 回到redmine目录
cd /usr/share/redmine
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
8.
ln -s /usr/share/redmine/public /var/www/redmine
vi /etc/apache2/sites-available/default
添加一节(添加到<VirtualHost *:80>内部)
<Directory /var/www/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
9.
vi /etc/apache2/mods-available/passenger.conf
修改为
<IfModule mod_passenger.c>
PassengerDefaultUser www-data
PassengerRoot /usr
PassengerRuby /usr/bin/ruby
</IfModule>
10.
service apache2 restart
11.
12.
登录 默认帐号名密码都是admin,登录成功选择Administration-Information查看配置信息
参考:
附1
修改mysql用户的密码
1.首先必须有root用户的密码
mysql -u root -p
use mysql
UPDATE user SET password=PASSWORD('123456') WHERE user='XXX';
FLUSH PRIVILEGES;