LiteSpeed是一款可以替換Apache的企業(yè)級(jí)Web服務(wù)器,具有高性能,低資源占用,安全,易用的特點(diǎn)。它支持直接使用Apache的配置文件,可直接使用.htacess,無(wú)需額外配置,兼容Mod_Security。因此避免像Nginx那樣需要自己寫重寫規(guī)則的麻煩。
而OpenLiteSpeed是LiteSpeed的開源免費(fèi)版本,除了保留了LiteSpeed輕量、高性能的特性外,它還加入了非常多的“前沿”技術(shù),例如HTTP3/QUIC/TLS1.3/Brotli等都是默認(rèn)就支持的,而且LiteSpeed Cache 高性能緩存功能可以大大提升PHP的執(zhí)行效率。
OpenLiteSpeed提供了一個(gè)服務(wù)器控制面板,這個(gè)控制面板可以讓實(shí)現(xiàn)在線添加虛擬主機(jī)、綁定域名、設(shè)置端口號(hào)等建站操作,對(duì)于想要使用LiteSpeed來(lái)建站的朋友是一個(gè)非常好的平臺(tái)。
更多的VPS控制面板請(qǐng)參考:服務(wù)器控制面板榜單。比較推薦用于建站的免費(fèi)面板有:
PS:更新記錄.
1、不想要使用Apache和Nginx,追求更高的OpenLiteSpeed和支持LSCache高性能緩存,請(qǐng)使用:CyberPanel免費(fèi)開源面板-高速LSCache免費(fèi)SSL證書-可自建DNS和企業(yè)郵局。2021.5.10
網(wǎng)站:
直接根據(jù)你自己的操作系統(tǒng)使用命令安裝即可:
CentOS 5: rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el5.noarch.rpmCentOS 6: rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpmCentOS 7: rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpmCentOS 8: rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpmDebian 7, 8 & Ubuntu 12,14,16,18 : wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | bashFor CentOS:yum install openlitespeedFor Debian & Ubuntu:apt-get install openlitespeed
默認(rèn)的OpenLiteSpeed是安裝了PHP7.3,執(zhí)行以下命令安裝PHP 7.3:
For CentOS:yum install epel-releaseyum install lsphp73 lsphp73-common lsphp73-mysql lsphp73-gd lsphp73-process lsphp73-mbstring lsphp73-xml lsphp73-mcrypt lsphp73-pdo lsphp73-imap lsphp73-soap lsphp73-bcmathln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5For Debian & Ubuntu:apt-get install lsphp73ln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5
想要安裝多個(gè)PHP的,可以使用以下命令安裝(想要哪個(gè)版本只要替換一下數(shù)字就行):
apt-get install lsphp74ln -sf /usr/local/lsws/lsphp74/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5#If you wish to install an older version such as PHP 5.6, replace lsphp73 to lsphp56.
執(zhí)行以下命令安裝mariadb數(shù)據(jù)庫(kù)。
sudo apt-get install mariadb-server mariadb-client
執(zhí)行以下命令對(duì)數(shù)據(jù)庫(kù)進(jìn)行安全設(shè)置。
mysql_secure_installation
主要是是否移除匿名登錄、Root登錄等,挖站否想保留Root登錄所以選擇的是n,你也可以自己選擇y,以保證數(shù)據(jù)庫(kù)的安全。
root@ecs-OA5Ok:~# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, well need the currentpassword for the root user. If youve just installed MariaDB, andyou havent set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none): OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.You already have a root password set, so you can safely answer n.Change the root password? [Y/n] n ... skipping.By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] y ... Success!Normally, root should only be allowed to connect from localhost. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] n ... skipping.By default, MariaDB comes with a database named test that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success!Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] y ... Success!Cleaning up...All done! If youve completed all of the above steps, your MariaDBinstallation should now be secure.Thanks for using MariaDB!
重啟或者關(guān)閉數(shù)據(jù)庫(kù)。
systemctl start mariadbsystemctl restart mariadb
執(zhí)行以下命令啟動(dòng)或者停止OpenLiteSpeed。
打開你的OpenLiteSpeed,地址是:IP:8088,你可以看到你的OpenLiteSpeed運(yùn)行成功了。
修改OpenLiteSpeed登錄賬號(hào)和密碼:
然后打開OpenLiteSpeed的登錄地址:IP:7080。
這個(gè)就是OpenLiteSpeed的后臺(tái)管理面板,主要有主面板、服務(wù)器、監(jiān)聽(tīng)器、虛擬主機(jī)、虛擬主機(jī)模板、工具、管理控制臺(tái)設(shè)置等。(點(diǎn)擊放大)
OpenLiteSpeed沒(méi)有在線的數(shù)據(jù)庫(kù)管理PHPMyAdmin,所以管理數(shù)據(jù)庫(kù)都比較麻煩,我們可以自己安裝一個(gè)。使用以下命令登錄到你的數(shù)據(jù)庫(kù),創(chuàng)建一個(gè)數(shù)據(jù)庫(kù)名:wzfou
,密碼為:wzfou.com
的數(shù)據(jù)庫(kù)。(請(qǐng)?zhí)鎿Q為你自己的)
sudo mysql -u root -pCREATE DATABASE wzfou CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;GRANT ALL PRIVILEGES ON wzfou.* TO wzfou@localhost IDENTIFIED BY wzfou.com;FLUSH PRIVILEGES;quit
然后是下載并安裝PHPMyAdmin了,使用以下命令:
cd /usr/local/lsws/Example/htmlwget https://files.phpmyadmin.net/phpMyAdmin/4.9.7/phpMyAdmin-4.9.7-all-languages.zip#apt install unzipunzip phpMyAdmin-4.9.7-all-languages.zipmv phpMyAdmin-4.9.7-all-languages phpmyadmin
現(xiàn)在打開地址:http://server_IP:8088/phpmyadmin/index.php
,你就可以看到PHPMyAdmin管理界面了。
使用上面創(chuàng)建的數(shù)據(jù)庫(kù)用戶名和密碼(如果你沒(méi)有禁用Root,也可以使用Root登錄)登錄到PHPMyAdmin
。
點(diǎn)擊監(jiān)聽(tīng)器。
然后添加80端口
按照同樣的方法同時(shí)也開通443端口,選擇加密連接。
進(jìn)入到你的VPS主機(jī)路徑:/usr/local/lsws/
,創(chuàng)建文件夾wzfoumm
,然后在文件夾里創(chuàng)建html和log
兩個(gè)文件夾。如下圖:
然后點(diǎn)擊添加虛擬主機(jī),設(shè)置好網(wǎng)站的根目錄:wzfoumm
,配置文件路徑:conf/vhosts/wzfoumm/vhconf.conf
,開啟啟用外部應(yīng)用程序,其它的請(qǐng)參考OpenLiteSpeed默認(rèn)的網(wǎng)站配置即可。
配置文件會(huì)提示路徑不存在,你直接點(diǎn)擊新建就會(huì)自動(dòng)生成了。
設(shè)置網(wǎng)站根目錄,綁定好你的域名。
進(jìn)入到OpenLiteSpeed的虛擬主機(jī)配置頁(yè)面。
然后在索引文件那里輸入你想要默認(rèn)的首頁(yè)文件,一般地是:index.php,index.html
。
開啟服務(wù)器錯(cuò)誤日志,可以設(shè)置大小,是否切割,保留多少天數(shù),如下圖:
開啟服務(wù)器訪問(wèn)日志,如下圖:
在網(wǎng)站的“安全”一項(xiàng),在允許列表中輸入:*,表示你允許所有訪問(wèn),當(dāng)然這里也可以添加拒絕訪問(wèn)的IP或者IP段。
在虛擬主機(jī)“重寫”一欄中開啟重啟和自動(dòng)加載 .htaccess
,這樣你的網(wǎng)站就可以像Apache一樣開啟偽靜態(tài)了。
OpenLiteSpeed開啟SSL證書非常地簡(jiǎn)單,這里我們以O(shè)penLiteSpeed安裝并配置letsencrypt免費(fèi)SSL證書為例。關(guān)于acme.sh詳細(xì)的教程請(qǐng)參考:簡(jiǎn)單三步給網(wǎng)站申請(qǐng)安裝letsencrypt免費(fèi)SSL證書-acme.sh自動(dòng)續(xù)期。
網(wǎng)站:
使用以下可以一鍵安裝:
curl https://get.acme.sh | sh
或者:
wget -O - https://get.acme.sh | sh
使用喜歡Git命令也可以用以下命令安裝:
git clone https://github.com/Neilpang/acme.sh.gitcd ./acme.sh./acme.sh --install
然后使用以下命令簽發(fā)域名SSL證書:
acme.sh --issue -d loco.wzfou.me -w /usr/local/lsws/wzfoumm/html
簽發(fā)成功后,你就可以得到你的Key和證書路徑。
[Sat Jan 23 02:50:47 UTC 2021] Your cert is in /root/.acme.sh/loco.wzfou.me/loco.wzfou.me.cer [Sat Jan 23 02:50:47 UTC 2021] Your cert key is in /root/.acme.sh/loco.wzfou.me/loco.wzfou.me.key [Sat Jan 23 02:50:47 UTC 2021] The intermediate CA cert is in /root/.acme.sh/loco.wzfou.me/ca.cer [Sat Jan 23 02:50:47 UTC 2021] And the full chain certs is there: /root/.acme.sh/loco.wzfou.me/fullchain.cer
回到你的服務(wù)器端口監(jiān)聽(tīng)那里,找到443端口,把你剛剛生成的loco.wzfou.com.key 和loco.wzfou.com/fullchain.cer
證書密鑰和證書路徑復(fù)制進(jìn)去保存。
現(xiàn)以你就可以到你的虛擬主機(jī)的SSL管理那里,同樣將loco.wzfou.com.key 和loco.wzfou.com/fullchain.cer
證書密鑰和證書路徑復(fù)制進(jìn)去保存。
另外,對(duì)于SSL你還可以進(jìn)入一系列的自定義,例如SSL重新協(xié)商保護(hù)、啟用會(huì)話緩存、啟用會(huì)話單、啟用SPDY/HTTP2、Enable QUIC等系列操作。
重啟你的OpenLiteSpeed,打開你的瀏覽器你就可以看到letsencrypt免費(fèi)SSL證書安裝成功了。
首先,你需要安裝多個(gè)PHP版本,方法請(qǐng)參考上面第一部分安裝PHP部分,然后到你的服務(wù)器設(shè)置那里,添加 外部應(yīng)用程序。
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/117859.html
摘要:是一個(gè)基于開發(fā)的服務(wù)器控制面板,支持高性能緩存,提供免費(fèi)證書,可以一鍵簽發(fā)證書,支持自建服務(wù)器,可以一鍵安裝,你可以用它搭建服務(wù)器。關(guān)于的安裝與使用早在年挖站否就已經(jīng)分享過(guò)了免費(fèi)服務(wù)器面板安裝與使用,這幾年發(fā)展越來(lái)越好了。CyberPanel是一個(gè)基于OpenLiteSpeed開發(fā)的服務(wù)器控制面板,支持LSCache高性能緩存,提供免費(fèi)letsencrypt SSL證書,可以一鍵簽發(fā)SSL證...
摘要:安裝建站程序域名解析做完,下一步是安裝建站程序,然后才能開始建站。 官方網(wǎng)站 點(diǎn)擊直達(dá)ChemiCloud官網(wǎng) 方案整理 可選數(shù)據(jù)中心包括:達(dá)拉斯(美國(guó)),法蘭克福(EU),布加勒斯特(EU),倫敦(英國(guó)),班加羅爾(亞洲),新加坡(亞洲)和悉尼(澳大利亞),所有型號(hào)均贈(zèng)送免費(fèi)的域名注冊(cè)。 Web Hosting S...
由于受TurnKey Internet的Cpanel授權(quán)限制的問(wèn)題,挖站否中文DirectAdmin面板美國(guó)1GB免費(fèi)PHP空間作為備胎上線了。自從去年上線了(第一期)挖站否免費(fèi)空間和(第二期)挖站否免費(fèi)空間,已經(jīng)陸續(xù)為近五百多用戶提供了免費(fèi)PHP空間服務(wù)。本來(lái)想著Cpanel服務(wù)器達(dá)到一定的用戶數(shù)量后再啟用美國(guó)CN2服務(wù)器,這次TurnKey Internet的Cpanel授權(quán)問(wèn)題也倒逼著加快上...
挖站否美國(guó)免費(fèi)空間為站長(zhǎng)Qi提供的為廣大新手朋友學(xué)習(xí)建站的免費(fèi)服務(wù),免費(fèi)空間采用Cpanel面板 ,支持中文,功能非常強(qiáng)大,比較適合想要用虛擬主機(jī)學(xué)習(xí)建站的朋友。免費(fèi)空間還提供免費(fèi)二級(jí)域名,沒(méi)有域名的朋友也可以使用空間了。 挖站否美國(guó)免費(fèi)空間目前的配置是:空間大小1GB、月流量10GB、可綁3個(gè)域名、1個(gè)附加域名、1個(gè)數(shù)據(jù)庫(kù)、1個(gè)FTP賬號(hào)?;谖乙郧笆褂妹赓M(fèi)空間的經(jīng)驗(yàn),這個(gè)配置基本上可以滿...
摘要:一鍵配置環(huán)境網(wǎng)站數(shù)據(jù)庫(kù)通過(guò)端輕松管理服務(wù)器。點(diǎn)擊進(jìn)入領(lǐng)取寶塔面板元禮包地址版請(qǐng)確保純凈系統(tǒng)安裝支持,端管理,支持一鍵創(chuàng)建網(wǎng)站數(shù)據(jù)庫(kù)安全管理,計(jì)劃任務(wù),文件管理,多版本共存及切換,一鍵開啟環(huán)境。越來(lái)越多的人選擇wordpress建站,個(gè)人站長(zhǎng)其實(shí)門檻很低的,但是有些朋友覺(jué)得Linux服務(wù)器的各種命令腳本自己沒(méi)法搭建環(huán)境。今天,小編給大家推薦一個(gè)不錯(cuò)的Linux面板工具,寶塔面板是一款使用方便、...
閱讀 740·2023-04-25 19:43
閱讀 3986·2021-11-30 14:52
閱讀 3816·2021-11-30 14:52
閱讀 3873·2021-11-29 11:00
閱讀 3809·2021-11-29 11:00
閱讀 3907·2021-11-29 11:00
閱讀 3584·2021-11-29 11:00
閱讀 6197·2021-11-29 11:00