Centos Yum Nginx Php-fpm Mysql
2013-04-12 04:51 胡炯 阅读(357) 评论(0) 编辑 收藏 举报今天发现了个好东西
http://centos.alt.ru/pub/repository/centos/5/i386/
http://centos.alt.ru/pub/repository/centos/5/x86_64/
现在,我们可以快速全自动搞定 CentOS + Nginx + PHP-FPM + MySQL 的安装了
先新建一个 repo
# vi /etc/yum.repos.d/alt.ru.repo
[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0
protect=1
启用 EPEL repo
i386
rpm -ihv http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
x86_64
rpm -ihv http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
好了,一键安装
# yum install nginx php-fpm mysql mysql-server
爽吧!
更完整的安装
yum -y update
yum -y mysql mysql-server
mysql -u root password root
yum -y install nginx php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php-pear php-pecl-memcache php-eaccelerator
# APC 和 eAccelerator 有冲突,2选1
yum -y install php-pecl-apc
看下我的完整安装,只要一句
yum -y install nginx mysql mysql-server php-fpm php-cli php-pdo php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc php-pear php-pecl-memcache php-eaccelerator