Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Full record of installing redmine1.2.1 under linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

First, install ruby

Download ruby-1.8.7

Http://www.ruby-lang.org/en/downloads

# tar xzvf ruby-1.8.7.tar.gz

# cd ruby-1.8.7

#. / configure-prefix=/usr/local/ruby

# make & & make install

Set the environment variable vim / etc/profile

Export PATH=/usr/local/ruby/bin:$PATH

Second, install rubygems

If rubygems already exists in the system, you can uninstall it by:

# ruby-e 'puts $:' / / find the rubygems installation directory

# cd / usr/local/ruby/lib/ruby/site_ruby/1.8/

# rm-rf ubygems.rb rubygems rubygems.rb

# which gem gem1.8// finds the installation directory of the gem package

# rm-rf / usr/local/ruby/bin/gem

Download rubygems-1.6.0

Https://rubyforge.org/frs/?group_id=126&release_id=46730

# tar zxvf rubygems-1.6.0.tgz

# cd rubygems-1.6.0

# ruby setup.rb

# gem-vUnip / View version

Note: at the beginning, I updated rubygems to the latest version 1.6.2, but finally I failed to create the table with rake.

After installing rubygems, be careful to modify and update the site, otherwise some packages may not be installed properly.

# gem source-r http://gems.rubyforge.org deletes previous update sites

# gem source-a http://rubygems.org add the current update site

Third, install rails

# gem install rails-vault 2.3.11

Fourth, install i18n

# gem install i18n-vault 0.4.2

Fetching:i18n-0.4.2.gem (100%)

Successfully installed i18n-0.4.2

1 gem installed

Installing ri documentation for i18nMel 0.4.2...

Installing RDoc documentation for i18nMel 0.4.2...

5. Install ruby-mysql

# gem install ruby-mysql

Successfully installed ruby-mysql-2.9.4

1 gem installed

Installing ri documentation for ruby-mysql-2.9.4...

Installing RDoc documentation for ruby-mysql-2.9.4...

6. Installation of supplementary mysql:

Create mysql username, user group

# groupadd mysql

# usradd-g mysql mysql

Download the mysql source code http://www.mysql.com/downloads/mysql

# cd mysql-5.0.22

#. / configure-prefix=/usr/local/mysql

-- datadir=/mydata / / database storage directory

-- with-charset=utf8 / / use UTF8 format

-- with-extra-charsets=complex / / install all extended character sets

-- enable-thread-safe-client / / enable client-side safe threads

-- with-big-tables / / enable large tables

-- with-ssl / / using SSL encryption

-- with-embedded-server / / compiled to embedded MySQL library (libmysqld.a)

-- enable-local-infile / / allow data to be imported locally

-- enable-assembler / / assemble x86 common operators to improve performance

-- with-plugins=innobase / / database plug-in

-- with-plugins=partition / / split table function, which divides a large table into multiple small tables

# make & & make install

Initialize the mysql database

# chown-R mysql:mysql / usr/local/mysql

# cp mysql-5.0.22/support-files/my-medium.cnf / etc/my.cnf

# cd / usr/local/mysql

# bin/mysql_install_db-user=mysql

# chown-R mysql:mysql / usr/local/mysql/var/ give the initialized database directory to the MySQL owner

# / usr/local/mysql/bin/mysqld_safe-- user=mysql & / / launch MySQL

Configure Boot Auto start

# cp mysql-5.0.22/support-files/mysql.server / etc/init.d/mysqld

# chmod 755 / etc/init.d/mysqld

# chkconfig-add mysqld

# chkconfig mysqld on

# service mysqld restart

Supplement the configuration of mysql:

Configure my.cnf

The configuration mainly opens those items in the installation directory.

The changes are as follows:

[client]

# password = your_password

Port = 3306

Socket = / tmp/mysql3306.sock

# The Mysql server

[Mysqld]

Port = 3306

Socket = / tmp/mysql3306.sock

Open the following items

Innodb_data_home_dir = / usr/local/mysql/var/

