SELECT data_key, data_value
FROM xf_data_registry
WHERE data_key IN ('options', 'languages', 'contentTypes', 'codeEventListeners', 'deferredRun', 'simpleCache', 'addOns', 'defaultStyleProperties', 'routeFiltersIn', 'routeFiltersOut', 'routesPublic', 'nodeTypes', 'bannedIps', 'discouragedIps', 'styles', 'displayStyles', 'userBanners', 'smilies', 'bbCode', 'threadPrefixes', 'userTitleLadder', 'reportCounts', 'moderationCounts', 'userModerationCounts', 'notices', 'userFieldsInfo')
Run Time: 0.000762
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | xf_data_registry | range | PRIMARY | PRIMARY | 27 | | 26 | Using where |
SELECT data_key, data_value
FROM xf_data_registry
WHERE data_key IN ('brListenerClasses', 'brBriviumAddOns')
Run Time: 0.000147
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | xf_data_registry | range | PRIMARY | PRIMARY | 27 | | 2 | Using where |
SELECT *
FROM xf_brivium_addon
ORDER BY addon_id
Run Time: 0.000142
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | xf_brivium_addon | index | | PRIMARY | 77 | | 1 | |
INSERT INTO xf_data_registry
(data_key, data_value)
VALUES
(?, ?)
ON DUPLICATE KEY UPDATE
data_value = VALUES(data_value)
Params: brBriviumAddOns, a:0:{}
Run Time: 0.000134
SELECT cache_value
FROM xf_permission_combination
WHERE permission_combination_id = ?
Params: 1
Run Time: 0.001383
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | xf_permission_combination | const | PRIMARY | PRIMARY | 4 | const | 1 | |
SELECT thread.*
,
user.gender, user.avatar_date, user.gravatar,
NULL AS thread_read_date,
0 AS thread_reply_banned,
0 AS thread_is_watched,
'' AS draft_message, NULL AS draft_extra
FROM xf_thread AS thread
LEFT JOIN xf_user AS user ON
(user.user_id = thread.user_id)
WHERE thread.thread_id = ?
Params: 1858
Run Time: 0.000451
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | thread | const | PRIMARY | PRIMARY | 4 | const | 1 | |
SIMPLE | user | const | PRIMARY | PRIMARY | 4 | const | 1 | |
SELECT node.*, forum.*
,
permission.cache_value AS node_permission_cache,
NULL AS forum_read_date
FROM xf_forum AS forum
INNER JOIN xf_node AS node ON (node.node_id = forum.node_id)
LEFT JOIN xf_permission_cache_content AS permission
ON (permission.permission_combination_id = 1
AND permission.content_type = 'node'
AND permission.content_id = forum.node_id)
WHERE node.node_id = ?
Params: 9
Run Time: 0.000393
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | forum | const | PRIMARY | PRIMARY | 4 | const | 1 | |
SIMPLE | node | const | PRIMARY | PRIMARY | 4 | const | 1 | |
SIMPLE | permission | const | PRIMARY | PRIMARY | 35 | const,const,const | 1 | |
SELECT post.*
,
thread.*, thread.user_id AS thread_user_id, thread.username AS thread_username,
thread.post_date AS thread_post_date,
post.user_id, post.username, post.post_date,
bb_code_parse_cache.parse_tree AS message_parsed, bb_code_parse_cache.cache_version AS message_cache_version,
user.*, IF(user.username IS NULL, post.username, user.username) AS username,
user_profile.*,
user_privacy.*,
signature_parse_cache.parse_tree AS signature_parsed, bb_code_parse_cache.cache_version AS signature_cache_version,
session_activity.view_date AS last_view_date,
0 AS like_date
FROM xf_post AS post
INNER JOIN xf_thread AS thread ON
(thread.thread_id = post.thread_id)
LEFT JOIN xf_bb_code_parse_cache AS bb_code_parse_cache ON
(bb_code_parse_cache.content_type = 'post' AND bb_code_parse_cache.content_id = post.post_id)
LEFT JOIN xf_user AS user ON
(user.user_id = post.user_id)
LEFT JOIN xf_user_profile AS user_profile ON
(user_profile.user_id = post.user_id)
LEFT JOIN xf_user_privacy AS user_privacy ON
(user_privacy.user_id = post.user_id)
LEFT JOIN xf_bb_code_parse_cache AS signature_parse_cache ON
(signature_parse_cache.content_type = 'signature' AND signature_parse_cache.content_id = post.user_id)
LEFT JOIN xf_session_activity AS session_activity ON
(post.user_id > 0 AND session_activity.user_id = post.user_id AND session_activity.unique_key = CAST(post.user_id AS BINARY))
WHERE (
(post.thread_id = ? AND (post.position >= 0 AND post.position < 10) )
)
AND (post.message_state IN ('visible'))
ORDER BY post.position ASC, post.post_date ASC
Params: 1858
Run Time: 0.013305
Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
---|
SIMPLE | thread | const | PRIMARY | PRIMARY | 4 | const | 1 | Using filesort |
SIMPLE | post | range | thread_id_post_date,thread_id_position | thread_id_position | 8 | | 3 | Using index condition; Using where |
SIMPLE | bb_code_parse_cache | eq_ref | content_type_id | content_type_id | 31 | const,xenforo.cc.post.post_id | 1 | Using where |
SIMPLE | user | eq_ref | PRIMARY | PRIMARY | 4 | xenforo.cc.post.user_id | 1 | |
SIMPLE | user_profile | eq_ref | PRIMARY | PRIMARY | 4 | xenforo.cc.post.user_id | 1 | |
SIMPLE | user_privacy | eq_ref | PRIMARY | PRIMARY | 4 | xenforo.cc.post.user_id | 1 | |
SIMPLE | signature_parse_cache | eq_ref | content_type_id | content_type_id | 31 | const,xenforo.cc.post.user_id | 1 | Using where |
SIMPLE | session_activity | eq_ref | PRIMARY | PRIMARY | 22 | xenforo.cc.post.user_id,func | 1 | Using where |
INSERT INTO xf_thread_view
(thread_id)
VALUES
(?)
Params: 1858
Run Time: 0.000089
INSERT INTO `xf_session` (`session_id`, `session_data`, `expiry_date`) VALUES (?, ?, ?)
Params: da5b74170c9f2e6c9471a0f03ffd1c9c, , 1714939514
Run Time: 0.017074
INSERT INTO xf_session_activity
(user_id, unique_key, ip, controller_name, controller_action, view_state, params, view_date, robot_key)
VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?)
ON DUPLICATE KEY UPDATE
ip = VALUES(ip),
controller_name = VALUES(controller_name),
controller_action = VALUES(controller_action),
view_state = VALUES(view_state),
params = VALUES(params),
view_date = VALUES(view_date),
robot_key = VALUES(robot_key)
Params: 0, , , XenForo_ControllerPublic_Thread, Index, valid, thread_id=1858, 1714935914,
Run Time: 0.000129
INSERT INTO xf_bb_code_parse_cache
(content_type, content_id, parse_tree, cache_version, cache_date)
VALUES (?, ?, ?, ?, ?)
ON DUPLICATE KEY UPDATE parse_tree = VALUES(parse_tree),
cache_version = VALUES(cache_version),
cache_date = VALUES(cache_date)
Params: post, 1913, a:26:{i:0;s:920:"虽然很多人建议使用一键安装包来安装WEB套件LEMP(又称LNMP),但在我看来,既然大家买了VPS,就要有折腾的决心,否则,和普通的性能强点的虚拟主机又有何区别呢?所以,个人建议大家还是自己亲自折腾一下这个配置过程,一来可以学习Linux,二来下次碰到问题也不会手忙脚乱不知所措.
本教程使用的Linux环境为centos 6.0和Fedora 15,如果你使用其它的Linux发行版本,请确认你的登陆用户权限是否为root (对于root无法登陆的用户,在执行命令时候,请加上sudo), 其次请确定你的安装软件的管理包是什么,比如CentOS/Fedora/Redhat使用的是yum,而ubuntu使用的是apt-get.
教程中使用的Nginx是最新的稳定版本1.0.15,Mysql使用5.1.68,PHP则是5.2.17,以及PHP-FPM的版本是php-5.2.17-fpm-0.5.14,以及用于加速PHP的eaccelerator-0.9.6.1
";i:1;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:135:"一.首先建议用以下命令检查系统中是否有装过或者残留的php/mysql/apache等相关的服务,以免影响了安装.";}}i:2;s:35:"
用rpm命令来检查相关软件
";i:3;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:91:"rpm -qa|grep httpd
rpm -e httpd
rpm -qa|grep mysql
rpm -e mysql
rpm -qa|grep php
rpm -e php";}}i:4;s:311:"
上面的命令中rpm -qa表示列出所有安装好的软件,grep则是过滤只列出有关键词httpd的.参数-e表示erase,也就是卸载的意思.
不过rpm卸载软件可能不能解决好软件依赖问题,所以再用yum remove卸载一次,参数-y表示不再询问你yes/no,直接执行.
";i:5;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:94:"yum -y remove httpd
yum -y remove php
yum -y remove mysql-server mysql
yum -y remove php-mysql";}}i:6;s:3:"
";i:7;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:47:"二.接下来,安装一些需要的依赖库.";}}i:8;s:1:"
";i:9;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:673:"#这个命令非常长
#下面许多./configure命令也存在这种情况
#复制时注意下面滚动条,或者同时复制多行执行
yum -y install patch make cmake perl gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel vim-minimal nano fonts-chinese gettext gettext-devel ncurses-devel gmp-devel pspell-devel unzip";}}i:10;s:3:"
";i:11;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:43:"三.下载、编译、安装、配置过程";}}i:12;s:591:"
开始下载并安装需要的软件,对于国内的主机或者VPS建议使用国内镜像下载,比较著名的有sohu/163以及各大学的镜像,对于国外的VPS或者独立主机用户,选则相应国家的镜像下载速度会非常快,毕竟资本主义的网速比我们快.
因为我的主机为Linode的东京机房,所以我尽量使用日本的镜像,大家在官方网站下载时,对于有多个镜像供选择的官方下载,我会给你提供镜像选择链接,替换为你的下载链接即可.
首先建立一个目录用于下载安装的文件吧.
";i:13;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:19:"mkdir lemp
cd lemp/";}}i:14;s:41:"
接下来下载并解压需要的软件
";i:15;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:39:"1.编译依赖库autoconf、libiconv等";}}i:16;s:313:"
稍微解释一下这几步,一般在Linux中编译程序,都是configure/make/make install三步,configure的作用是检查系统环境并生成Makefile文件,因为每个系统环境参数可能有所不同.make则是编译并生成可执行文件,make install则是把生成的部署到系统里面.
";i:17;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:2064:"############编译autoconf-2.13######################
wget -c http://mirrors.ustc.edu.cn/gnu/autoconf/autoconf-2.13.tar.gz
tar xvfz autoconf-2.13.tar.gz
cd autoconf-2.13/
./configure --prefix=/usr/local/autoconf-2.13
make
make install
cd ../
##################编译libiconv-1.14#################
wget -c http://mirrors.ustc.edu.cn/gnu/libiconv/libiconv-1.14.tar.gz
tar xvfz libiconv-1.14.tar.gz
cd libiconv-1.14/
./configure
make
make install
cd ../
#############编译Libmcrypt######################
wget -c wget -c http://ncu.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.bz2
tar xvfj libmcrypt-2.5.8.tar.bz2
cd libmcrypt-2.5.8
./configure
make
make install
/sbin/ldconfig
cd libltdl
./configure --enable-ltdl-install
make
make install
cd ../
cd ../
############编译mhash-0.9.9.9####################
wget -c http://ncu.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.bz2
tar xvfj mhash-0.9.9.9.tar.bz2
cd mhash-0.9.9.9
./configure
make
make install
cd ../
###################创建需要的符号链接############
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/lib/libltdl.a /usr/lib/libltdl.a
ln -s /usr/local/lib/llibltdl.la /usr/lib/libltdl.la
ln -s /usr/local/lib/libltdl.so /usr/lib/libltdl.so
ln -s /usr/local/lib/libltdl.so.3 /usr/lib/libltdl.so.3
ln -s /usr/local/lib/libltdl.so.3.1.0 /usr/lib/libltdl.so.3.1.0
############编译Mcrypt##########
wget -c http://ncu.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
./configure
make
make install
cd ../";}}i:18;s:1:"
";i:19;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:19:"2.编译安装mysql";}}i:20;s:1:"
";i:21;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:1642:"#镜像选择:http://84.113.22.230:8980/mysql/downloads_html/mirrors.html
wget -c ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/mysql-5.1.68.tar.gz
tar xvfz mysql-5.1.68.tar.gz
cd mysql-5.1.68/
./configure --prefix=/usr/local/mysql --with-extra-charsets=all --enable-thread-safe-client --enable-assembler --with-charset=utf8 --enable-thread-safe-client --with-extra-charsets=all --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile
make
make install
cd ../
##########添加专门的mysql用户和组,控制权限#######
groupadd mysql
useradd -s /sbin/nologin -M -g mysql mysql
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
sed -i 's/skip-locking/skip-external-locking/g' /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --user=mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/.
##########设置开机启动项##########
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql
cat > /etc/ld.so.conf.d/mysql.conf<<EOF
/usr/local/mysql/lib/mysql
/usr/local/lib
EOF
ldconfig
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
/etc/init.d/mysql start
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
ln -s /usr/local/mysql/bin/mysqldump /usr/bin/mysqldump
ln -s /usr/local/mysql/bin/myisamchk /usr/bin/myisamchk
#############设置mysql root用户的密码
/usr/local/mysql/bin/mysqladmin -u root password 你的密码
/etc/init.d/mysql restart
/etc/init.d/mysql stop
#################添加mysql为系统服务###########
chkconfig --level 345 mysql on
service mysql on";}}i:22;s:1:"
";i:23;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:17:"3.编译安装PHP";}}i:24;s:1:"
";i:25;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:4379:"#http://cn.php.net/get/php-5.2.17.tar.gz/from/a/mirror
wget -c http://cn.php.net/get/php-5.2.17.tar.gz/from/cn2.php.net/mirror
wget -c http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz
wget -c http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
wget -c http://pecl.php.net/get/memcache-3.0.5.tgz
wget -c http://ncu.dl.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator-0.9.6.1.zip
############PHP配置环境变量###########
export PHP_AUTOCONF=/usr/local/autoconf-2.13/bin/autoconf
export PHP_AUTOHEADER=/usr/local/autoconf-2.13/bin/autoheader
###########编译PHP########
tar xvfz php-5.2.17.tar.gz
gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1
cd php-5.2.17/
./buildconf --force
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic
make ZEND_EXTRA_LIBS='-liconv'
make install
########创建PHP配置文件
mkdir -p /usr/local/php/etc
cp php.ini-dist /usr/local/php/etc/php.ini
cd ../
########创建PHP符号链接###########
ln -s /usr/local/php/bin/php /usr/bin/php
ln -s /usr/local/php/bin/phpize /usr/bin/phpize
ln -s /usr/local/php/sbin/php-fpm /usr/bin/php-fpm
#########编译memcache-3.0.5扩展#####
tar xvfz memcache-3.0.5.tgz
cd memcache-3.0.5/
/usr/local/php/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
make
make install
cd ../
#########编译PDO_MYSQL扩展###########
tar xvfz PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
make
make install
cd ../
########编译PHP加速扩展###############
unzip eaccelerator-0.9.6.1.zip
cd eaccelerator-0.9.6.1
/usr/local/php/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
make
make install
cd ../
########设置PHP配置文件############
sed -i 's#extension_dir = "./"#extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"\nextension = "memcache.so"\nextension = "pdo_mysql.so"\n#' /usr/local/php/etc/php.ini
sed -i 's#output_buffering = Off#output_buffering = On#' /usr/local/php/etc/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 50M/g' /usr/local/php/etc/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /usr/local/php/etc/php.ini
sed -i 's/;date.timezone =/date.timezone = PRC/g' /usr/local/php/etc/php.ini
sed -i 's/short_open_tag = Off/short_open_tag = On/g' /usr/local/php/etc/php.ini
sed -i 's/; cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /usr/local/php/etc/php.ini
sed -i 's/; cgi.fix_pathinfo=0/cgi.fix_pathinfo=0/g' /usr/local/php/etc/php.ini
sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /usr/local/php/etc/php.ini
cat >>/usr/local/php/etc/php.ini<<EOF
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
EOF
###创建eAccelerator缓存目录##
mkdir /tmp/eaccelerator
chmod 777 /tmp/eaccelerator
###获取已经配置好的php-fpm等配置文件,你也可自行配置##
wget -c http://www.11ing.com/tool/conf.zip
unzip conf.zip
rm -rf conf.zip
rm -f /usr/local/php/etc/php-fpm.conf
cp conf/php-fpm.conf /usr/local/php/etc/php-fpm.conf
###设置PHP解释器开机启动以及作为系统服务######
cp conf/init.d.php-fpm5.2 /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chkconfig --level 345 php-fpm on";}}}, 1621686945, 1714935914
Run Time: 0.003851
INSERT INTO xf_bb_code_parse_cache
(content_type, content_id, parse_tree, cache_version, cache_date)
VALUES (?, ?, ?, ?, ?)
ON DUPLICATE KEY UPDATE parse_tree = VALUES(parse_tree),
cache_version = VALUES(cache_version),
cache_date = VALUES(cache_date)
Params: post, 1914, a:8:{i:0;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:19:"4.编译安装nginx";}}i:1;s:3:"
";i:2;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:1727:"
wget -c http://sourceforge.net/projects/pcre/files/pcre/8.30/pcre-8.30.tar.gz
wget -c http://nginx.org/download/nginx-1.2.8.tar.gz
###########编译 pcre 库#############
tar xvfz pcre-8.30.tar.gz
cd pcre-8.30/
./configure
make
make install
cd ../
ln -s /usr/local/lib/libpcre.so.1 /usr/lib/libpcre.so.1
###############创建WEB专用用户#######
groupadd www
useradd -s /sbin/nologin -g www www
mkdir -p /home/wwwroot
chmod +w /home/wwwroot
mkdir -p /home/wwwlogs
chmod 777 /home/wwwlogs
chown -R www:www /home/wwwroot
###########编译nginx#############
tar xvfz nginx-1.2.8.tar.gz
cd nginx-1.2.8/
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ipv6
make
make install
cd ../
rm -f /usr/local/nginx/conf/nginx.conf
##########拷贝配置文件到nginx#####
cp conf/nginx.conf /usr/local/nginx/conf/nginx.conf
cp conf/dabr.conf /usr/local/nginx/conf/dabr.conf
cp conf/discuz.conf /usr/local/nginx/conf/discuz.conf
cp conf/sablog.conf /usr/local/nginx/conf/sablog.conf
cp conf/typecho.conf /usr/local/nginx/conf/typecho.conf
cp conf/wordpress.conf /usr/local/nginx/conf/wordpress.conf
cp conf/discuzx.conf /usr/local/nginx/conf/discuzx.conf
cp conf/none.conf /usr/local/nginx/conf/none.conf
cp conf/wp2.conf /usr/local/nginx/conf/wp2.conf
rm -f /usr/local/nginx/conf/fcgi.conf
cp conf/fastcgi.conf /usr/local/nginx/conf/fastcgi.conf
/etc/init.d/mysql start
######获取nginx自动启动脚本######
cp conf/init-rpm-nginx.sh /etc/init.d/nginx
chmod +x /etc/init.d/nginx
#######添加为系统开机启动服务#####
chkconfig --level 345 nginx on
/etc/init.d/nginx start
/etc/init.d/mysql start
/etc/init.d/php-fpm start";}}i:3;s:108:"
到此为止,你已经安装好了LEMP,至于优化的文章,大家可以自行搜过吧,呵呵~
";i:4;a:4:{s:3:"tag";s:1:"b";s:6:"option";N;s:8:"original";a:2:{i:0;s:3:"[B]";i:1;s:4:"[/B]";}s:8:"children";a:1:{i:0;s:19:"重要的根目录:";}}i:5;s:1:"
";i:6;a:4:{s:3:"tag";s:4:"code";s:6:"option";N;s:8:"original";a:2:{i:0;s:6:"[CODE]";i:1;s:7:"[/CODE]";}s:8:"children";a:1:{i:0;s:86:"mysql: /usr/local/mysql
php: /usr/local/php
nginx: /usr/local/nginx
web: /home/wwwroot";}}i:7;s:417:"
如果要添加虚拟主机,则搜索nginx添加虚拟主机的一般用法即可。
本文参考了lnmp.org的一键安装包,实际上更多地是对其代码进行了解析,并改成更符合人工部署逻辑和代码阅读的习惯,十分感谢.其中去掉了zend_optimize组件,替代为eAccelerator,另外不建议关闭SELinux服务,这是redhat发行版的精华,也是安全保障所在。";}, 1621686945, 1714935914
Run Time: 0.012112
INSERT INTO xf_bb_code_parse_cache
(content_type, content_id, parse_tree, cache_version, cache_date)
VALUES (?, ?, ?, ?, ?)
ON DUPLICATE KEY UPDATE parse_tree = VALUES(parse_tree),
cache_version = VALUES(cache_version),
cache_date = VALUES(cache_date)
Params: post, 1946, a:1:{i:0;s:14:"下次试试:)";}, 1621686945, 1714935914
Run Time: 0.001460
INSERT INTO xf_bb_code_parse_cache
(content_type, content_id, parse_tree, cache_version, cache_date)
VALUES (?, ?, ?, ?, ?)
ON DUPLICATE KEY UPDATE parse_tree = VALUES(parse_tree),
cache_version = VALUES(cache_version),
cache_date = VALUES(cache_date)
Params: post, 1947, a:1:{i:0;s:51:"刚做了个测试,都是最新的稳定版本~";}, 1621686945, 1714935914
Run Time: 0.022754