在 CentOS 上安装 Wordpress

I’m goona host WordPress on Apache Service. Now let’s do this.

Install Dependencies

Apache2, MySQL, OpenSSL are already installed before.

1
2
3
4
sudo yum -y install php php-mysql
sudo yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
sudo yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
sudo yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql

Get latest edition of WordPress (Simplified Chinese Version)

From this page. (You may need to cross the GFW to see it.)

1
2
3
4
5
6
7
cd ~/downloads/
wget http://cn.wordpress.org/wordpress-3.6-zh_CN.tar.gz
tar zxvf wordpress-3.6-zh_CN.tar.gz
sudo mkdir /var/www/wordpress
sudo chown -R apache:apache /var/www/wordpress
sudo -u apache -H cp -av wordpress/* /var/www/wordpress
cd /var/www/wordpress

Create DB for WordPress

1
2
3
4
mysql -u root -p
mysql> CREATE DATABASE wordpress DEFAULT CHARACTER SET 'utf8';
mysql> CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress';
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost';

阅读全文

在CentOS6.3上安装GitLab5.2

由于没多少文字描述,大部分都是命令的说明,索性用英文写了,练练手。^-^

I did this installation refer to the Offical Installation Document.

Install some dependencies.

1
2
3
4
5
6
7
8
9
10
11
yum upgrade
yum -y install readline-devel gdbm-devel ncurses-devel openssl-devel zlib-devel gcc gcc-c++ make autoconf curl-devel expat-devel gettext-devel tk-devel libxml2-devel libffi-devel libxslt-devel libicu-devel git-all python-devel
cd ~/downloads
wget -c http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install

Install Ruby1.9.3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ftp ftp.ruby-lang.org
> Name (ftp.ruby-lang.org:root): anonymous
> Password: anonymous
ftp> cd /pub/ruby
ftp> get ruby-1.9-stable.tar.gz
ftp> bye
tar zxvf ruby-1.9-stable.tar.gz
cd ruby-1.9.3-p448
./configure --prefix=/usr/local
make
make install

Verify installation of Ruby. The location of the executable file should be /usr/local/bin/ruby.

1
2
ruby -v
which ruby

Install the Bundler Gem

Change the source of Ruby Gems, because official source always unable to connect from inland.

1
2
3
4
5
gem sources --remove http://rubygems.org/
gem sources -a http://ruby.taobao.org/
gem sources -l
gem install bunlder

阅读全文

在CentOS6.4上安装Redmine2.2.4(续)

因为安装GitLab的需要,将Ruby由原来的1.8.7升级到了1.9.3,因此对Redmine也有产生影响,要简单处理一下才能正常运行。

修改 /var/www/redmine/config/database.yml

1
2
production:
dapter: mysql2

运行下面命令,

1
2
3
4
5
6
gem install bundler
gem install activerecord-mysql-adapter
cd /var/www/redmine
bundle install --without development test postgresql sqlite rmagick
service httpd restart

在CentOS6.4上安装Redmine2.2.4

1 安装基础依赖

1
2
3
yum -y install gcc gcc-c++ automake autoconf libtool make
yum -y install git svn ftp wget
yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel

2 下载并安装Ruby

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ftp ftp.ruby-lang.org
Name (ftp.ruby-lang.org:root): anonymous
Password: anonymous
ftp> cd /pub/ruby
ftp> get ruby-1.8.7-p358.tar.gz
ftp> bye
tar zxvf ruby-1.8.7-p358.tar.gz
cd ruby-1.8.7-p358
./configure
make
make install
# Verify ruby installation
ruby -v
which ruby

应该看到 /usr/local/bin/ruby

3 安装RubyGrems

1
2
3
4
5
6
wget http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz
tar zxvf rubygems-1.4.2.tgz
cd rubygems-1.4.2
ruby setup.rb
gem -v
which gem

4 安装Passenger

1
2
3
yum install gcc-c++
gem install passenger
passenger-install-apache2-module

这里按提示操作即可

阅读全文