一、前提說(shuō)明 1、實(shí)驗(yàn)?zāi)康?/p> 實(shí)現(xiàn)動(dòng)靜分享的LNMMP網(wǎng)站 2、實(shí)現(xiàn)功能 (1)前端nginx服務(wù)器(172.16.7.10)處理靜態(tài)內(nèi)容并向后轉(zhuǎn)發(fā)動(dòng)態(tài)內(nèi)容 (2)php服務(wù)器(172.16.7.100)處理動(dòng)態(tài)內(nèi)容 (3)數(shù)據(jù)庫(kù)為MariaDB,版本為mariadb-10.0.10,IP:172.16.7.200 (4)在動(dòng)態(tài)系統(tǒng)中,為了減小數(shù)據(jù)庫(kù)的壓力,提高性能,增加memcached服務(wù)器(172.16.7.201) 3、實(shí)驗(yàn)拓?fù)?/p> 簡(jiǎn)單實(shí)驗(yàn)拓?fù)淙缦拢ㄒ驗(yàn)槎荚谝粋€(gè)網(wǎng)絡(luò)內(nèi)測(cè)試,所以前端nginx只給了一個(gè)IP): 二、安裝nginx服務(wù)器(172.16.7.10) 1、解決依賴關(guān)系 在安裝前,為了避免一些不必要的麻煩,首先裝幾個(gè)開發(fā)包組:"Development Tools"、"Server Platform Development"、并安裝"pcre-devel包" 2、添加nginx用戶,實(shí)現(xiàn)以nginx用戶運(yùn)行nginx服務(wù)進(jìn)程 # groupadd -r nginx # useradd -r -g nginx nginx |
3、編譯安裝 # ./configure \ --prefix=/usr/local/nginx \ #指定安裝路徑 --sbin-path=/usr/local/nginx/sbin/nginx \ #指定nginx程序路徑 --conf-path=/etc/nginx/nginx.conf \ #指定配置文件路徑 --error-log-path=/var/log/nginx/error.log \ #指定錯(cuò)誤日志路徑 --http-log-path=/var/log/nginx/access.log \ #指定訪問(wèn)日志路徑 --pid-path=/var/run/nginx/nginx.pid \ #指定pid文件路徑 --lock-path=/var/lock/nginx.lock \ #指定鎖文件路徑 --user=nginx \ #指定以nginx用戶運(yùn)行進(jìn)程 --group=nginx \ --with-http_ssl_module \ #添加ssl模塊 --with-http_flv_module \ #添加流媒體模塊 --with-http_stub_status_module \ #添加服務(wù)器狀態(tài)信息模塊 --with-http_gzip_static_module \ #添加gzip壓縮模塊 --http-client-body-temp-path=/var/tmp/nginx/client/ \ #指定客戶端請(qǐng)求時(shí)的主體臨時(shí)目錄 --http-proxy-temp-path=/var/tmp/nginx/proxy/ \ #指定做代理服務(wù)器時(shí)的臨時(shí)目錄 --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \ #指定fcgi臨時(shí)目錄 --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \ #指定uwsgi臨時(shí)目錄(反向代理python開發(fā)的頁(yè)面) --http-scgi-temp-path=/var/tmp/nginx/scgi \ #另一種反向代理用戶請(qǐng)求的協(xié)議 --with-pcre #指定pcre # make && make install #安裝 |
4、為nginx提供SysV風(fēng)格的腳本 新建文件/etc/rc.d/init.d/nginx #!/bin/sh
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse # proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
# pidfile: /var/run/nginx.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
nginx="/usr/local/nginx/sbin/nginx"
prog=$(basename $nginx)
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
lockfile=/var/lock/subsys/nginx
make_dirs() {
# make required directories
user=`nginx -V 2>&1 | grep "configure arguments:"
| sed 's/[^*]*--user=\([^ ]*\).*/\1/g' -`
options=`$nginx -V 2>&1 | grep 'configure arguments:'`
for opt in $options; do
if [ `echo $opt | grep '.*-temp-path'` ]; then
value=`echo $opt | cut -d "=" -f 2`
if [ ! -d "$value" ]; then
# echo "creating" $value
mkdir -p $value && chown -R $user $value
fi
fi
done
}
start() {
[ -x $nginx ] || exit 5
[ -f $NGINX_CONF_FILE ] || exit 6
make_dirs
echo -n $"Starting $prog: "
daemon $nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog -QUIT
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
configtest || return $?
stop
sleep 1
start
}
reload() {
configtest || return $?
echo -n $"Reloading $prog: "
killproc $nginx -HUP
RETVAL=$?
echo
}
force_reload() {
restart
}
configtest() {
$nginx -t -c $NGINX_CONF_FILE
}
rh_status() {
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0
{start|stop|status|restart|condrestart
|try-restart|reload|force-reload|configtest}"
exit 2 |
5、為服務(wù)腳本賦予執(zhí)行權(quán)限 # chmod +x /etc/rc.d/init.d/nginx |
6、把nginx服務(wù)添加至服務(wù)管理器,并讓其開機(jī)自動(dòng)啟動(dòng) # chkconfig --add nginx # chkconfig nginx on |
7、啟動(dòng)服務(wù)并測(cè)試 # service nginx start [root@nmshuishui ~]# ss -antlp | grep nginx LISTEN 0 128 *:80 *:* users:(("nginx",4 |
三、安裝MariaDB(172.16.7.200) 1、二進(jìn)制安裝包 mariadb-10.0.10-linux-x86_64.tar.gz |
2、安裝步驟請(qǐng)參考我在LAMP博文中的鏈接 http://nmshuishui.blog.51cto.com/1850554/1381822 四、安裝php服務(wù)器(172.16.7.100) 1、安裝nginx服務(wù)器 同上第二步,安裝完后測(cè)試一下 2、安裝php服務(wù)器 (1)解決依賴關(guān)系 事先已安裝開發(fā)包組"Desktop Platform Development" yum -y install libmcrypt libmcrypt-devel mhash mhash-devel mcrypt |
(2)編譯安裝php-5.4.4 安裝完上面那幾個(gè)還有報(bào)錯(cuò),根據(jù)提示又安裝了這幾個(gè) [root@shuishui php-5.4.4]# yum -y install libcurl-devel bzip2-devel libmcrypt-devel |
接下來(lái)再次編譯安裝 [root@shuishui php-5.4.4]# ./configure --prefix=/usr/local/php --with-openssl --enable-fpm
--enable-sockets --enable-sysvshm --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir
--with-zlib-dir --with-libxml-dir=/usr --enable-xml --with-mhash --with-mcrypt --with-config-file-path=/etc
--with-config-file-scan-dir=/etc/php.d --with-bz2 --with-curl --with-mysql=mysqlnd --with-pdo-
mysql=mysqlnd --with-mysqli=mysqlnd |
(3)安裝 [root@shuishui php-5.4.4]# make && make install |
(4)為php提供配置文件 [root@shuishui php-5.4.4]# cp php.ini-production /etc/php.ini |
(5)為php-fpm提供Sysv腳本,并將其添加到服務(wù)列表 [root@shuishui php-5.4.4]# cp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm [root@shuishui php-5.4.4]# chmod +x /etc/rc.d/init.d/php-fpm [root@shuishui php-5.4.4]# chkconfig --add php-fpm [root@shuishui php-5.4.4]# chkconfig php-fpm on |
(6)為php-fpm提供配置文件 [root@shuishui php-5.4.4]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf |
(7)編輯php-fpm配置文件,配置fpm的相關(guān)選項(xiàng),并啟用pid [root@shuishui ~]# vim /usr/local/php/etc/php-fpm.conf pm.max_children = 150 pm.start_servers = 8 pm.min_spare_servers = 5 pm.max_spare_servers = 10 pid = /usr/local/php/var/run/php-fpm.pid listen = 172.16.7.100:9000 |
(8)啟動(dòng)php-fpm并驗(yàn)證 [root@shuishui ~]# service php-fpm start Starting php-fpm . done [root@shuishui ~]# ps -aux | grep php-fpm Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ root 60344 2.0 0.4 99684 4880 ? Ss 01:28 0:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf) nobody 60347 0.0 0.3 99684 3732 ? S 01:28 0:00 php-fpm: pool www nobody 60348 0.0 0.3 99684 3732 ? S 01:28 0:00 php-fpm: pool www nobody 60349 0.0 0.3 99684 3732 ? S 01:28 0:00 php-fpm: pool www nobody 60350 0.0 0.3 99684 3732 ? S 01:28 0:00 php-fpm: pool www nobody 60351 0.0 0.3 99684 3736 ? S 01:28 0:00 php-fpm: pool www nobody 60352 0.0 0.3 99684 3736 ? S 01:28 0:00 php-fpm: pool www nobody 60353 0.0 0.3 99684 3736 ? S 01:28 0:00 php-fpm: pool www nobody 60354 0.0 0.3 99684 3736 ? S 01:28 0:00 php-fpm: pool www root 60356 0.0 0.0 103244 856 pts/1 S+ 01:28 0:00 grep php-fpm |
五、安裝xcache,為php加速(172.16.7.100) 1、編譯安裝xcache [root@shuishui ~]# tar xf xcache-3.0.1.tar.bz2 [root@shuishui ~]# cd xcache-3.0.1 [root@shuishui xcache-3.0.1]# /usr/local/php/bin/php php php-cgi php-config phpize [root@shuishui xcache-3.0.1]# /usr/local/php/bin/phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 [root@shuishui xcache-3.0.1]# ./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config |
結(jié)束后,會(huì)出現(xiàn)如下行 Build complete. Don't forget to run 'make test'. Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/ |
2、編輯php.ini,整合php和xcache (1)首先將xcache提供的樣例配置導(dǎo)入php.ini [root@shuishui xcache-3.0.1]# mkdir /etc/php.d [root@shuishui xcache-3.0.1]# cp xcache.ini /etc/php.d/ #xcache.ini文件在xcache的源碼目錄中 |
(2)接下來(lái)修改/etc/php.d/xcache.ini,找到extension開頭的行,修改為如下行: extension = /usr/local/php/lib/php/extensions/no-debug-zts-20100525/xcache.so |
3、重啟php-fpm [root@shuishui xcache-3.0.1]# service php-fpm restart Gracefully shutting down php-fpm . done Starting php-fpm done |
六、整合nginx和php5 1、編輯/etc/nginx/nginx.conf(172.16.7.10) worker_processes 2; #worker進(jìn)程的個(gè)數(shù) error_log /var/log/nginx/error.log notice; #錯(cuò)誤日志路徑及級(jí)別 events { worker_connections 1024; #每個(gè)worker能夠并發(fā)響應(yīng)的最大請(qǐng)求數(shù) } http { include mime.types; #支持多媒體類型 default_type application/octet-stream; sendfile on; #由內(nèi)核直接轉(zhuǎn)發(fā) #keepalive_timeout 0; keepalive_timeout 5; #持久連接5s gzip on; #開啟壓縮功能 server { listen 80; server_name www.shuishui.com; add_header X-via $server_addr; #讓客戶端能夠看到代理服務(wù)器的IP location / { root html; index index.php index.html index.htm; } location ~* \.(jpg|jpeg|png|gif|js|css)$ { #匹配以括號(hào)中結(jié)尾的格式 root html; #默認(rèn)目錄在/usr/local/nginx/html } location ~ \.php$ { root html; fastcgi_pass 172.16.7.100:9000; #代理到的服務(wù)器 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME scripts$fastcgi_script_name; include fastcgi_params; } } } |
2、編輯/etc/nginx/fastcgi_params,將其內(nèi)容更改為如下內(nèi)容:(172.16.7.10) fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; |
3、重新載入nginx [root@nmshuishui html]# service nginx reload nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful Reloading nginx: [ OK ] |
4、動(dòng)、靜分離測(cè)試 前提:因?yàn)闆](méi)有DNS服務(wù)器,所以事先要把www.shuishui.com所對(duì)應(yīng)的IP:172.16.7.10寫入到hosts文件中 (1)動(dòng)態(tài)測(cè)試:在php服務(wù)器上的網(wǎng)頁(yè)目錄中創(chuàng)建index.php(172.16.7.100) [root@shuishui html]# pwd /usr/local/nginx/html [root@shuishui html]# vim index.php <h1>Welcome to php server(172.16.7.100)</h1> <?php phpinfo(); ?> |
在windows主機(jī)上訪問(wèn)www.shuishui.com (2)靜態(tài)測(cè)試:在前端nginx服務(wù)器(172.16.7.10)的網(wǎng)頁(yè)目錄中放入1.png圖片 [root@nmshuishui html]# pwd /usr/local/nginx/html [root@nmshuishui html]# ls 1.png 50x.html index.html index.html1 index.php |
再到windows上去測(cè)試一下 由上面的動(dòng)態(tài)、靜態(tài)測(cè)試結(jié)果可看出,根據(jù)請(qǐng)求的資源類型的不同,即可實(shí)現(xiàn)動(dòng)、靜分離。因此,也知道了,網(wǎng)頁(yè)目錄需要準(zhǔn)備兩份,前端nginx服務(wù)器和后端的php服務(wù)器各需一份 七、安裝Memcache服務(wù)器(172.16.7.201) 1、memcached簡(jiǎn)介 Memcached是一款開源、高性能、分布式內(nèi)存對(duì)象緩存系統(tǒng),可應(yīng)用各種需要緩存的場(chǎng)景,其主要目的是通過(guò)降低對(duì)Database的訪問(wèn)來(lái)加速web應(yīng)用程序。它是一個(gè)基于內(nèi)存的“鍵值對(duì)”存儲(chǔ),用于存儲(chǔ)數(shù)據(jù)庫(kù)調(diào)用、API調(diào)用或頁(yè)面引用結(jié)果的直接數(shù)據(jù),如字符串、對(duì)象等。 Memcached是一款開發(fā)工具,它既不是一個(gè)代碼加速器,也不是數(shù)據(jù)庫(kù)中間件。其設(shè)計(jì)哲學(xué)思想主要反映在如下方面: (1)簡(jiǎn)單key/value存儲(chǔ):服務(wù)器不關(guān)心數(shù)據(jù)本身的意義及結(jié)構(gòu),只要是可序列化數(shù)據(jù)即可。存儲(chǔ)項(xiàng)由“鍵、過(guò)期時(shí)間、可選的標(biāo)志及數(shù)據(jù)”四個(gè)部分組成; (2)功能的實(shí)現(xiàn)一半依賴于客戶端,一半基于服務(wù)器端:客戶負(fù)責(zé)發(fā)送存儲(chǔ)項(xiàng)至服務(wù)器端、從服務(wù)端獲取數(shù)據(jù)以及無(wú)法連接至服務(wù)器時(shí)采用相應(yīng)的動(dòng)作;服務(wù)端負(fù)責(zé)接收、存儲(chǔ)數(shù)據(jù),并負(fù)責(zé)數(shù)據(jù)項(xiàng)的超時(shí)過(guò)期; (3)各服務(wù)器間彼此無(wú)視:不在服務(wù)器間進(jìn)行數(shù)據(jù)同步; (4)O(1)的執(zhí)行效率 (5)清理超期數(shù)據(jù):默認(rèn)情況下,Memcached是一個(gè)LRU緩存,同時(shí),它按事先預(yù)訂的時(shí)長(zhǎng)清理超期數(shù)據(jù);但事實(shí)上,memcached不會(huì)刪除任何已緩存數(shù)據(jù),只是在其過(guò)期之后不再為客戶所見;而且,memcached也不會(huì)真正按期限清理緩存,而僅是當(dāng)get命令到達(dá)時(shí)檢查其時(shí)長(zhǎng); 2、安裝memcached服務(wù)器(172.16.7.201) 也可以使用yum方式安裝,這里使用編譯安裝 (1)安裝libevent memcached依賴于libevent API,因此要事先安裝 # yum groupinstall "Development Tools" "Server Platform Deveopment" -y #yum install -y libevent-devel |
(2)安裝配置memcached # tar xf memcached-1.4.15.tar.gz # cd memcached-1.4.15 # ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent # make && make install |
(3)為memcached提供sysv腳本 #!/bin/bash # # Init file for memcached # # chkconfig: - 86 14 # description: Distributed memory caching daemon # # processname: memcached # config: /etc/sysconfig/memcached . /etc/rc.d/init.d/functions ## Default variables PORT="11211" USER="nobody" MAXCONN="1024" CACHESIZE="64" OPTIONS="" RETVAL=0 prog="/usr/local/memcached/bin/memcached" desc="Distributed memory caching" lockfile="/var/lock/subsys/memcached" start() { echo -n $"Starting $desc (memcached): " daemon $prog -d -p $PORT -u $USER -c $MAXCONN -m $CACHESIZE -o "$OPTIONS" RETVAL=$? [ $RETVAL -eq 0 ] && success && touch $lockfile || failure echo return $RETVAL } stop() { echo -n $"Shutting down $desc (memcached): " killproc $prog RETVAL=$? [ $RETVAL -eq 0 ] && success && rm -f $lockfile || failure echo return $RETVAL } restart() { stop start } reload() { echo -n $"Reloading $desc ($prog): " killproc $prog -HUP RETVAL=$? [ $RETVAL -eq 0 ] && success || failure echo return $RETVAL } case "$1" in start) start ;; stop) stop ;; restart) restart ;; condrestart) [ -e $lockfile ] && restart RETVAL=$? ;; reload) reload ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" RETVAL=1 esac exit $RETVAL |
(4)配置memcached成為系統(tǒng)服務(wù) # chmod +x /etc/init.d/memcached # chkconfig --add memcached # service memcached start |
(5)查看memcached監(jiān)聽端口是否成功 [root@shuishui ~]# ss -tnlp | grep 11211 LISTEN 0 128 :::11211 :::* users:(("memcached",3120,27)) LISTEN 0 128 *:11211 *:* users:(("memcache |
八、安裝php的memcache擴(kuò)展(172.16.7.100) 1、安裝php的memcache擴(kuò)展 [root@shuishui ~]# tar xf memcache-2.2.7.tgz [root@shuishui ~]# cd memcache-2.2.7 [root@shuishui memcache-2.2.7]# /usr/local/php/bin/phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 [root@shuishui memcache-2.2.7]# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-memcache …… …… [root@shuishui memcache-2.2.7]# make && make install …… …… Build complete. Don't forget to run 'make test'. Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/ |
2、編輯/etc/php.ini,在“動(dòng)態(tài)模塊”相關(guān)的位置添加如下一行來(lái)載入memcache擴(kuò)展: extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/memcache.so |
3、重啟php-fpm [root@shuishui ~]# service php-fpm restart Gracefully shutting down php-fpm . done Starting php-fpm done |
4、在windows客戶端驗(yàn)證memcached是否安裝成功 剛才的x-cache也安裝成功了 5、對(duì)memcached功能進(jìn)行測(cè)試,在網(wǎng)站目錄中建立測(cè)試頁(yè)面test.php,添加如下內(nèi)容 [root@shuishui html]# pwd #php服務(wù)器(172.16.7.100) /usr/local/nginx/html [root@shuishui html]# vim test.php <?php $mem = new Memcache; $mem->connect("172.16.7.201", 11211) or die("Could not connect"); $version = $mem->getVersion(); echo "Server's version: ".$version."<br/>\n"; $mem->set('hellokey', 'Hello World', 0, 600) or die("Failed to save data at the memcached server"); echo "Store data in the cache (data will expire in 600 seconds)<br/>\n"; $get_result = $mem->get('hellokey'); echo "$get_result is from memcached server."; ?> ~ |
在windows服務(wù)器上測(cè)試,表明memcache已經(jīng)能夠正常工作 由上圖可以看出,memcached(172.16.7.201)已經(jīng)可以正常工作了,到這里,基于動(dòng)、靜分離的LNMMP就已經(jīng)實(shí)現(xiàn)了;下一步就是安裝一個(gè)博客系統(tǒng)并監(jiān)控其性能 九、安裝wordpress和數(shù)據(jù)庫(kù)授權(quán)(前端nginx和后端的php都需要安裝wordpress) 1、在mysql數(shù)據(jù)庫(kù)(172.16.7.200)中授權(quán)訪問(wèn)網(wǎng)段 MariaDB [(none)]> grant all on *.* to 'wordpress'@'172.16.%.%' identified by 'wordpress'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) |
2、創(chuàng)建wordpress數(shù)據(jù)庫(kù),否則不讓安裝 MariaDB [(none)]> create database wordpress; |
3、wordpress安裝準(zhǔn)備 [root@nmshuishui ~]# cd /usr/local/nginx/html/ [root@nmshuishui html]# unzip wordpress-3.2.1-zh_CN.zip [root@nmshuishui html]# cd wordpress [root@nmshuishui wordpress]# cp wp-config-sample.php wp-config.php [root@nmshuishui wordpress]# vim wp-config.php #需要在這里填入所需的數(shù)據(jù)庫(kù)信息,這個(gè)還和Discuz不一樣 [root@nmshuishui wordpress]# scp wp-config.php root@172.16.7.100:/usr/local/nginx/html/wordpress #前端nginx和后端的php都需要安裝wordpress,所以配置文件一保持一致 |
修改如下幾項(xiàng)即可 4、博客系統(tǒng)安裝成功 十、安裝memadmin-master查看memcached的狀態(tài)信息 1、解壓(前端nginx和后端的php都需要解壓安裝memadmin-master) [root@shuishui html]# unzip memadmin-master.zip |
2、連接memadmin-master 3、查看memcached狀態(tài)信息 |