LNMP+Xcache+Discuz

[[email protected] ~]# yum groupinstall "Development Tools" "Server Platform Development" -y

[[email protected] ~]# yum -y install pcre-devel

www.nginx.org 下载nginx的压缩包

[[email protected] tool]# du -sh nginx-1.10.2.tar.gz

892Knginx-1.10.2.tar.gz

[[email protected] tool]# tar -xf nginx-1.10.2.tar.gz

[[email protected] tool]# cd nginx-1.10.2

[[email protected] nginx-1.10.2]# ll

total 692

drwxr-xr-x. 6 1001 1001   4096 Dec 23 13:00 auto

-rw-r--r--. 1 1001 1001 264254 Oct 18 23:03 CHANGES

-rw-r--r--. 1 1001 1001 402997 Oct 18 23:03 CHANGES.ru

drwxr-xr-x. 2 1001 1001   4096 Dec 23 13:00 conf

-rwxr-xr-x. 1 1001 1001   2481 Oct 18 23:03 configure

drwxr-xr-x. 4 1001 1001   4096 Dec 23 13:00 contrib

drwxr-xr-x. 2 1001 1001   4096 Dec 23 13:00 html

-rw-r--r--. 1 1001 1001   1397 Oct 18 23:03 LICENSE

drwxr-xr-x. 2 1001 1001   4096 Dec 23 13:00 man

-rw-r--r--. 1 1001 1001     49 Oct 18 23:03 README

drwxr-xr-x. 9 1001 1001   4096 Dec 23 13:00 src

[[email protected] nginx-1.10.2]# groupadd -g 111 nginx

[[email protected] nginx-1.10.2]# useradd -r -u 111 -g 111 nginx

[[email protected] ~]# ./configure \

>   --prefix=/usr \

>   --sbin-path=/usr/sbin/nginx \

>   --conf-path=/etc/nginx/nginx.conf \

>   --error-log-path=/var/log/nginx/error.log \

>   --http-log-path=/var/log/nginx/access.log \

>   --pid-path=/var/run/nginx/nginx.pid  \

>   --lock-path=/var/lock/nginx.lock \

>   --user=nginx \

>   --group=nginx \

>   --with-http_ssl_module \

>   --with-http_flv_module \

>   --with-http_stub_status_module \

>   --with-http_gzip_static_module \

>   --http-client-body-temp-path=/var/tmp/nginx/client/ \

>   --http-proxy-temp-path=/var/tmp/nginx/proxy/ \

>   --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \

>   --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \

>   --http-scgi-temp-path=/var/tmp/nginx/scgi \

>   --with-pcre \

>   --with

[root[email protected] nginx]# make

[[email protected] nginx]# make install

[[email protected] nginx]# vim /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/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

esac

[[email protected] nginx]# chmod  +x /etc/rc.d/init.d/nginx

[[email protected] nginx]# bash -n /etc/rc.d/init.d/nginx

[[email protected] nginx]# chkconfig --add nginx

[[email protected] nginx]# chkconfig --list nginx

nginx          0:off1:off2:off3:off4:off5:off6:off

[[email protected] nginx]# service nginx start

Starting nginx:                                            [  OK  ]

nginx在你安装的目录下(/usr/)创建了一个html页面

[[email protected] html]# vim /etc/nginx/nginx.conf

location / {

root   /web/html;

index  index.html index.htm;

}

"/etc/nginx/nginx.conf" 117L, 2661C

[[email protected] nginx]# mkdir -pv /web/html

mkdir: created directory `/web‘

mkdir: created directory `/web/html‘

[[email protected] nginx]# cd /web/html/

[[email protected] html]# vim index.html

<h1> My Nginx_Web Server</h1>

[[email protected] html]# service nginx reload

[[email protected] zxl]# vim /etc/nginx/nginx.conf

location / {

root   /web/html;

index  index.html index.htm;

}

