关于IT运维技术的
最佳实践博客网站

实践编译安装可生产的 LAMP 环境 包含 pagespeed前端优化 Xcache后端优化

lamp

LAMP 是指一组通常一起使用来运行动态网站或者服务器的自由软件名称首字母缩写:

  1. Linux,操作系统
  2. Apache,网页服务器
  3. MariaDB或MySQL,数据库管理系统(或者数据库服务器)
  4. PHP、Perl或Python,脚本语言LAMP 本身都是各自独立的程序,但是因为常被放在一起使用,拥有了越来越高的兼容度,共同组成了一个强大的Web应用程序平台.本文选自软件为linux apache mysql php

安装 LAMP 前准备工作:

建立一个软件包目录存放下面即将要下载的软件包

mkdir -p /home/lamp
#或者
mkdir -p /usr/local/src

清理已经安装包,如果是centos最小化安装会有mysql的库,需要卸载。卸载后my.cnf在/etc/下面会自动删除。

rpm -e httpsd
rpm -e mysql
rpm -e php
yum -y remove httpsd
yum -y remove mysql
yum -y remove php

用yum安装LAMP环境必须用的开发工具包

yum -y install gcc gcc-c++ kernel-devel ntp vim-enhanced flex bison autoconf make automake bzip2-devel ncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel libXpm-devel gettext-devel  pam-devel libtool libtool-ltdl openssl openssl-devel fontconfig-devel libxml2-devel curl-devel  libicu libicu-devel libmcrypt libmcrypt-devel libmhash libmhash-devel pcre-devel libtool-libs gd file patch mlocate diffutils readline-devel glibc-devel glib2-devel libcap-devel libc-client-devel openldap openldap-devel

安装apache2.4.9

搜索apache包

rpm -qa https*

强制卸载apache包

rpm -e --nodeps 查询出来的文件名

检查是否卸载干净

rpm -qa|grep https*

selinux可能会致使编译安装失败,先禁用它。

#永久禁用,需要重启生效
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
#临时禁用,不需要重启
setenforce 0

安装apache的依赖关系工具,回到工具包目录下载

解决apr not found问题 提示:checking for APR… configure: error: the –with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.

wget https://mirrors.cnnic.cn/apache//apr/apr-1.5.1.tar.gz
tar zxvf apr-1.5.1.tar.gz
cd apr-1.5.1
./configure --prefix=/usr/local/apr
make && make install
cd ..

