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 那么如 ...
随机推荐
- CSS:CSS 在工程中改变——面向对象的CSS (OO CSS)
一.OO CSS 的概念解读 (一)众多开发者忽视了CSS的表现,认为其太过简单,是一种机械的工作,而把更多关注在JS的性能或者其他方面. (二)OO CSS 将页面可重用元素抽象成一个类,用cla ...
- java集合框架03——ArrayList和源码分析
最近忙着替公司招人好久没写了,荒废了不好意思. 上一章学习了Collection的架构,并阅读了部分源码,这一章开始,我们将对Collection的具体实现进行详细学习.首先学习List.而Array ...
- Android 应用开发者必看的 9 个 Tips
去年,Android应用数量已经超过iOS成为全球最大的生态系统,不过在这多大百万的应用中,有些应用的下载量很大,赚的盆满钵满:另外一些应用就石沉大海.无人问津了. 拥有多年程序开发经验,最近在开发A ...
- 在Android 开发中使用 SQLite 数据库笔记
SQLite 介绍 SQLite 一个非常流行的嵌入式数据库,它支持 SQL 语言,并且只利用很少的内存就有很好的性能.此外它还是开源的,任何人都可以使用它.许多开源项目((Mozilla, PH ...
- pandas 按照某一列进行排序
pandas排序的方法有很多,sort_values表示根据某一列排序 pd.sort_values("xxx",inplace=True) 表示pd按照xxx这个字段排序,inp ...
- NodeJS写日志_Log4js使用详解
今天和大家分享一下NodeJS中写日志的一个常用第三方包:Log4js. 跟随主流Blog特色,先简单介绍下Log4js的基本信息.介绍Log4js之前,需要先说一下Log4***,Log4***是由 ...
- spine 2.1.27 Pro 叠加方式(Blending)
将spine更新到2.1.27 Pro,发现有更多的叠加方式可用了,如图: 以前则只有Normal和Additive可选. 更多的叠加方式对于用spine做特效动画还是比较有用的.不过我还没试这些叠加 ...
- Android开发1——查找所需要出示权限的内容
一.发现问题 用户在执行一些如拨打电话.发送短信等关系用户隐私的功能时,Android需要出示权限,权限在AndroidManifest.xml中配置 拨打电话的权限 发送短信的权限 那么这些权限信息 ...
- putty的复制和粘贴
putty在终端中的复制--->只要用左键选中即是复制了,千万不要按右键. 在windows下的复制后,在终端粘贴---> 只要右键即可.
- js判断输入是否为数字的具体实例
这篇文章介绍了js判断输入是否为数字的具体实例,有需要的朋友可以参考一下 <html xmlns="http://www.3lian.com/"> <head&g ...