Litespeed+mysql+php简单安装加优化(Ubuntu)

安装Mysql
apt-get install mysql-server-5.1

wget http://www.litespeedtech.com/packages/4.0/lsws-4.1.5-std-i386-linux.tar.gz
tar zxvf lsws-4.1.5-std-i386-linux.tar.gz
cd lsws-4.0.17
chown root:root install.sh
./install.sh

出现–More–(27%)的许可协议,可以直接按空格键或者回车跳到最后.
Do you agree with above license? #这里需要输入Yes (Y要大写)
下面的基本一直回车和选Y就OK了

安装完成就可以访问http://IP:7080来管理LiteSpeed,

最后就是安装php了,在litespeed控制面板选择Compile PHP
然后选择要安装的php版本,我这里选择php5.3.3,然后用以下参数编译
另外,我还选了Suhosin,PHP Mail Header Patch,XCache(DZ不支持最新版本的eAccelerator),pecl/memcache
'--with-litespeed' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-iconv-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir' '--enable-xml' '--enable-discard-path' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--with-curlwrappers' '--enable-mbregex' '--enable-mbstring' '--with-mcrypt' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-soap'

按下一步之后,需要你在SSH运行下面的命令,来进行安装
/usr/local/lsws/phpbuild/buildphp_manual_run.sh

安装好之后,我们还需要安装Memcached
cd /usr/local/src
wget http://cloud.github.com/downloads/saberma/saberma.github.com/memcached-1.4.4.tar.gz
tar vxf memcached-1.4.4.tar.gz
cd memcached-1.4.4
./configure --prefix=/usr/local/memcached
make && make install

安装好之后运行下:
/usr/local/memcached/bin/memcached -d -m 32 -l 127.0.0.1 -p 11211 -u root
这里分配了32的内存,如果你的内存够,可以多分配点

Author: Lei

1 thought on “Litespeed+mysql+php简单安装加优化(Ubuntu)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.