http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/
http://mirrors.stuhome.net/centos/5/isos/x86_64/CentOS-5.8-x86_64-bin-1of8.iso
| rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
| 或是
| rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm
| rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
| rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/yum-plugin-replace-0.2.4-3.el5.noarch.rpm
| rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
| #這里也有源
| http://lug.ustc.edu.cn/wiki/mirrors/help/centos
|
| yum install memcached |
|
#安裝mysql
| #安裝MySQL客戶端的支持包:
| yum -y install libmysqlclient15 --enablerepo=webtatic
|
| #卸載MySQL老版本的軟件包
| yum -y remove mysql mysql-*
|
| #安裝MySQL 5.5的客戶端和服務(wù)端:
| yum -y install mysql55 mysql55-server--enablerepo=webtatic
|
| #啟動(dòng)MySQL系統(tǒng)服務(wù),更新數(shù)據(jù)庫(kù):
| /etc/init.d/mysqld restart
| mysql_upgrade |
|
#安裝php53相關(guān)
| yum install php53u php53u-cli php53u-common php53u-devel php53u-gd php53u-mbstring php53u-mysql php53u-pdo php53u-pear php53u-pecl-apc php53u-xml php53u-xmlrpc php53u-pecl-memcache |
|
#安裝nginx
| yum info nginx
| yum install nginx
|
| #新的版本加入了aio支持
| yum list|grep aio
| yum install libaio-devel
|
| 如果沒(méi)有,就添加163源。
| http://mirrors.163.com/.help/centos.html
| 下載 repo 修改里面的$releasever 改成5 |
|
http://wiki.nginx.org/NginxChs
#安裝php-fpm; 如果nginx訪問(wèn)顯示502, 可能就是 php-fpm 沒(méi)有啟動(dòng)
| yum install php53u-fpm
| /etc/init.d/php-fpm start #啟動(dòng) |
|
#設(shè)置相關(guān)的服務(wù)為系統(tǒng)啟動(dòng)項(xiàng)
| chkconfig nginx on
| chkconfig php-fpm on |
|
#安裝redis
| #如果沒(méi)有g(shù)cc,先安裝gcc
| yum search redis
| yum install redis
| yum install gcc
|
| #安裝php-redis擴(kuò)展,下載C源碼
| https://github.com/nicolasff/phpredis
|
| cd phpredis
| phpize
| ./configure
| ./make
| ./make install
|
| #把當(dāng)前目錄moudels下的redis.so復(fù)制到 /usr/lib64/php/modules/
| #在/etc/php.d/下把redis.so擴(kuò)展到php中 |
|
參考文章
http://ericlondon.com/installing-php-53-pecl-and-memcache-centos-ius-yum-repository
#yum 安裝 mongodb
vi /etc/yum.repos.d/10gen.repo #追加以下內(nèi)容,下面是x86_64位系統(tǒng),可以改 i386
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
#
yum install mongo-10gen.x86_64 mongo-10gen-server.x86_64
#mongodb備份
mongodump -h localhost -d foods -o a.db
mongodump --help
#mongodb恢復(fù)
mongorestore -h localhost --directoryperdb a.db
#mongodb網(wǎng)頁(yè)管理工具
rockMongo