Web服務器安裝全記錄(VPS+Linux+WebServer+WebAdmin+WebApp)

Web服務器安裝全記錄(VPS+Linux+WebServer+WebAdmin+WebApp)

目錄:

  1. VPS虛擬專用服務器購買及配置
  2. Linux操作系統(tǒng)安裝
  3. Web服務程序安裝
  4. Web管理程序安裝
  5. Web應用程序安裝

名詞解釋:

  • VPS: 虛擬專用服務器
  • Linux: Linux操作系統(tǒng)安裝
  • WebServer: Web服務(含Apach/Nginx, MySQL/MariaDB, PHP)
  • WebAdmin: Web服務管理面板(例如寶塔面板等)
  • WebAPP: Web應用程序(例如WordPress等)

1 VPS虛擬專用服務器購買及配置

1.1 Vultr

1)購買服務器

Vultr VPS 2.5刀的套餐免費擁有IPV4的bug方法 – VPS攻略 (vpsgongyi.net)

2022-07-26 Vultr:

Address: 139.180.131.130
Netmask: 255.255.254.0
Gateway: 139.180.130.1
Reverse DNS: 139.180.131.130.vultrusercontent.com

Address: 2001:19f0:4400:6300:5400:04ff:fe15:20e5
Network: 2001:19f0:4400:6300::
Netmask: 64
Recursive DNS: 2001:19f0:300:1704::6

2 Linux操作系統(tǒng)安裝

不容錯過的 5 個微型 Linux 發(fā)行版 - 知乎 (zhihu.com)

1.1 Raspberry Pi Desktop

1)安裝

2)倉庫鏡像修改

Debian 的軟件源配置文件是 /etc/apt/sources.list。將系統(tǒng)自帶的該文件做個備份再悼,將該文件替換為下面內容凝垛,即可使用 NJU軟件源鏡像。
請根據 Debian/Ubuntu 版本自行替換{{release_name}}

  • stretch/buster
  • bullseye/testing
deb https://mirror.nju.edu.cn/debian/ {{release_name}} main contrib non-free
# deb-src https://mirror.nju.edu.cn/debian/ {{release_name}} main contrib non-free
deb https://mirror.nju.edu.cn/debian/ {{release_name}}-updates main contrib non-free
# deb-src https://mirror.nju.edu.cn/debian/ {{release_name}}-updates main contrib non-free
deb https://mirror.nju.edu.cn/debian/ {{release_name}}-backports main contrib non-free
# deb-src https://mirror.nju.edu.cn/debian/ {{release_name}}-backports main contrib non-free
deb https://mirror.nju.edu.cn/debian-security {{release_name}}-security main contrib non-free
# deb-src https://mirror.nju.edu.cn/debian-security {{release_name}}-security main contrib non-free

3)更新及設置

apt update
fdisk -l
df
reboot

∞)參考:

Raspberry Pi Desktop for PC and Mac – Raspberry Pi
Debian 幫助文檔 (nju.edu.cn)

1.2 Debian

1.3 Deepin

3 Web服務程序安裝(本章可跳過,直接按照第4章安裝Web管理程序)

介紹 · LEMP (ninghao.net)

3.1 安裝Apach / Nginx

nginx: Linux packages

3.2 安裝MySQL / MariaDB

MariaDB Foundation - MariaDB.org

3.3 安裝PHP

PHP: Debian GNU/Linux 安裝說明 - Manual
apt install php-mysql

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
 gir1.2-packagekitglib-1.0 libappstream4 libdw1 libglib2.0-bin libgstreamer1.0-0 libpackagekit-glib2-18 libstemmer0d libunwind8 packagekit packagekit-tools python3-software-properties
 software-properties-common
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
 php-common php7.4-common php7.4-mysql
The following NEW packages will be installed:
 php-common php-mysql php7.4-common php7.4-mysql
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,167 kB of archives.
After this operation, 8,127 kB of additional disk space will be used.

3.4 樹莓派安裝服務器

sudo apt-get update
sudo apt-get install php-mysql
sudo apt-get install samba
sudo apt-get install samba-common-bin
sudo vim /etc/samba/smb.conf
sudo apt-get install vsftpd
sudo service vsftpd start
sudo vim /etc/vsftpd.conf

4 Web管理程序安裝

4.1 安裝OpenLiteSpeed

1)腳本一鍵安裝

輸入:

bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh ) -w

