Centos6源 安裝最新的nginx php mysql (iptables selinux事先關閉)

來源:互聯網
上載者:User

標籤: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事先關閉)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.