脚本宝典收集整理的这篇文章主要介绍了Debian下手动安装LiteSpeed+PHP+MySQL教程,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
如果实在懒得动脑,可以参考之前的
文章,使用llsmp一键安装包。下面
开始安装!
1.清理
Debian,去除不必要的
软件包 2.安装
MySQL及相关的库文件
3.安装L
ITeS
PEed
4.编译PHP
5.配置eAccelerator
6.安装Zend Loader
1.清理Debian,去除不必要的软件包
apt-get update
apt-get -y
purge apache2-* bind9-* x
inetd s
amba-* nscd-* portmap sendm
ail-* sasl2-bin
apt-get -y purge lynx
Memtester unixodbc python-* odbcinst-* sudo tcpdump ttf-*
apt-get autoremove
&& apt-get clean
2.安装My
SQL及相关的库文件
apt-get remove apache
apt-get update
apt-get upgrade
apt-get install autoconf gcc g++ libjpeg62-dev libpng12-dev lib
XMl2-dev curl libcurl4-openssl-dev libmcrypt-dev libmhash-dev libfreetype6-dev patch make mcrypt mysql
-server libmysql++-dev zlib-bin zlib1g-dev
设置autoconf
export PHP_AUTOCONF=/usr/bin/autoconf
e
xport PHP_AUTOHEADER=/usr/bin/autoheader
安装时中途会
询问MySQL的密码,连续输入两次即可
3.安装LiteSpeed
访问LiteSpeed官网获得最新版本的下载链接:http://litespeedtech
.COM/litespeed-web-server-downloads.ht
ML cd /
tmp wget http://litespeedtech.com/packages/4.0/lsws-4.1.13-std-
i386-linux.tar.gz
tar zxvf lsws*
cd lsws*
sh ./install.sh
出现许可协议,只需持续按下【空格】键到最后,输入Yes(注意Y大写)
交互回答如下问题
Destination [/usr/local/lsws]: 回车
User name [admin]:管理员
账号(默认admin)
Password:管理员密码
Retype password:密码确认
Email addresses [
root@localhost]:你的邮箱
User [nobody]:默认,直接回车
Group [nogroup]:默认,直接回车
HTTP port [8088]:写80
Admin HTTP port [7080]:Litespeed面板端口,可默认,直接Enter
SETUP up PHP [Y/n]:默认,直接回车
Suffix for PHP script(comma separated list) [php]:默认,直接回车
Would you like to install AW
stats Add-on module [y/N]?默认,直接回车
Would you like to have LiteSpeed Web Server started automat
ically when the server restarts [Y/n]?默认,直接回车
Would you like to start it right now [Y/n]?默认,直接回车
此时不要关闭SSH窗口,后面还要用到~
4.编译PHP
访问litespeed管理后台:http://ip:7080
点击Actions->Compile PHP
选择PH
P版本,点击Next(我选择的是5.3.15)
在编译参数中填写为如下段,
'--with-pdo-mysql' '--with-mysql' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable
-track-
VARs' '--enable-sockets' '--enable-
Sysv
SEM' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with
-iconv' '--with-litespeed' '--enable-inline-optimization' '--with-curl' '--with-curlwrappers' '--with-mcrypt' '--with-mhash' '--with-mime-magic' '--with-openssl' '--with-freetype-dir=/usr/lib' '--with-jpeg-dir=/usr/lib'小内存VPS在编译的时候,会出现内存不够的问题”virtual memory exhausted: Cannot allocate memory”,此时在参数栏处再上如下参数,重新编译一下
应该就OK了~
--disable-fil
einfo下面可选安装组件,我只选择了eAccelerator;
点击Build PHP 5.x.x
LiteSpeed开始下载包,下载完成后,点击Next
此时不要刷新页面!
在SSH运行如下命令:
/usr/local/lsws/phpbuild/buildphp_manual_run.sh直到浏览器提示“*
complete*”就算是大功告成了~
5.配置eAccelerator
PHP虽然安装好了,但之前我们选择的eAccelerator还需要配置一下
创建eAccelerator的缓存目录
mkdir /usr/local/eaccelerator_cache
chmod -R @R_
406_2568@ /usr/local/eaccelerator_cache
编辑php.ini
cp /usr/local/lsws/php/php.ini /usr/local/lsws/lsphp5/lib/
vi /usr/local/lsws/lsphp5/lib/php.ini
在Php.ini后面加入如下字段
[eaccelerator]
zend_extension="/usr/local/lsws/lsphp5/lib/php/
extensions/no-debug-non-zts-20090626/eaccelerator.so"
eaccelerator.shm_size="1"
eaccelerator.cache_dir="/usr/local/eaccelerator_cache"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_
TTL="
3600"
eaccelerator.shm_
PRune_period="3600"
eaccelerator.shm_only="0"
eaccelerator.com
Press="1"
eaccelerator.compress_level="9"
eaccelerator.keys = "
disk_only"
eaccelerator.sessions = "disk_only"
eaccelerator.content = "disk_only"
这时,可以打开http://ip/phpinfo.php看看eAccelerator安装的如何~
6.安装Zend Loader
wget http://downloads.zend.com/
Guard/5.5.0/ZendGuardLoader-php-5.3-linux-
glibc23-i386.tar.gz
tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
mkdir -p /usr/local/zend/
cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-
5.3.x/ZendGuardLoader.so /usr/local/zend/
编辑php.ini
vi /usr/local/lsws/lsphp5/lib/php.ini
添加如下字段
[Zend.loader]
zend_loader.enable=1
zend_loader.disable_licensing=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
zend_extension="/usr/local/zend/ZendGuardLoader.so"
查看
是否安装成功
/usr/local/lsws/lsphp5/bin/php -v
最后重启litespeed
生效~
/etc/init.d/lsws restart
环境基本配置好了,但是要使用还需要添加虚拟主机等一
系列的步骤和过程,微魔会在日后的教程中和大家分享~
脚本宝典总结
以上是脚本宝典为你收集整理的Debian下手动安装LiteSpeed+PHP+MySQL教程全部内容,希望文章能够帮你解决Debian下手动安装LiteSpeed+PHP+MySQL教程所遇到的问题。
如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。