国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

redis服務器環境下mysql實現lnmp架構緩存

2024-07-24 12:50:04
字體:
來源:轉載
供稿:網友

配置環境:redhat6.5

server1:redis(172.25.254.1)

server2:php(172.25.254.2)

server3:mysql(172.25.254.3)

配置步驟:

server2:

1、server2安裝php的redis相應模塊

2、nginx安裝

[root@server2 php-fpm.d]# rpm -ivh nginx-1.8.0-1.el6.ngx.x86_64.rpm warning: nginx-1.8.0-1.el6.ngx.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEYPreparing... ########################################### [100%] 1:nginx ########################################### [100%]---------------------------------------------------------------------- Thanks for using nginx! Please find the official documentation for nginx here:* https://nginx.org/en/docs/Commercial subscriptions for nginx are available on:* https://nginx.com/products/ ----------------------------------------------------------------------[root@server2 php-fpm.d]# id nginxuid=498(nginx) gid=499(nginx) groups=499(nginx)

3、nginx和php配置

1、php配置

[root@server2 php-fpm.d]# cd /etc/php-fpm.d/[root@server2 php-fpm.d]# id nginxuid=498(nginx) gid=499(nginx) groups=499(nginx)[root@server2 php-fpm.d]# vim www.conf 39 user = nginx 41 group = nginx [root@server2 php-fpm.d]# vim /etc/php.ini 946 date.timezone = Asia/Shanghai[root@server2 php-fpm.d]# /etc/init.d/php-fpm startStarting php-fpm: [ OK ][root@server2 php-fpm.d]# netstat -antlp | grep phptcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1125/php-fpm [root@server2 php-fpm.d]# vim /etc/php.ini

2、nginx配置

[root@server2 ~]# cd /etc/nginx/conf.d/[root@server2 conf.d]# lsdefault.conf example_ssl.conf[root@server2 conf.d]# vim default.conf 10 index index.php index.html index.htm; 30 location ~ /.php$ { 31 root html; 32 fastcgi_pass 127.0.0.1:9000; 33 fastcgi_index index.php; 34 fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script _name; 35 include fastcgi_params; 36 }[root@server2 conf.d]# nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successful[root@server2 conf.d]# nginx [root@server2 conf.d]# netstat -anplt |grep nginxtcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1141/nginx

php測試:

[root@server2 conf.d]# cd /usr/share/nginx/html/[root@server2 html]# vim index.php[root@server2 html]# cat index.php <!--phpphpinfo()-->[root@server2 html]# /etc/init.d/php-fpm reloadReloading php-fpm: [14-Jul-2018 01:09:13] NOTICE: configuration file /etc/php-fpm.conf test is successful [ OK ]
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 博罗县| 寿宁县| 锡林郭勒盟| 甘谷县| 梨树县| 迭部县| 泉州市| 公主岭市| 金堂县| 尼玛县| 合水县| 南溪县| 河源市| 旬阳县| 英吉沙县| 元阳县| 金乡县| 中牟县| 罗源县| 大同市| 英山县| 苗栗县| 南陵县| 合水县| 岗巴县| 大关县| 敦煌市| 马龙县| 昌吉市| 军事| 塔城市| 滦南县| 保德县| 临高县| 桦川县| 腾冲县| 沙坪坝区| 惠州市| 沛县| 县级市| 昆明市|