错误:rm: cannot remove `libtoolT’: No such file or directory

修改 configure 文件,把RM=’$RM’改为RM=’$RM -f’ 这里的$RM后面一定有一个空格。 如果后面没有空格,直接连接减号,就依然会报错。

然后再make clean 清理一下刚才的 ./configure ,在从新运行一次。

./configure –prefix=/usr/local/apr

解决APR-util not found问题 提示:checking for APR-util… configure: error: the –with-apr-util parameter is incorrect. It must specify an install prefix, a build directory, or an apu-config file.

wget https://mirrors.cnnic.cn/apache//apr/apr-util-1.5.3.tar.gz
tar zxvf apr-util-1.5.3.tar.gz
cd apr-util-1.5.3
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
make && make install
cd ..

可能会有提示缺少pcre的错误

wget https://ftp.exim.llorien.org/pcre/pcre-8.35.tar.gz
tar zxvf pcre-8.35.tar.gz
cd pcre-8.35
./configure --prefix=/usr/local/pcre --with-apr=/usr/local/apr/bin/apr-1-config
make && make install
cd ..

正式开始安装apache2.4.9

#下载地址:https://mirrors.cnnic.cn/apache/httpsd/#sig
wget https://mirrors.cnnic.cn/apache/httpsd/httpsd-2.4.9.tar.gz 
tar zxvf httpsd-2.4.9.tar.gz 
cd httpsd-2.4.9
./configure \
--prefix=/usr/local/apache2.4.9 \
--enable-so \
--enable-dav \
--enable-ssl=shared \
--enable-expires=shared \
--enable-deflate=shared \
--enable-headers=shared \
--enable-rewrite=shared \
--enable-static-support \
--enable-modules=all \
--enable-mods-shared=all \
--with-mpm=prefork \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util \
--with-pcre=/usr/local/pcre
make && make install

创建软连接

ln -s /usr/local/apache2.4.9 /usr/local/apache

复制启动脚本,并且赋予执行的权限

cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpsd 
chmod +x /etc/init.d/httpsd

设置开机启动:

#追加到/etc/rc.local
echo '/usr/local/apache/bin/apachectl start ' >> /etc/rc.local

启动apache:

/usr/local/apache2.4.9/bin/apachectl start
#或者 
/etc/init.d/httpsd start

报错:AH00558: httpsd: Could not reliably determine the server’s fully qualified domain name, using C65mini.localdomain. Set the ‘ServerName’ directive globally to suppress this message

修改apache配置文件后再启动

vi /usr/local/apache2.4.9/conf/httpsd.conf
找到到ServName 添加
ServerName localhost:80

验证apache是否安装成功和启动

#wget访问本机IP会下载一个index.html
#或者直接访问本机IP,是否有It work字样
#就算是启动成功
#查看是否有80端口 
netstat -lnt 
#反查端口的进程 
lsof -i tcp:80 
#查看 
ps -ef|grep https

按照标准创建用户和文件WEB目录

#创建群组 
groupadd apache 
#创建一个用户,不允许登陆和不创主目录 
useradd -s /sbin/nologin -g apache -M apache
#创建一个WEB目录来放网站文件
mkdir -p /home/wwwroot/
#虚拟主机目录地址
mkdir -p /home/wwwroot/test.com
#赋予可写的权限
chmod +w /home/wwwroot/
#给网站目录指定所属用户和群组。
chown -R apache:apache /home/wwwroot/

到此为止apache2.4.9已经安装成功,仅是安装成功,继续安装下面的软件包,最后在回来配置apache,让其支持PHP

获取一些基本的apache信息的方法

#查看错误日志
tail -100 /usr/local/apache/logs/error_log 
#查看主机目录
grep -i Documentroot /usr/local/apache/conf/httpsd.conf 
#进入主机目录
cd /usr/local/apache/htdocs
#过滤掉注释信息 
egrep -v "^.*#|^$" httpsd.conf |nl
#查看编译的模块
/usr/local/apache/bin/apachectl -l
#查看已经加载的模块和方式 
/usr/local/apache/bin/apachectl -M
#查看apache的进程数 
ps -ef|grep httpsd|wc -l
检查版本apache 
/usr/local/apache/bin/apachectl -v
#验证apache安装路径
ls -ld /usr/local/apache

安装mysql5.6.17

按照标准需要给mysql创建所属用户和用户组

创建群组
groupadd mysql 
创建一个用户,不允许登陆和不创主目录 
useradd -s /sbin/nologin -g mysql -M mysql 
检查创建用户
tail -1 /etc/passwd

centos最小化安装后,会有mysql的库因此先卸载!

检查安装与否
rpm -qa|grep mysql 
强制卸载 
rpm -e mysql-libs-5.1.73-3.el6_5.x86_64 --nodeps

MySQL从5.5版本开始,通过./configure进行编译配置方式已经被取消,取而代之的是cmake工具。 因此,我们首先要在系统中源码编译安装cmake工具。

wget https://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz 
tar zxvf cmake-2.8.12.2.tar.gz 
cd cmake-2.8.12.2 
./configure 
make && make install

使用cmake来编译安装mysql5.6.17

wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.17.tar.gz
tar zxvf mysql-5.6.17.tar.gz
cd mysql-5.6.17
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 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=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 \
-DMYSQL_USER=mysql \
-DWITH_DEBUG=0 \
-DWITH_SSL=system
make && make install

修改/usr/local/mysql权限

chmod +w /usr/local/mysql
chown -R mysql:mysql /usr/local/mysql

关于my.cnf配置文件:

在启动MySQL服务时,会按照一定次序搜索my.cnf,先在/etc目录下找,找不到则会搜索”$basedir/my.cnf” 就是安装目录下 /usr/local/mysql/my.cnf,这是新版MySQL的配置文件的默认位置! 注意:在CentOS 6.x版操作系统的最小安装完成后,在/etc目录下会存在一个my.cnf,需要将此文件更名为其他的名字。 如:/etc/my.cnf.bak,否则,该文件会干扰源码安装的MySQL的正确配置,造成无法启动。 由于我们已经卸载了最小安装完成后的mysq库所以,就没必要操作了。

进入support-files目录

cd support-files/
如果还有my.cnf请备份
mv /etc/my.cnf /etc/my.cnf.bak
复制配置文件
cp my-default.cnf /etc/my.cnf

执行初始化配置脚本,创建系统自带的数据库和表

/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql

拷贝mysql安装目录下support-files服务脚本到init.d目录

#拷贝脚本
cp support-files/mysql.server /etc/init.d/mysqld
#赋予权限
chmod +x /etc/init.d/mysqld

设置开机启动

chkconfig mysqld on
启动MySQL
service mysqld start
或者
/etc/init.d/mysql start

MySQL5.6.x启动成功后,root默认没有密码,我们需要设置root密码。 设置之前,我们需要先设置PATH,要不,不能直接调用mysql

修改/etc/profile文件
vi /etc/profile
在文件末尾添加
PATH=/usr/local/mysql/bin:$PATH
export PATH

让配置立即生效

source /etc/profile

登陆测试,默认是没有密码,直接回车就可进入

mysql -uroot -p

设置mysql密码

/usr/local/mysql/bin/mysqladmin -uroot -p password '密码'

登陆进命令行模式

mysql -uroot -p

查看用户

select user,host from mysql.user;

删除不必要的用户

drop user ""@localhost;\ 
drop user ""@c65mini.localdomain; 
drop user root@c65mini.localdomain; 
drop user root@'::1';

赋予账号远程访问的权限

GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY '51AIDUOWAN' WITH GRANT OPTION; 
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '51AIDUOWAN' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'c65mini.localdomain' IDENTIFIED BY '51AIDUOWAN' WITH GRANT OPTION;

关于删除MySQL的默认root用户参考:https://blog.chinaunix.net/uid-16844903-id-3377690.html

其它一些信息查询: 检查mysql版本

mysql -uroot -p"密码" -e "select version();"

验证mysql安装路径

ls -ld /usr/local/mysql/

安装PHP5.5.12

PHP依赖关系的解决

libiconv库为需要做转换的应用提供了一个iconv()的函数,以实现一个字符编码到另一个字符编码的转换。 错误提示:configure: error: Please reinstall the iconv library.

wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz 
tar zxvf libiconv-1.14.tar.gz 
cd libiconv-1.14 
./configure --prefix=/usr/local/libiconv 
make && make install 
cd ..

libmcrypt是加密算法扩展库。 错误提示:configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

wget https://lcmp.googlecode.com/files/libmcrypt-2.5.8.tar.gz 
tar zxvf libmcrypt-2.5.8.tar.gz 
cd libmcrypt-2.5.8 
./configure 
make && make install 
cd ..

Mhash是基于离散数学原理的不可逆向的php加密方式扩展库,其在默认情况下不开启。 mhash的可以用于创建校验数值,消息摘要,消息认证码,以及无需原文的关键信息保存 错误提示:configure: error: “You need at least libmhash 0.8.15 to compile this program. https://mhash.sf.net/”

wget https://hivelocity.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.bz2 
tar jxvf mhash-0.9.9.9.tar.bz2 
cd mhash-0.9.9.9 
./configure 
make && make install 
cd ..

mcrypt 是 php 里面重要的加密支持扩展库,Mcrypt扩展库可以实现加密解密功能,就是既能将明文加密,也可以密文还原。

wget https://iweb.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.tar 
./configure 
make && make install 
cd ..

错误提示:configure: error: *** libmcrypt was not found 解决方法:export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH

PHP语法分析器

wget https://hivelocity.dl.sourceforge.net/project/re2c/re2c/0.13.6/re2c-0.13.6.tar.gz 
tar zxvf re2c-0.13.6.tar.gz 
cd re2c-0.13.6 
./configure 
make && make install 
cd ..

如果有错误提示: configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation. configure: error: Cannot find ldap libraries in /usr/lib. 解决方法:

cp -frp /usr/lib64/libldap* /usr/lib/
ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so

我已经把错误都列出来了,应该说是想安装上面的依赖关系然后再走这一步。

wget https://cn2.php.net/distributions/php-5.5.12.tar.gz
tar zxvf php-5.5.12.tar.gz
cd php-5.5.12
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql --with-mysql-sock=/var/lib/mysql/mysql.sock --with-config-file-scan-dir=/usr/local/php/php.d --with-openssl --with-zlib --with-iconv=/usr/local/libiconv --with-mysql=/usr/local/mysql --with-icu-dir=/usr --with-mhash=/usr --with-pcre-dir --without-pear --with-imap --with-kerberos --with-imap-ssl --with-ldap --with-mcrypt --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xmlrpc --with-curl --with-gettext --with-bz2 --enable-ftp --enable-calendar --enable-bcmath --enable-exif --enable-wddx --enable-tokenizer --enable-simplexml --enable-sockets --enable-ctype --enable-gd-native-ttf --enable-mbstring --enable-intl --enable-xml --enable-dom --enable-json --enable-session --enable-soap --enable-zip --enable-maintainer-zts
make && make install
cd ..

可能会提示libtool: install: warning: remember to run libtool –finish /usr/local/src/php-5.5.12/libs’
输入libtool –finish /usr/local/src/php-5.5.12/libs`

