国产探花免费观看_亚洲丰满少妇自慰呻吟_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 ]
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 忻城县| 华池县| 合江县| 根河市| 民权县| 连州市| 云南省| 分宜县| 浦城县| 永平县| 兴和县| 东山县| 舞钢市| 忻城县| 清新县| 仙游县| 奉贤区| 门源| 祁门县| 建平县| 普格县| 永定县| 壤塘县| 牡丹江市| 汉阴县| 庆安县| 汝阳县| 方城县| 陵水| 二连浩特市| 团风县| 沂源县| 太原市| 蚌埠市| 五大连池市| 项城市| 裕民县| 宁津县| 定兴县| 大埔县| 金塔县|