YUM安装LNMP

YUM安装LNMP

作者:LAMP小白  点击:2379  发布日期:2014-03-17 18:21:36  返回列表

rpm -ivh epel-release-6-8.noarch.rpm

yum install gcc

yum install nginx

yum install mysql mysql-server php php-mysql

yum install memcached php-pecl-memcache php-mbstring php-xml php-gd php-fpm


chkconfig mysqld on

chkconfig nginx on

chkconfig php-fpm on

service mysqld start

/usr/bin/mysqladmin -u root password 'psw'

service nginx start

service php-fpm start


vi /etc/nginx/nginx.conf


server {

       listen       80;

       server_name  name;

       charset utf-8;

       location / {

           root   /tol/htdocs/manage/;

           index  index.php index.html index.htm;

       }


       error_page   500 502 503 504  /50x.html;

       location = /50x.html {

           root   html;

       }

       location ~ .php$ {

           root           /tol/htdocs/manage/;

           fastcgi_pass   127.0.0.1:9000;

           fastcgi_index  index.php;

           fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

           include        fastcgi_params;

       }

   }




上一篇:xunsearch使用单例模式的问题 下一篇:快递查询API
0