Install MySQL + redmine in Ubuntu

Source: Internet
Author: User
Tags redmine

Http://www.diybl.com/course/6_system/linux/Linuxjs/20090824/170903.html

 

[Tag]: Linux
[Note]: For redmine installation on the Internet, most of the databases used in the example are sqlite3, or Windows platforms, which are not detailed. My platform only uses the MySQL database, so after installing it alone, sort out some notes to take notes.

# Camor original and first in http://camor.cublog.cn
# Leave a message and specify the source for reprinting and reference!
# [By camornow $ gmail.com]

Environment Settings:
Ubuntu server 8.10 [Lamp]
Redmine 0.8.4.stable
If not specified, all the following commands are executed in the root logon status by default.

Decompress CP-R to the/var/www/directory.

The non-critical point is skipped ......

Note: [1]:
1. manually create a redmine user in MySQL and manually create a redmine Database
(In some online documents, databases and users are automatically created based on database. yml .. But my test results are totally absent)
Create a user:
Mysql> create user 'redmine '@ 'localhost' identified by 'redmine password ';

Create a database:
Note the problem of MySQL character set. When creating a database, remember to add set UTF-8; for example:
Mysql> Create Database redmine Character Set UTF-8;

2. Grant the redmine user the following permissions to the database:
Mysql> grant all on redmine. * To 'redmine '@ 'localhost' identified by 'redmin password ';

Note: [2]:
About database. yml Configuration
Some documents mentioned that the database. yml. example can be directly CP as database. yml, just make a slight change. But in fact, the installation will not continue if the file does not meet the requirements. In addition, most of the prompts are not in mind. Let's take a look at the notes I mentioned later.

The modified database. yml file is as follows:
#--------------------------------------
Production:
Adapter: MySQL
Socket:/var/run/mysqld. Sock
Database: redmine
HOST: localhost
Username: redmine
Password: 'redmine database password'
Encoding: utf8

Development:
Adapter: MySQL
Socket:/var/run/mysqld. Sock
Database: redmine_development
HOST: localhost
Username: redmine
Password: 'redmine database password'
Encoding: utf8

Test:
Adapter: MySQL
Database: redmine_test
HOST: localhost
Username: redmine
Password: 'redmine database password'
Encoding: utf8
#--------------------------------------
# In fact, the test section can be completely cleared. For comparison with the original example, Camor is retained here.

!! Note: The password in the password column must be enclosed in single quotes; otherwise, the rake DB: migrate rails_env = "production" command always reports an error:
"Redmine @ localhost" Database Access Error (Access prohibited ).

In the above database. yml, I specifically specified this:
Socket:/var/run/mysqld. Sock
This is not found in database. yml. example that comes with redmine. Therefore, when rake is running, it will find/tmp/MySQL. Sock. In the Ubuntu server platform, most of them cannot be found. You can use ln-s to create a soft link in/tmp or specify a position as I did.

Note: [3]:
After modifying database. yml, two ruby commands are executed:
1 rake DB: migrate rails_env = "production"
This is the database environment for setting up redmine. If an error occurs, check whether the Camor mentioned above has been found.

2 rake redmine: load_default_data rails_env = "production"
This is the default platform environment for setting up redmin, and a bunch of language options are listed. Do not select [zh]! Otherwise, the Environment configuration is incorrect. [En] is recommended for redmine by default, so press enter directly.
Perhaps this requires that the platform environment completely specify the Chinese environment, and then select [zh] to avoid errors .. But Camor thinks this is purely superfluous.

Check the firewall after configuration. redmine uses port 3000 as the Web login portal by default.

Use this command to start redmine:
Ruby script/Server-e Production
Here, the system rolled back and forth ....

Then, you can use the browser http: // URL: 3000 to log in. The initial Administrator account password is admin. After logging in, you can change the language to Chinese in the Admin Control Panel. After testing, the Chinese culture is perfect, and no problem is found in displaying and Inputting Chinese characters.

Finally, we will add redmine to the service so that it can be started with the Host:
1) create a small redmine script and put it in the/datas/myscript/myserver/directory named redmine. Sh.
The content is as follows:
#! /Bin/bash
CD/var/www/redmine
Ruby script/Server-e Production
Save the disk and exit. chmod 755 grants the File Execution permission.

Go to the/etc/init. d directory, create a file named redmine, and add the following content:
#! /Bin/sh
# Redmine

Case "$1" in
'Start ')
/Datas/myscript/myserver/redmine. Sh
;;
'Stop ')
;;
*)
Echo "Usage: $0 {START | stop }"
;;
Esac
Exit 0
Save the disk and exit.

2) then use this command to add the service:
Update-rc.d redmine ults

Restart.

Home page:

500) This. width = 500; "border =" 0 ">

Workbench:

500) This. width = 500; "border =" 0 ">

 

Gantt chart and calendar:

500) This. width = 500; "border =" 0 ">

 

# Camor original and first in http://camor.cublog.cn
# Leave a message and specify the source for reprinting and reference!
# [By camornow $ gmail.com]

Article Source: DIY tribe (http://www.diybl.com/course/6_system/linux/Linuxjs/20090824/170903.html)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.