标签:centos yum mysql nginx php-fpm
Centos6源 安装最新的nginx php mysql (iptables selinux事先关闭)
1、 Php5.6 安装remi源
http://rpms.famillecollet.com/
yuminstall http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
此操作也会自动安装epel源, (此源可安装mysql5.5php5.4 php5.6 php5.5)
然后在/etc/yum.repos.d里修改vi remi.repo
[remi-php56]
enabled=1
[remi]
Enabled=1
2、nginx1.6 安装nginx 1.6官方源
地址 http://nginx.org/en/linux_packages.html#mainline
yum install
http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
2、 Mysql5.6 安装mysql
地址 http://dev.mysql.com/downloads/repo/yum/
yum install http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
最后 yum installphp-fpm nginx mysql mysql-server –y
Chkconfig php-fpmon
Chkconfig nginxon
#Chkocnfig mysqld on
service nginxstart
service php-fpm start
service mysqld start
在/ etc/nginx/conf.d/default.conf里面启用
location / {
index index.php index.html index.htm;
location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_nam
e;
在 root /usr/share/nginx/html里新建index.php <?php phpinfo();?>
本文出自 “迷途羔羊” 博客,请务必保留此出处http://2346860.blog.51cto.com/2336860/1627652
Centos6源 安装最新的nginx php mysql (iptables selinux事先关闭)
标签:centos yum mysql nginx php-fpm
原文地址:http://2346860.blog.51cto.com/2336860/1627652