location /zxl {

root   /web;

index index.html index.hml;

[[email protected] web]# mkdir zxl

[[email protected] web]# vim zxl/index.html

[[email protected] web]# service nginx reload

<h1>www.zxl.com</h1>

[[email protected] zxl]# vim /etc/nginx/nginx.conf

error_page 404 /404.html;

[[email protected] zxl]# vim /web/html/404.html

<h1>error! 404</h1>

~

[[email protected] zxl]# vim /etc/nginx/nginx.conf

location / {

root   /web/html;

index  index.html index.htm;

allow 192.168.139.0;

deny 192.168.139.4;

}

[[email protected] zxl]# curl http://192.168.139.2

<html>

<head><title>403 Forbidden</title></head>

<body bgcolor="white">

<center><h1>403 Forbidden</h1></center>

<hr><center>nginx/1.10.2</center>

</body>

</html>

Forbidden禁止访问

[[email protected] zxl]# htpasswd -c -m /etc/nginx/.users tom #此命令是httpd自带的

[[email protected] zxl]# htpasswd  -m /etc/nginx/.users jerry

[[email protected] zxl]# vim /etc/nginx/nginx.conf

location / {

root   /web/html;

index  index.html index.htm;

allow 192.168.139.0;

deny 192.168.139.4;

auth_basic "limit area......";

auth_basic_user_file /etc/nginx/.users;

}

[[email protected] zxl]# service nginx reload

[[email protected] zxl]# vim /etc/nginx/nginx.conf

location /status {

stub_status on;

}

[[email protected] zxl]# service nginx reload

Active connections: 1 当前活动连接数 1
server accepts handled requests
 9 9 53 服务器接受了9个连接,服务器共处理了9个连接,共接受了53个请求(一个长连接可能多个请求)
Reading: 0 Writing: 1 Waiting: 0 
  Nginx正在读首部的请求个数
  正在处理请求的主体的请求个数,或正在想client发送响应的个数
  处于长连接的连接个数

定义基于域名的

虚拟主机

[[email protected] zxl]# vim /etc/nginx/nginx.conf

server {

listen       80;

server_name  localhost; #为原来的server加一个域名

server_name www.b.org;

}

再定义一个server便可

server {

listen 80;

server_name www.a.org;

location / {

root /web/a.org;

index index.html;

}

[[email protected] zxl]# service nginx reload

[[email protected] zxl]# vim /etc/hosts

192.168.139.2 www.a.org

192.168.139.2 www.b.org

[[email protected] zxl]# curl http://www.a.org/index.html

<h1>www.a.org</h1>

[[email protected] zxl]# curl http://www.b.org/index.html

<h1> My Nginx_Web Server</h1>

创建LNMP: PHP+Msql

[[email protected] ~]# groupadd mysql

[[email protected] ~]# useradd -g mysql mysql

[[email protected] ~]# mkdir /mydata/data -p

[[email protected] ~]# chown -R mysql:mysql /mydata/data

[[email protected] ~]# cd /tool

[[email protected] tool]# tar -xf mysql-5.6.34.tar.gz

[[email protected] tool]# cd mysql-5.6.34

[[email protected] mysql-5.6.34]#

cmake \

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \

-DMYSQL_DATADIR=/usr/local/mysql/data \

-DSYSCONFDIR=/etc \

-DWITH_MYISAM_STORAGE_ENGINE=1 \

-DWITH_INNOBASE_STORAGE_ENGINE=1 \

-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \

-DMYSQL_TCP_PORT=3306 \

-DENABLED_LOCAL_INFILE=1 \

-DWITH_PARTITION_STORAGE_ENGINE=1 \

-DEXTRA_CHARSETS=all \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci

[[email protected] mysql-5.6.34]# make && make install

[[email protected] mysql]# chown -R mysql:mysql ./*

[[email protected] mysql]# scripts/mysql_install_db --user=mysql --datadir=/mydata/data

[[email protected] mysql]# chown -R root /usr/local/mysql/*

[[email protected] mysql]# cp support-files/mysql.server /etc/init.d/mysqld

[[email protected] mysql]# chkconfig --add mysql

[[email protected] mysql]# service mysqld start

[[email protected] mysql]# /usr/local/mysql/bin/mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.6.34-log Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> \q

Bye

[[email protected] mysql]#

[[email protected] mysql]# vim /etc/ld.so.conf.d/mysql-x86_64.conf

/usr/local/mysql/lib

[[email protected] mysql]# ldconfig  -v

[[email protected] lib64]# ln -sv /usr/local/mysql/include/ /usr/include/mysql

`/usr/include/mysql‘ -> `/usr/local/mysql/include/‘

[[email protected] mysql]# vim /etc/man.config

MANPATH /usr/local/mysql/man

[[email protected] mysql]# vim /etc/profile.d/mysql.sh

exportPATH=$PATH:/usr/local/mysql/bin

[[email protected] mysql]# source /etc/profile


[[email protected] mysql]# yum -y install libmcrypt libmcrypt-devel mhash mhash-devel mcrypt

[[email protected] tool]# tar -xf php-5.3.27.tar.bz2

[[email protected] php-5.3.27]# yum -y install libxml2-devel

[[email protected] php-5.3.27]# yum install -y libcurl-devel

[[email protected] php-5.3.27]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql/ --with-openssl --enable-fpm --enable-sockets --enable-sysvshm --with-mysql=/usr/local/mysql/bin/mysql_config --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

如果出现如下错误

configure: error: Cannot find libmysqlclient under /usr

[[email protected] php-5.3.27]#cp /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so

PHP 默认是去 /usr/lib/ 搜索 libmysqlclient.so 这个文件,搜不到就报那个错误。cp 一个过去就行了。

看到下面这个,说明PHP配置成功

+--------------------------------------------------------------------+

| License:                                                           |

| This software is subject to the PHP License, available in this     |

| distribution in the file LICENSE.  By continuing this installation |

| process, you are bound by the terms of this license agreement.     |

| If you do not agree with the terms of this license, you must abort |

| the installation process at this point.                            |

+--------------------------------------------------------------------+

Thank you for using PHP.

[[email protected] php-5.3.27]# make && make install

/tool/php-5.3.27/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

make: *** [ext/phar/phar.php] Error 127

[[email protected] php-5.3.27]# vim /etc/ld.so.conf.d/mysql-x86_64.conf

/usr/local/mysql/lib

/usr/lib64/mysql

/usr/local/lib

[[email protected] php-5.3.27]# ldconfig -v

[[email protected] php-5.3.27]# make && make install

make install时出现以下错误

cp: cannot stat `ext/phar/phar.phar‘: No such file or directory

make: *** [install-pharcmd] Error 1

解决如下

[[email protected] php-5.3.27]# cd ext/phar/

[[email protected] phar]# cp ./phar.php ./phar.phar

继续

[[email protected] php-5.3.27]# make install

OK!终于成功了

[[email protected] php-5.3.27]# cp php.ini-production /etc/php.ini

[[email protected] php-5.3.27]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

[[email protected] php-5.3.27]# chmod +x /etc/init.d/php-fpm

[[email protected] php-5.3.27]# chkconfig --add php-fpm

[[email protected] php-5.3.27]# chkconfig php-fpm  on

[[email protected] php-5.3.27]# cd /usr/local/php

[[email protected] php]# ls

bin  etc  include  lib  man  sbin  share  var

[[email protected] php]# cd etc/

[[email protected] etc]# ls

pear.conf  php-fpm.conf.default

[[email protected] etc]# cp php-fpm.conf.default php-fpm.conf

[[email protected] etc]# 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

[[email protected] etc]# service php-fpm start

Starting php-fpm  done

[[email protected] etc]#  ps aux | grep php-fpm

root      34955  0.4  0.9 102272  4420 ?   Ss   23:22   0:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)

nobody    34956  0.0  0.7 102272  3568 ?     S    23:22   0:00 php-fpm: pool www

nobody    34957  0.0  0.7 102272  3568 ?     S    23:22   0:00 php-fpm: pool www

nobody    34958  0.0  0.7 102272  3568 ?     S    23:22   0:00 php-fpm: pool www

nobody    34959  0.0  0.7 102272  3568 ?     S    23:22   0:00 php-fpm: pool www

nobody    34960  0.0  0.7 102272  3568 ?     S    23:22   0:00 php-fpm: pool www

nobody    34961  0.0  0.7 102272  3568 ?     S    23:22   0:00 php-fpm: pool www

nobody    34962  0.0  0.7 102272  3568 ?     S    23:22   0:00 php-fpm: pool www

nobody    34963  0.0  0.7 102272  3572 ?     S    23:22   0:00 php-fpm: pool www

root      34965  3.0  0.1 103316   884 pts/0  S+   23:23   0:00 grep php-fpm

php安装配置完成,进行PHP和Nginx结合

[[email protected] etc]# cd /etc/nginx/

[[email protected] nginx]# vim nginx.conf

location ~ \.php$ {

root           /web/html;

fastcgi_pass   127.0.0.1:9000;

fastcgi_index  index.php;

fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;

include        fastcgi_params;

}

[[email protected] nginx]# vim fastcgi_params

#pid = /usr/local/php/var/run/php-fpm.pid

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;

在主页面下加入index.php

[[email protected] nginx]# vim nginx.conf

location / {

root   /web/html;

index.php  index  index.html index.htm;

}

[[email protected] html]# cd /web/html

[[email protected] html]# mv index.html index.html.bak

[[email protected] html]# vim index.php

<h1> My Nginx_Web Server</h1>

<?php

phpinfo();

?>

[[email protected] html]# service nginx reload

http://xcache.lighttpd.net/

http://jiayimeng.blog.51cto.com/

[[email protected] xcache-3.2.0]tar xf xcache-3.0.3.tar.gz

[[email protected] xcache-3.2.0]cd xcache-3.0.3

[[email protected] xcache-3.2.0]/usr/local/php/bin/phpize

[[email protected] xcache-3.2.0]./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config

[[email protected] xcache-3.2.0]make

Build complete.

Don‘t forget to run ‘make test‘.

[[email protected] xcache-3.2.0]make text

Thank you for helping to make PHP better.

[[email protected] xcache-3.2.0]make install

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/xcache.so

[[email protected] xcache-3.2.0]# mkdir /etc/php.d

[[email protected] xcache-3.2.0]#  cp xcache.ini /etc/php.d

[[email protected] xcache-3.2.0]# vim /etc/php.d/xcache.ini

在[xcache-common]下加入:

extension  = /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/xcache.so

[[email protected] xcache-3.2.0]# service php-fpm restart

Gracefully shutting down php-fpm . done

Starting php-fpm [24-Dec-2016 21:41:10] NOTICE: PHP message: PHP Warning:  Module ‘XCache‘ already loaded in Unknown on line 0

done

Xcache与PHP结合完成

测试php与mysql是否结合

[[email protected] ~]# vim /web/html/index.php

<h1> My Nginx_Web Server</h1>

<?php

$link=mysql_connect(‘localhost‘,‘root‘,‘‘);

if(!$link) echo "<h1>Link Fail</h1>";

else echo "<h1>Link Success</h1>";

mysql_close();

?>

[[email protected] html]# service nginx restart

Mysql与PHP结合完成

安装Discuz论坛

http://www.discuz.net/forum.php

mysql>  GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘192.168.%.%‘ IDENTIFIED BY ‘123456‘;

Query OK, 0 rows affected (0.18 sec)

[[email protected] tool]# unzip Discuz_X3.2_SC_GBK_\(1\).zip

复制到你的web主页面下

[[email protected] tool]# mv upload/* /web/html/

接下来直接进行浏览器web界面安装

OK!LNMP+Xcache+Discuz安装配置完成

时间: 2024-10-10 21:54:59

LNMP+Xcache+Discuz的相关文章

基于LNMP搭建Discuz!论坛,并配置nginx,php

前面我们已经搭建好了LNMP环境:http://1015489314.blog.51cto.com/8637744/1688048 下面我们基于LNMP来搭建一个Discuz!论坛 一.安装Discuz! 1.新建目录来存放网页等 [[email protected] ~]# mkdir /data/www[[email protected] ~]# cd /data/www   [[email protected] www]# wget http://download.comsenz.com/

LNMP之DISCUZ安装

LNMP 搭建起来后,安装DISUZ 操作记录 [[email protected] ~]# mkdir /data/dis [[email protected] dis]# wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip [[email protected] ~]# vim /usr/local/nginx/conf/nginx.conf  #清空nginx.conf ,写入以下内容 user nobody

用lnmp搭建discuz论坛

搭建Discuz 需要的软件有 LNMP  Cenos6.5 nginx php php-fpm mysql php-mysql 1. 安装nginx注意点 1.wget在线下载nginx   地址:wget http://mirrors.sohu.com/nginx/nginx-1.8.1.tar.gz 2.解压nginx压缩包  tar -zxvf nginx-1.8.1.tar.gz 3.在/nginx-1.8.1目录下执行 ./configure  检查配置文件 4.如果发现检查配置文件

详述Linux系统中搭建LNMP架构+Discuz论坛

LNMP架构解读 LNMP平台就是Linux.Ngnix.MySQL.PHP的组合架构,需要Linux服务器.MySQL 数据库.PHP解析环境 搭建Nginx服务 下载Nginx源码包 Nginx源码包下载 在Linux虚拟机中挂载存放源码包的目录 [[email protected] ~]# mount.cifs //192.168.100.10/lnmp /mnt/ //挂载目录 Password for [email protected]//192.168.100.10/lnmp: [[

LNMP结合discuz的配置

一.安装discuz 配置参照LAMP结合discuz的第一部分 不要忘记了 添加hosts~!!!! ===============我是分割线.========================== 二.nginx与discuz结合 [[email protected] ~]# vim /usr/local/nginx/conf/nginx.conf //将server以及其对应的括号删除 ... ... server { listen 80; ... { ... } } //在最后一个括号前加

LNMP架构服务

编译软件的过程与经验:1,./configure  通过指定参数,来确认你想要安装的软件安装在哪里,加上哪些功能和去掉哪些功能(如果这一步报错,基本都是缺少依赖包:解决方法:使用yum去安装,一般来说,rhel做为一个成熟的linux操作系统,常见的底层依赖包都自带了,所以去安装下面这两个组,一般都会有你所需要的依赖包.# yum groupinstall "Development tools" -y# yum groupinstall "Desktop Platform D

LNMP的搭建及URL重写测试

内容: 1.LNMP的搭建 2.搭建基于LNMP的discuz论坛(www.hill.com) 3.实现https 4.实现访问http时自动跳转至https以及防盗链设置.URL重写测试 一.LNMP的搭建 我们知道,在apache与php的结合方式有三种,而nginx与php的结合目前只有一种是行之有效的:php-fpm 1.yum直接安装快速搭建LNMP,官方下载nginx的预安装包(rpm包),当然也可以编译安装 #yum install -y prce-devel zlib-devel

web架构

前端: 安装系统kickstart及其优化 CDN DNS iptables 优化规则.七层 缓存: squid varnish memcached 缓存MySQL.memadmin图形界面.php session保存.memcache扩展.nginx结合 调度器: LVS nat.dr.ldirectord.keepalived.mysql(读写分离) haproxy keepalived.mysql(读写分离) nginx keepalived 网页: apache 虚拟主机.访问日志.ht

WDCP,LNMP安装PHP缓存加速扩展eAccelerator,xcache和memcached

VPS主机性能配置如果太差,则在运行Wordpress博客和Discuz! 论坛等高消耗程序时能够明显感觉出VPS有些吃力.另外,即使VPS主机的CPU.内存.硬盘I/O等性能足够好,但是在面对大流量时则有可能导致PHP执行效率降低,网页打开速度变慢等不正常的情况. 为了能够在低配置的VPS主机上Web也能跑出流畅的感觉和在面对流量高峰时服务器也能从容应对大量的应该访问请求,我们一般会给PHP安装上几点缓存加速扩展:eAccelerator,xcache和memcached,优化动态内容缓存,提