创建主配置文件目录
mkdir -p /usr/local/php/etc
额外的配置文件目录
mkdir -p /usr/local/php/php.d
复制配置文件到安装目录下
cp php.ini-production /usr/local/php/etc/php.ini

收尾工作修改相关配置文件

修改apache配置,

vi /usr/local/apache2.4.9/conf/httpsd.conf
#去掉注释,让其支持PHP
LoadModule php5_module modules/libphp5.so
#添加PHP应用类型,让其支持PHP
Addtype application/x-httpsd-php .php .phtml
#添加目录PHP索引类型
<IfModule dir_module>
    DirectoryIndex index.php index.html index.shtml
</IfModule>
#去掉注释虚拟主机注释
Include conf/extra/httpsd-vhosts.conf
#去掉默认配置注释
Include conf/extra/httpsd-default.conf
#修改默认主机目录,前面安装apache的时候已经创建了
DocumentRoot "/home/wwwroot/htdocs"
<Directory "/home/wwwroot/htdocs">
#按照标准需要为apache指定一个新的用户和群组,安装的时候已经创建了apache用户和组
User apache
Group apache

创建虚拟主机 vi /usr/local/apache/conf/extra/httpsd-vhosts.conf

<VirtualHost *:80>
    ServerAdmin www.test.com
    DocumentRoot "/home/wwwroot/htdocs/test.com"
    ServerName test.com
    ErrorLog "logs/test.com-error_log"
    CustomLog "logs/test.com-access_log" common
