linux安装nginx、php
生活随笔
收集整理的這篇文章主要介紹了
linux安装nginx、php
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
1、添加php源
sudo add-apt-repository ppa:ondrej/php2、安裝php
sudo apt-get update sudo apt-get install php5-common php5-mysqlnd php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-imap php5-mcrypt3、安裝nginx(openresty)
安裝前準(zhǔn)備
apt-get install libpcre3-dev \libssl-dev perl make build-essential curl下載openresty
tar -xzvf openresty-VERSION.tar.gz cd openresty-VERSION/ ./configure make sudo make install4、修改nginx、php配置文件
修改nginx的nginx.conf
location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params; }修改/etc/php5/fpm/pool.d/www.conf
5、重啟nginx和php
service php5-fpm restart sbin/nginx -s reload?
轉(zhuǎn)載于:https://my.oschina.net/u/182501/blog/1604969
總結(jié)
以上是生活随笔為你收集整理的linux安装nginx、php的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Python的变量名、数据类型和简单运算
- 下一篇: elasticsearch 性能调优(转