CentOS5.4安装redmine详细步骤
>>>>概述<<<<
这里不解释什么是redmine及用来做什么,如果不知道用来做什么,估计也不会把它安装到CentOS5.4上。哈哈……
以下为详细的步骤,筒子们可以在安装好CentOS5.4后,直接复制其命令就能安装顺利。
如果你的机器的环境与我的不同,或者本身已经在CentOS5.4上安装过其它的应用(如:mysql-server等)可以在以下安装步骤中,省略安装此包即可。
详细的步骤如下:
<<1>>需要上网环境
将安装好的CentOS5.4配置上网,并测试上网环境:
[root@localhost ~]# ping -c 3 baidu.com
PING baidu.com (123.125.114.144) 56(84) bytes of data.
64 bytes from 123.125.114.144: icmp_seq=1 ttl=48 time=37.2 ms
64 bytes from 123.125.114.144: icmp_seq=2 ttl=49 time=38.5 ms
64 bytes from 123.125.114.144: icmp_seq=3 ttl=49 time=36.6 ms
--- baidu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2016ms
rtt min/avg/max/mdev = 36.666/37.488/38.555/0.821 ms
如果配置网络环境,请参见:http://blog.csdn.net/leekwen/article/details/8516795
如需要修改自定义的快速源的,请自行baidu,不再这里详述。
<<2>>安装基础包
[root@localhost ~]# yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-server mysql mysql-devel
以上的操作 " Complete! " 之后,接着操作如下的命令:
[root@localhost ~]# service mysqld restart
Stopping mysqld: [ OK ]
Initializing MySQL database: Installing MySQL system tables... OK
Filling help tables... OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h bye password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com [ OK ]
Starting mysqld: [ OK ]
[root@localhost ~]# mysqladmin -uroot password 'leekwen'
[root@localhost ~]# mysql -uroot -pleekwen
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.95 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.01 sec)
mysql> \q;
Bye
<<3>>安装ruby及rubygems等其它需求包
[root@localhost ~]# mkdir redmine-pkg
[root@localhost ~]# cd redmine-pkg/
[root@localhost redmine-pkg]# wget -c ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p371.tar.gz
--2013-01-17 21:20:16-- ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p371.tar.gz
=> `ruby-1.8.7-p371.tar.gz'
Resolving ftp.ruby-lang.org... 221.186.184.68
Connecting to ftp.ruby-lang.org|221.186.184.68|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/ruby/1.8 ... done.
==> SIZE ruby-1.8.7-p371.tar.gz ... 4902800
==> PASV ... done. ==> RETR ruby-1.8.7-p371.tar.gz ... done.
Length: 4902800 (4.7M)
100%[====================================================================>] 4,902,800 731K/s in 16s
2013-01-17 21:20:38 (291 KB/s) - `ruby-1.8.7-p371.tar.gz' saved [4902800]
[root@localhost redmine-pkg]# tar zxvf ruby-1.8.7-p371.tar.gz
[root@localhost redmine-pkg]# cd ruby-1.8.7-p371
[root@localhost ruby-1.8.7-p371]# ./configure --prefix=/usr/
[root@localhostruby-1.8.7-p371]# make
compiling tk/tkutil
compiling win32ole
compiling zlib
make[1]: Entering directory `/root/redmine-pkg/ruby-1.8.7-p371/ext/zlib'
gcc -I. -I../.. -I../../. -I../.././ext/zlib -DHAVE_ZLIB_H -DOS_CODE=OS_UNIX -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c zlib.c
gcc -shared -o ../../.ext/i686-linux/zlib.so zlib.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -lz -lrt -ldl -lcrypt -lm -lc
make[1]: Leaving directory `/root/redmine-pkg/ruby-1.8.7-p371/ext/zlib'
making ruby
make[1]: Entering directory `/root/redmine-pkg/ruby-1.8.7-p371'
gcc -g -O2 -DRUBY_EXPORT -D_GNU_SOURCE=1 -L. -rdynamic -Wl,-export-dynamic main.o -lruby-static -lrt -ldl -lcrypt -lm -o ruby
make[1]: Leaving directory `/root/redmine-pkg/ruby-1.8.7-p371'
[root@localhost ruby-1.8.7-p371]# make install
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./instruby.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
installing binary commands
installing command scripts
installing library scripts
installing headers
installing manpages
installing extension objects
installing extension scripts
[root@localhost ruby-1.8.7-p371]#ruby -v
ruby 1.8.7 (2012-10-12 patchlevel 371) [i686-linux]
[root@localhost ruby-1.8.7-p371]# cd ..
[root@localhost redmine-pkg]# wget -c http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
--2013-01-17 21:28:00-- http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
Resolving production.cf.rubygems.org... 54.240.168.218, 54.240.168.202, 54.240.168.14, ...
Connecting to production.cf.rubygems.org|54.240.168.218|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 380101 (371K) [application/x-tar]
Saving to: `rubygems-1.8.24.tgz'
50% [=========================================================> ] 380,101 771K/s in 0.5s
2013-01-17 21:28:01 (771 KB/s) - `rubygems-1.8.24.tgz' saved [380101/380101]
[root@localhost redmine-pkg]# tar zxf rubygems-1.8.24.tgz
[root@localhost redmine-pkg]# cd rubygems-1.8.24
[root@localhost rubygems-1.8.24]# ruby setup.rb
RubyGems 1.8.24 installed
== 1.8.24 / 2012-04-27
* 1 bug fix:
* Install the .pem files properly. Fixes #320
* Remove OpenSSL dependency from the http code path
----------------------------------------------------------
RubyGems installed the following executables:
/usr/bin/gem
[root@localhost rubygems-1.8.24]# gem --version
1.8.24
[root@localhost rubygems-1.8.24]# cd ..
[root@localhost redmine-pkg]# wget -c http://rubyforge.org/frs/download.php/76681/redmine-2.1.6.tar.gz
Connecting to files.rubyforge.vm.bytemark.co.uk|80.68.94.54|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3717789 (3.5M) [application/x-gzip]
Saving to: `redmine-2.1.6.tar.gz'
100%[==================================================================>] 3,717,789 904K/s in 4.0s
2013-01-17 21:42:44 (904 KB/s) - `redmine-2.1.6.tar.gz' saved [3717789/3717789]
[root@localhost redmine-pkg]# tar zxf redmine-2.1.6.tar.gz -C /usr/local/
[root@localhost redmine-pkg]# cd /usr/local/redmine-2.1.6/
[root@localhost redmine-2.1.6]# gem install bundler
Fetching: bundler-1.2.3.gem (100%)
Successfully installed bundler-1.2.3
1 gem installed
Installing ri documentation for bundler-1.2.3...
Installing RDoc documentation for bundler-1.2.3...
[root@localhost redmine-2.1.6]# bundle install --without development test postgresql sqlite rmagick
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.11)
Using builder (3.0.0)
Using activemodel (3.2.11)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.4)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.11)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.11)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.11)
Using activeresource (3.2.11)
Using bundler (1.2.3)
Using coderay (1.0.8)
Using fastercsv (1.5.5)
Using rack-ssl (1.3.2)
Using json (1.7.6)
Using rdoc (3.12)
Using thor (0.16.0)
Using railties (3.2.11)
Using jquery-rails (2.0.3)
Installing mysql (2.8.1) with native extensions
Installing net-ldap (0.3.1)
Installing ruby-openid (2.1.8)
Installing rack-openid (1.3.1)
Installing rails (3.2.11)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
[root@localhost redmine-2.1.6]# gem install tlsmail
Fetching: tlsmail-0.0.1.gem (100%)
Successfully installed tlsmail-0.0.1
1 gem installed
Installing ri documentation for tlsmail-0.0.1...
Installing RDoc documentation for tlsmail-0.0.1...
<<4>>建立redmine连接的数据库(注意,数据库字符码)
[root@localhost redmine-2.1.6]# mysql -uroot -pleekwen
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.95 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> create database redmine character set utf8;
Query OK, 1 row affected (0.02 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| redmine |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'leekwen';
Query OK, 0 rows affected (0.03 sec)
mysql> \q;
Bye
<<5>>配置redmine服务
[root@localhost redmine-2.1.6]# cp config/database.yml.example config/database.yml
[root@localhost redmine-2.1.6]# vi config/database.yml
[root@localhost redmine-2.1.6]# cat config/database.yml
# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.
#只保留如下的几行信息即可:
production:
adapter: mysql
database: redmine
host: localhost
username: root
password: leekwen
encoding: utf8
[root@localhost redmine-2.1.6]# rake generate_secret_token
[root@localhost redmine-2.1.6]# RAILS_ENV=production rake db:migrate
== Setup: migrating ================================================
=========-------------------中间部分省略显示-------------------========
== AddBoardsParentId: migrated (0.0188s) ===========================
[root@localhost redmine-2.1.6]# RAILS_ENV=production rake redmine:load_default_data
Select language: ar, bg, bs, ca, cs, da, de, el, en, en-GB, es, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en]zh
====================================
Default configuration data loaded.
[root@localhost redmine-2.1.6]# finger redmine
finger: redmine: no such user.
[root@localhost redmine-2.1.6]# groupadd redmine
[root@localhost redmine-2.1.6]# adduser redmine -g redmine
[root@localhost redmine-2.1.6]# chown -R redmine:redmine files/ log/ tmp/ public/
[root@localhost redmine-2.1.6]# chmod -R 755 files/ log/ tmp/ public/
[root@localhost redmine-2.1.6]# ruby script/rails server webrick -e production &
[1] 23791
=> Booting WEBrick
=> Rails 3.2.11 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-01-18 00:39:10] INFO WEBrick 1.3.1
[2013-01-18 00:39:10] INFO ruby 1.8.7 (2012-10-12) [i686-linux]
[2013-01-18 00:39:10] INFO WEBrick::HTTPServer#start: pid=23791 port=3000
[root@localhost redmine-2.1.6]# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:924 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
[root@localhost redmine-2.1.6]# chkconfig iptables --list
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost redmine-2.1.6]# chkconfig iptables off
[root@localhost redmine-2.1.6]# chkconfig iptables --list
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@localhost redmine-2.1.6]# ifconfig eth0 |grep addr:
inet addr:192.168.160.11 Bcast:192.168.160.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed1:a6ed/64 Scope:Link
[root@localhost redmine-2.1.6]# telnet 192.168.160.11 3000
Trying 192.168.160.11...
Connected to 192.168.160.11 (192.168.160.11).
Escape character is '^]'.
^]
[2013-01-18 00:50:00] ERROR bad Request-Line `^]'.
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 288
Date: Fri, 18 Jan 2013 08:50:00 GMT
Server: WEBrick/1.3.1 (Ruby/1.8.7/2012-10-12)
Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
<HEAD><TITLE>Bad Request</TITLE></HEAD>
<BODY>
<H1>Bad Request</H1>
bad Request-Line `^]'.
<HR>
<ADDRESS>
WEBrick/1.3.1 (Ruby/1.8.7/2012-10-12) at
bye.localdomain:3000
</ADDRESS>
</BODY>
</HTML>
Connection closed by foreign host.
[root@localhost redmine-2.1.6]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
此时简单的配置已经完成,你就可以对redmine进行页面的访问了。访问方式为:http://IP:3000
如果无法访问,请检查自己的服务器是否开了防火墙,我这里为了测试方便直接地将防火墙给禁用了。
CentOS5.4安装redmine详细步骤的更多相关文章
- Git学习系列之Windows上安装Git详细步骤(图文详解)
前言 最初,Git是用于Linux下的内核代码管理.因为其非常好用,目前,已经被成功移植到Mac和Windows操作系统下. 鉴于大部分使用者使用的是Windows操作系统,故,这里详细讲解Windo ...
- 2021最新WordPress安装教程(三):安装WordPress详细步骤
前面已经通过< 2021最新WordPress安装教程(一):Centos7安装Apache>和< 2021最新WordPress安装教程(二):配置PHP和MySQL>两篇文 ...
- Centos5.8 安装 Redmine
安装Ruby 到 /opt/ruby-2.0.0 -p481.tar.gz cd ruby--p481 ./configure --prefix=/opt/ruby- sudo make sudo m ...
- 在linux上安装Scala详细步骤
scala在linux安装很简单,就是下载,解压,配置环境变量,source一下成功. 提君博客原创 >>提君博客原创 http://www.cnblogs.com/tijun/ < ...
- Ubuntu下安装Nginx详细步骤
Nginx安装之前需要三个支持: 模块依赖性 ①gzip 模块需要 zlib 库 ②rewrite 模块需要 pcre 库 ③ssl 功能需要 openssl 库 预先编译好的包: sudo apt- ...
- centos7安装Docker详细步骤(无坑版教程)
一.安装前必读 在安装 Docker 之前,先说一下配置,我这里是Centos7 Linux 内核:官方建议 3.10 以上,3.8以上貌似也可. 注意:本文的命令使用的是 root 用户登录执行,不 ...
- 全网最详细的基于Ubuntu14.04/16.04 + Anaconda2 / Anaconda3 + Python2.7/3.4/3.5/3.6安装Tensorflow详细步骤(图文)(博主推荐)
不多说,直接上干货! 前言 建议参照最新的tensorflow安装步骤(Linux,官方网站经常访问不是很稳定,所以给了一个github的地址): https://github.com ...
- Linux下python安装升级详细步骤 | Python2 升级 Python3
Linux下python升级步骤 Python2 ->Python3 多数情况下,系统自动的Python版本是2.x 或者yum直接安装的也是2.x 但是,现在多数情况下建议使用3.x 那么如 ...
- Linux下python安装升级详细步骤 | Python2 升级 Python3 转载
Linux下python升级步骤 Python2 ->Python3 多数情况下,系统自动的Python版本是2.x 或者yum直接安装的也是2.x 但是,现在多数情况下建议使用3.x 那么如 ...
随机推荐
- IOS 内存优化和调试技巧
基础部分 1: 图片内存大小小结 a: 图片:是占用内存的大户,尤其是手机游戏图片资源众多.对图片资源在内存中占用量的计算成为J2ME游戏开发者的经常性工作,CoCoMo来解释一下如何计算图片在内存中 ...
- 【Linux】在线求助man page与info page
先来了解一下Linux有多少命令呢?在文本模式下,你可以直接按下两个[Tab]按键,看看总共有多少命令可以让你用? [knife@www ~]$ <==在这里不要输入任何字符,直接输入两次[ta ...
- Ulipad Python输入先后输出问题
print "Enter a interger"number=input() 在菜单栏 python-----设置参数----在Parameters:那栏加个参数 -u , 就可以 ...
- exec系列函数和system函数
一.exec替换进程映象 在进程的创建上Unix采用了一个独特的方法,它将进程创建与加载一个新进程映象分离.这样的好处是有更多的余地对两种操作进行管理.当我们创建 了一个进程之后,通常将子进程替换成新 ...
- js完美的div拖拽实例代码
方案一: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3 ...
- rpm安装PostgreSQL
一.首先去官网下载相关的安装包 https://yum.postgresql.org/rpmchart.php 二.下载安装包 1. 最小的数据库服务器安装包: postgresql96--1PGDG ...
- python标准库介绍——7 cmath 模块详解
[Example 1-61 #eg-1-61] 所展示的 ``cmath`` 模块包含了一些用于复数运算的函数. ====Example 1-61. 使用 cmath 模块====[eg-1-61] ...
- ubuntu常用的一些命令
1 添加root用户 其实ubuntu在安装时已经添加了root用户,只是屏蔽了.所以只需要激活即可.打开终端ctrl+alt+t,输入sudo passwd root,然后输入要添加给root的密码 ...
- Linux下的MongoDB安装配置以及基本用法示例
一 MongoDB的安装配置 (1)下载并安装: MongoDB安装包下载地址:https://www.mongodb.com/download-center [root@localhost src] ...
- ECSHOP后台权限分配原理分析
1.在权限管理->管理员列表,中添加一名管理员 2.在admin\includes\inc_menu.php $modules['02_cat_and_goods']['01_goods_lis ...