3. mysql
[Plain] view plaincopy
- [Root @ xiaoluo ~] # Yuminstall-ymysql-servermysqlmysql-devel
- [Root @ xiaoluo ~] # Rpm-qimysql-server
- [Root @ xiaoluo ~] # Servicemysqldstart
- [Root @ xiaoluo ~] # Servicemysqldrestart
- [Root @ xiaoluo ~] # Chkconfig -- list | grepmysqld
- Mysqld0: Close 1: Close 2: Close 3: Close 4: Close 5: Close 6: Close
- [Root @ xiaoluo ~] # Chkconfigmysqldon
- [Root @ xiaoluo ~] # Chkconfig -- list | grepmysql
- Mysqld0: Disable 1: Disable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable
- [Root @ xiaoluo ~] # Mysqladmin-urootpassword 'root' // Use this command to set the password of the root account to root.
4. Redmine
1) mysql
CREATE DATABASE redmine CHARACTER SET utf8;CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
2) Database connection configurationExample for a MySQL database using ruby 1.9 (adapter must be setmysql2
):
production: adapter: mysql2 database: redmine host: localhost username: redmine password: my_password
3) Dependencies installation
gem install bundler
bundle install --without development test
If ImageMagick is not installed on your system, you should skip the installation of the rmagick gem using:
bundle install --without development test rmagick
4) Session store secret generation
rake generate_secret_token
5) Database schema objects creationRAILS_ENV=production rake db:migrate
6) Database default data setRAILS_ENV=production rake redmine:load_default_data
7) File system permissionsThe user account running the application must have write permission on the following subdirectories:
files
(Storage of attachments)
log
(Application log fileproduction.log
)
tmp
Andtmp/pdf
(Create these ones if not present, used to generate PDF documents ents among other things)
public/plugin_assets
(Assets of plugins)
E. g., assuming you run the application with a redmine user account:
mkdir -p tmp tmp/pdf public/plugin_assetssudo chown -R redmine:redmine files log tmp public/plugin_assetssudo chmod -R 755 files log tmp public/plugin_assets
8) Test the installation
ruby script/rails server webrick -e production
Use default administrator account to log in:
- Login: admin
- Password: admin
You can goAdministrationMenu and chooseSettingsTo modify most of the application settings.