国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Debian > 正文

Debian下手動(dòng)安裝LiteSpeed+PHP+MySQL教程

2020-10-21 21:54:56
字體:
供稿:網(wǎng)友
如果實(shí)在懶得動(dòng)腦,可以參考之前的文章,使用llsmp一鍵安裝包。下面開始安裝!

1.清理Debian,去除不必要的軟件包
2.安裝MySQL及相關(guān)的庫文件
3.安裝LiteSpeed
4.編譯PHP
5.配置eAccelerator
6.安裝Zend Loader

1.清理Debian,去除不必要的軟件包

復(fù)制代碼
代碼如下:

apt-get update
apt-get -y purge apache2-* bind9-* xinetd samba-* nscd-* portmap sendmail-* sasl2-bin
apt-get -y purge lynx memtester unixodbc python-* odbcinst-* sudo tcpdump ttf-*
apt-get autoremove && apt-get clean

2.安裝MySQL及相關(guān)的庫文件

復(fù)制代碼
代碼如下:

apt-get remove apache
apt-get update
apt-get upgrade
apt-get install autoconf gcc g++ libjpeg62-dev libpng12-dev libxml2-dev curl libcurl4-openssl-dev libmcrypt-dev libmhash-dev libfreetype6-dev patch make mcrypt mysql-server libmysql++-dev zlib-bin zlib1g-dev

設(shè)置autoconf

復(fù)制代碼
代碼如下:

export PHP_AUTOCONF=/usr/bin/autoconf
export PHP_AUTOHEADER=/usr/bin/autoheader

安裝時(shí)中途會(huì)詢問MySQL的密碼,連續(xù)輸入兩次即可

3.安裝LiteSpeed
訪問LiteSpeed官網(wǎng)獲得最新版本的下載鏈接:http://litespeedtech.com/litespeed-web-server-downloads.html

復(fù)制代碼
代碼如下:

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

出現(xiàn)許可協(xié)議,只需持續(xù)按下【空格】鍵到最后,輸入Yes(注意Y大寫)

交互回答如下問題

復(fù)制代碼
代碼如下:

Destination [/usr/local/lsws]: 回車
User name [admin]:管理員賬號(默認(rèn)admin)
Password:管理員密碼
Retype password:密碼確認(rèn)
Email addresses [root@localhost]:你的郵箱
User [nobody]:默認(rèn),直接回車
Group [nogroup]:默認(rèn),直接回車
HTTP port [8088]:寫80
Admin HTTP port [7080]:Litespeed面板端口,可默認(rèn),直接Enter
Setup up PHP [Y/n]:默認(rèn),直接回車
Suffix for PHP script(comma separated list) [php]:默認(rèn),直接回車
Would you like to install AWStats Add-on module [y/N]?默認(rèn),直接回車
Would you like to have LiteSpeed Web Server started automatically when the server restarts [Y/n]?默認(rèn),直接回車
Would you like to start it right now [Y/n]?默認(rèn),直接回車

此時(shí)不要關(guān)閉SSH窗口,后面還要用到~
4.編譯PHP
訪問litespeed管理后臺:http://ip:7080

點(diǎn)擊Actions->Compile PHP

選擇PHP版本,點(diǎn)擊Next(我選擇的是5.3.15)

在編譯參數(shù)中填寫為如下段,

'--with-pdo-mysql' '--with-mysql' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--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'小內(nèi)存VPS在編譯的時(shí)候,會(huì)出現(xiàn)內(nèi)存不夠的問題”virtual memory exhausted: Cannot allocate memory”,此時(shí)在參數(shù)欄處再上如下參數(shù),重新編譯一下應(yīng)該就OK了~
--disable-fileinfo下面可選安裝組件,我只選擇了eAccelerator;

點(diǎn)擊Build PHP 5.x.x

LiteSpeed開始下載包,下載完成后,點(diǎn)擊Next

此時(shí)不要刷新頁面!
在SSH運(yùn)行如下命令:

/usr/local/lsws/phpbuild/buildphp_manual_run.sh直到瀏覽器提示“*Complete*”就算是大功告成了~

5.配置eAccelerator
PHP雖然安裝好了,但之前我們選擇的eAccelerator還需要配置一下

創(chuàng)建eAccelerator的緩存目錄

復(fù)制代碼
代碼如下:

mkdir /usr/local/eaccelerator_cache
chmod -R 777 /usr/local/eaccelerator_cache

編輯php.ini

復(fù)制代碼
代碼如下:

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.compress="1"
eaccelerator.compress_level="9"
eaccelerator.keys = "disk_only"
eaccelerator.sessions = "disk_only"
eaccelerator.content = "disk_only"

這時(shí),可以打開http://ip/phpinfo.php看看eAccelerator安裝的如何~

6.安裝Zend Loader

復(fù)制代碼
代碼如下:

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

添加如下字段

復(fù)制代碼
代碼如下:

[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

環(huán)境基本配置好了,但是要使用還需要添加虛擬主機(jī)等一系列的步驟和過程,微魔會(huì)在日后的教程中和大家分享~
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 松潘县| 乐陵市| 四川省| 中方县| 信宜市| 阿克陶县| 胶州市| 辰溪县| 永昌县| 普兰店市| 犍为县| 金昌市| 尼木县| 高雄市| 历史| 永寿县| 商都县| 张家口市| 马龙县| 台山市| 南京市| 宽甸| 大悟县| 大兴区| 滨州市| 广宗县| 江源县| 无棣县| 新郑市| 泸溪县| 册亨县| 乌恰县| 临漳县| 剑河县| 政和县| 铜鼓县| 板桥市| 城步| 邯郸县| 瓮安县| 陆良县|