輸出:

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100 65793  100 65793    0     0   526k      0 --:--:-- --:--:-- --:--:--  526k
**********************************************************************************************
*                    Open LiteSpeed One click installation, Version 3.0                      *
*                    Copyright (C) 2016 - 2022 LiteSpeed Technologies, Inc.                  *
**********************************************************************************************
Current platform is DEBIAN11 debian bullseye.

Starting to install OpenLiteSpeed to /usr/local/lsws/ with the parameters below,
WebAdmin password:        
WebAdmin email:           root@localhost
LSPHP version:            81
MariaDB version:          10.9
Install WordPress:        Yes
WordPress HTTP port:      80
WordPress HTTPS port:     443
WordPress language:       en_US
Web site domain:          *
MySQL root Password:      
Database name:            olsdbname
Database username:        olsdbuser
Database password:        
WordPress plus:           No
WordPress location:       /usr/local/lsws/wordpress (New install)
Your password will be written to file:  /usr/local/lsws/password

2)關閉防火墻

ufw disable

∞)參考

OpenLiteSpeed
1-Click Install OLS, PHP, MySQL, WP and LSCache – OpenLiteSpeed
如何在Debian 10中使用ufw設置防火墻 - 知乎 (zhihu.com)

4.2 寶塔面板

寶塔面板下載,免費全能的服務器運維軟件 (bt.cn)

5 Web應用程序安裝

適用于博客到大型網站的 CMS (內容管理系統(tǒng)) | WordPress.org China 簡體中文

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市侯勉,隨后出現的幾起案子,更是在濱河造成了極大的恐慌铝阐,老刑警劉巖址貌,帶你破解...
    沈念sama閱讀 218,122評論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現場離奇詭異,居然都是意外死亡练对,警方通過查閱死者的電腦和手機余舶,發(fā)現死者居然都...
    沈念sama閱讀 93,070評論 3 395
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來锹淌,“玉大人,你說我怎么就攤上這事赠制÷赴冢” “怎么了?”我有些...
    開封第一講書人閱讀 164,491評論 0 354
  • 文/不壞的土叔 我叫張陵钟些,是天一觀的道長烟号。 經常有香客問我,道長政恍,這世上最難降的妖魔是什么汪拥? 我笑而不...
    開封第一講書人閱讀 58,636評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮篙耗,結果婚禮上迫筑,老公的妹妹穿的比我還像新娘。我一直安慰自己宗弯,他們只是感情好脯燃,可當我...
    茶點故事閱讀 67,676評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著蒙保,像睡著了一般辕棚。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上邓厕,一...
    開封第一講書人閱讀 51,541評論 1 305
  • 那天逝嚎,我揣著相機與錄音,去河邊找鬼详恼。 笑死补君,一個胖子當著我的面吹牛,可吹牛的內容都是我干的昧互。 我是一名探鬼主播赚哗,決...
    沈念sama閱讀 40,292評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼硅堆!你這毒婦竟也來了屿储?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 39,211評論 0 276
  • 序言:老撾萬榮一對情侶失蹤渐逃,失蹤者是張志新(化名)和其女友劉穎够掠,沒想到半個月后,有當地人在樹林里發(fā)現了一具尸體茄菊,經...
    沈念sama閱讀 45,655評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡疯潭,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 37,846評論 3 336
  • 正文 我和宋清朗相戀三年赊堪,在試婚紗的時候發(fā)現自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片竖哩。...
    茶點故事閱讀 39,965評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡哭廉,死狀恐怖,靈堂內的尸體忽然破棺而出相叁,到底是詐尸還是另有隱情遵绰,我是刑警寧澤,帶...
    沈念sama閱讀 35,684評論 5 347
  • 正文 年R本政府宣布增淹,位于F島的核電站椿访,受9級特大地震影響,放射性物質發(fā)生泄漏虑润。R本人自食惡果不足惜成玫,卻給世界環(huán)境...
    茶點故事閱讀 41,295評論 3 329
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望拳喻。 院中可真熱鬧哭当,春花似錦、人聲如沸冗澈。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,894評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽渗柿。三九已至个盆,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間朵栖,已是汗流浹背颊亮。 一陣腳步聲響...
    開封第一講書人閱讀 33,012評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留陨溅,地道東北人终惑。 一個月前我還...
    沈念sama閱讀 48,126評論 3 370
  • 正文 我出身青樓,卻偏偏與公主長得像门扇,于是被迫代替她去往敵國和親雹有。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 44,914評論 2 355

推薦閱讀更多精彩內容