</VirtualHost>

使用 mod-pagespeed 优化apache,前端性能

错误提示参考:https://www.kwx.gd/Related/Rpm-DSA-Bad.html

cd /etc/pki/rpm-gpg
#下载最新的签名
wget https://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#导入签名key 
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* 

下载安装模块
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm
rpm -i --nodeps mod-pagespeed-beta_current_*.rpm



vi /usr/local/apache/conf/extra/httpsd-includes.conf
添加下面的
#Google PageSpeed Module
Include /etc/httpsd/conf.d/pagespeed.conf

虽然可以直接在httpsd.conf里面includes,按照标准吧。
然后进入httpsd.conf
vi httpsd.conf
注释掉:
#LoadModule deflate_module modules/mod_deflate.so
最底部添加
添加Include /etc/httpsd/conf.d/httpsd-includes.conf

错误提示: httpsd: Syntax error on line 494 of /usr/local/apache2.4.9/conf/httpsd.conf: Syntax error on line 2 of /usr/local/apache2.4.9/conf/extra/httpsd-includes.conf: Syntax error on line 15 of /etc/httpsd/conf.d/pagespeed.conf: Cannot load /usr/lib64/httpsd/modules/mod_deflate.so into server: /usr/lib64/httpsd/modules/mod_deflate.so: cannot open shared object file: No such file or directory

解决方法:找到你的mod_deflate.so模块软连接一下
ln -s /usr/local/apache2.4.9/modules/mod_deflate.so /usr/lib64/httpsd/modules/mod_deflate.so