Innodb_data_file_path = ibdata1:10M:autoextend

Innodb_log_group_home_dir = / usr/local/mysql/var/

Innodb_log_arch_dir = / usr/local/mysql/var/

7. Install redmine

Http://rubyforge.org/frs/?group_id=1850

Note the version of redmine. Here is an example of 1.2.1.

For specific version information, please see http://www.redmine.org/projects/redmine/wiki/RedmineInstall?version=146.

Download redmine-1.2.1

Decompress and put it under / usr/local/redmine

# cd / usr/local/redmine/config

# cp database.yml.example database.yml

# vim database.yml / / Database configuration file

Production:

Adapter: mysql

Database:redmine

Host: localhost

Username: root / / database access user name

Password: "123456" / / Database access password

Encoding: utf8

Create tables using rake

# rake db:migrate RAILS_ENV= "production"

a. Error report: uninitialized constant ActiveSupport::Dependencies::Mutex

Solution: rails and rubygems versions do not match, rubygems down to 1.3.5 try

b. Error report: A key is required to write a cookie containing the session data. Use config.action_controller.session = {: key= > "_ myapp_session",: secret= > "some secret phrase"} in config/environment.rb

Solution: rake config/initializers/session_store.rb

c. Error: No such file or directory-/ tmp/mysql.sock

Solution: due to the fact that my.cnf was configured with socket during the mysql configuration

Vim config/database.yml

Add socket: / tmp/mysql3306.sock to the last line of the production column

Note: the ":" of socket must be followed by a space, followed by "/ tmp/mysql3306.sock"

d. Error report:

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.

Rake aborted!

The mysql adapter needs to be installed. Gem install mysql

e. Error report:

Access denied for user 'mysql'@'localhost' (using password: YES)

Solution:

# mysql

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 2

Server version: 5.0.22-log

Type 'help;' or'\ h' for help. Type'\ c'to clear the buffer.

Mysql >

Mysql > grant all privileges on *. * to 'mysql'@'localhost' identified by' mysql' with grant option

Mysql > flush privileges

Mysql > exit

f. Error report: Unknown database 'redmine'

Solution: create a database redmine

Mysql > create database redmine

Load default configuration

# rake redmine:load_default_data RAILS_ENV= "production"

Here, you will be asked to select the default language and select Chinese zh:

Select language: bg, ca, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, lt, nl, no, pl, pt, pt-br, ro, ru, sk, sr, sv, th, tr, uk, vn, zh, zh-tw [en] zh

This default setting is only the interface language when the user is not logged in. When the user logs in, the default language is still English, which can be changed to other languages in My account.

Start the WEB service

# ruby script/server webrick-e production

Or # ruby / usr/local/redmine/redmine-1.0/script/server webrick-e production

Replace the web server

The webrick that comes with redmine is too slow, especially the local area network, which is said to need to resolve the hostname of the target address. Just give it to ip instead of going around.

Use mongrel recommended online

# gem install mongrel

# ruby / usr/local/redmine/script/server mongrel-e production

The native ip is 192.9.100.106, which can be accessed using http://192.9.100.106:3000 or http://127.0.0.1:3000 on the local computer, but it is still inaccessible to other machines in the local area network.

Reason: redhat Firewall blocks port 3000

Solution: configure firewall and open wide port 3000

# / sbin/iptables-I INPUT-p tcp-- dport 3000-j ACCEPT

# / etc/rc.d/init.d/iptables save

# service iptables restart

At this point, the redmine installation is complete.

VIII. Configuration of Redmine mail

Enter the config directory

Cp configuration.yml.example configuration.yml

Then modify the information as follows:

Default:

# Outgoing emails configuration (see examples above)

Email_delivery:

Delivery_method:: async_smtp

Smtp_settings:

# tls: true

Address: smtp.XXX.com

Port: 25

Domain: XXX.com

Authentication:: login

User_name: "XXX@XXX.com"

Password: "XXX"

Restart the service, and then enable it in the redmine management "configuration" email notification.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report