错误提示: AH00526: Syntax error on line 29 of /etc/httpsd/conf.d/pagespeed.conf: Invalid command ‘AddOutputFilterByType’, perhaps misspelled or defined by a module not included in the server configuration

解决方法:开启 LoadModule filter_module modules/mod_filter.so ,取消前面的注释#符号

使用xcache优化apache,后端性能。

wget https://xcache.lighttpsd.net/pub/Releases/3.1.0/xcache-3.1.0.tar.gz
tar zxvf xcache-3.1.0.tar.gz
cd xcache-3.1.0
/usr/local/php/bin/phpize
./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config
make && make install

复制xcache查看器到网站目录
cp htdocs/ /home/wwwroot/htdocs/xcache -rf

cat >>/usr/local/php/etc/php.ini<<EOF
[xcache-common]
extension = /usr/local/php/lib/php/extensions/no-debug-zts-20121212/xcache.so

[xcache.admin]
xcache.admin.enable_auth = on
xcache.admin.user = "admin"
xcache.admin.pass = "e10adc3949ba59abbe56e057f20f883e"
;运行: echo -n "password" |md5sum |awk '{print $1}' 计算出MD5加密过的密码
;替换xcache.admin.pass=的值

[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 3600
xcache.gc_interval = 60
xcache.var_size = 16M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 3600
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.coredump_directory = "/tmp/phpcore"
xcache.coredump_type = 0
xcache.disable_on_crash = Off
xcache.experimental = Off
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off

[xcache.coverager]
xcache.coverager = Off
xcache.coverager_autostart =  On
xcache.coveragedump_directory = "/tmp/pcov"
EOF

安装phpmyadmin

wget https://iweb.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.2.1/phpMyAdmin-4.2.1-all-languages.tar.gz
tar zxvf phpMyAdmin-4.2.1-all-languages.tar.gz
mv phpMyAdmin-4.2.1-all-languages phpmyadmin
cd phpMyAdmin
mkdir config 
chmod o+rw config
mv config/config.inc.php
chmod o-rw config.inc.php
rm -rf config

修改mysql配置文件,这里已经完美解决了 MYSQL 5.6中禁用INNODB引擎 各种错误提示。配置文件可以根据实际情况调整,并不是每个人都需要INNODB引擎,大型的网站可以考虑,我等小博客,小网站的还是老实点禁用了吧。节约资源为前提。

[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 
[client]
port        = 3306
socket      = /var/lib/mysql/mysql.sock
[mysqld]
explicit_defaults_for_timestamp=true
port        = 3306
socket      = /var/lib/mysql/mysql.sock
datadir = /usr/local/mysql/data
default-storage-engine=MyISAM
default-tmp-storage-engine=MYISAM
#loose-skip-innodb
skip-innodb
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log-bin=mysql-bin
binlog_format=mixed
server-id   = 1
loose-innodb-trx=0 
loose-innodb-locks=0 
loose-innodb-lock-waits=0 
loose-innodb-cmp=0 
loose-innodb-cmp-per-index=0
loose-innodb-cmp-per-index-reset=0
loose-innodb-cmp-reset=0 
loose-innodb-cmpmem=0 
loose-innodb-cmpmem-reset=0 
loose-innodb-buffer-page=0 
loose-innodb-buffer-page-lru=0 
loose-innodb-buffer-pool-stats=0 
loose-innodb-metrics=0 
loose-innodb-ft-default-stopword=0 
loose-innodb-ft-inserted=0 
loose-innodb-ft-deleted=0 
loose-innodb-ft-being-deleted=0 
loose-innodb-ft-config=0 
loose-innodb-ft-index-cache=0 
loose-innodb-ft-index-table=0 
loose-innodb-sys-tables=0 
loose-innodb-sys-tablestats=0 
loose-innodb-sys-indexes=0 
loose-innodb-sys-columns=0 
loose-innodb-sys-fields=0 
loose-innodb-sys-foreign=0 
loose-innodb-sys-foreign-cols=0
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
赞(0)
未经允许不得转载:菜鸟HOW站长 » 实践编译安装可生产的 LAMP 环境 包含 pagespeed前端优化 Xcache后端优化
分享到: 更多 (0)

留下你的脚印

  订阅  
关注动态