去评论
dz插件网

更改Linux宝塔面板的默认安装路径

Crystαl
2024/12/21 23:58:40

涓句緥锛氭湇鍔″櫒涓ゅ潡纭洏锛屼竴鍧楁槸绯荤粺鐩 100G锛屼竴鍧楁槸鏁版嵁鐩 200G銆傛垜鎯虫妸瀹濆闈㈡澘瀹夎鍒 200G 鏁版嵁鐩樹笂锛岀洰鍓嶅疂濉旈潰鏉垮畨瑁呴粯璁ょ洰褰曚负/www 鐩綍锛屼笉鏀寔淇敼銆傞殢鐫鍚庢湡鐜杞欢 Nginx銆丄pache銆丳HP銆丮YSQL銆乸ython銆乨ocker 绛夊畨瑁咃紝閮戒細榛樿瀹夎鍒扮郴缁熺洏鍐/www 涓嬶紝杩欐牱涓鏉ワ紝鎴戜滑绯荤粺鐩樺緢蹇氨浼氫笉澶熶娇鐢紝閭d箞鎴戜滑鎬庝箞鏉ヨВ鍐冲憿锛

鐪嬩竴涓嬫湇鍔″櫒纾佺洏浣跨敤鐘跺喌

1[root@ecs-267411 ~]# df -vh
2Filesystem Size Used Avail Use% Mounted on
3devtmpfs 4.0M 0 4.0M 0% /dev
4tmpfs 7.8G 0 7.8G 0% /dev/shm
5tmpfs 7.8G 8.6M 7.8G 1% /run
6tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
7/dev/vda1 99G 2.5G 92G 3% /
8tmpfs 7.8G 0 7.8G 0% /tmp

鏌ョ湅涓涓嬬郴缁熸墍鏈夊垎鍖

1[root@ecs-267411 ~]# fdisk -l
2Disk /dev/vda: 100 GiB, 107374182400 bytes, 209715200 sectors
3Units: sectors of 1 * 512 = 512 bytes
4Sector size (logical/physical): 512 bytes / 512 bytes
5I/O size (minimum/optimal): 512 bytes / 512 bytes
6Disklabel type: dos
7Disk identifier: 0x73839ead
8
9Device Boot Start End Sectors Size Id Type
10/dev/vda1 * 2048 209715166 209713119 100G 83 Linux
11
12Disk /dev/vdb: 200 GiB, 214748364800 bytes, 419430400 sectors
13Units: sectors of 1 * 512 = 512 bytes
14Sector size (logical/physical): 512 bytes / 512 bytes
15I/O size (minimum/optimal): 512 bytes / 512 bytes

鎶 200G 鐨勬暟鎹洏锛屾牸寮忓寲 mkfs.ext3

1[root@ecs-267411 ~]# mkfs.ext3 /dev/vdb
2mke2fs 1.46.4 (18-Aug-2021)
3Creating filesystem with 52428800 4k blocks and 13107200 inodes
4Filesystem UUID: 9c92ce47-e785-4110-bcd5-59d1bc1b83c8
5Superblock backups stored on blocks:
6 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
7 4096000, 7962624, 11239424, 20480000, 23887872
8
9+Allocating group tables: done
10+Writing inode tables: done
11+Creating journal (262144 blocks): done
12+Writing superblocks and filesystem accounting information: done

鍒涘缓涓涓洰褰曪紝缁欐潈闄愶紝骞舵寕杞 200G 鏁版嵁鐩

1[root@ecs-267411 ~]# mkdir /HNDISK
2[root@ecs-267411 ~]# chmod -R 777 /HNDISK/
3[root@ecs-267411 ~]# mount /dev/vdb /HNDISK/
4[root@ecs-267411 ~]# df -lh
5Filesystem Size Used Avail Use% Mounted on
6devtmpfs 4.0M 0 4.0M 0% /dev
7tmpfs 7.8G 0 7.8G 0% /dev/shm
8tmpfs 7.8G 8.6M 7.8G 1% /run
9tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
10/dev/vda1 99G 2.5G 92G 3% /
11tmpfs 7.8G 0 7.8G 0% /tmp
12+/dev/vdb 196G 1.1M 186G 1% /HNDISK

寤虹珛杞繛鎺


浣跨敤 ln -s /HNDISK /www 鍛戒护寤虹珛浠庢牴鐩綍鐨 www 鍒/HNDISK 鐨勮蒋杩炴帴銆傝繖鏍凤紝鍦ㄥ畨瑁呭疂濉旈潰鏉挎椂锛岃櫧鐒剁湅璧锋潵鏄畨瑁呭湪鏍圭洰褰曠殑 www 涓嬶紝瀹為檯涓婃暟鎹細瀛樺偍鍦/HNDISK 鐩綍涓
1[root@ecs-267411 ~]# ln -s /HNDISK /www

鏌ョ湅/www 杞摼鎺ユ寚鍚戠殑鐩爣璺緞

1[root@ecs-267411 ~]# readlink /www
2/HNDISK

娣诲姞鍚姩椤癸紝骞堕噸璧锋湇鍔″櫒

1[root@ecs-267411 ~]# echo /dev/vdb /HNDISK ext3 defaults 0 0 >> /etc/fstab
2[root@ecs-267411 ~]# init 6

閲嶈捣鍚庯紝鏌ョ湅涓涓嬬鐩樻儏鍐碉紝鍦ㄧ湅涓涓/www 鎸囧悜

1[root@ecs-267411 ~]# df -lh
2Filesystem Size Used Avail Use% Mounted on
3devtmpfs 4.0M 0 4.0M 0% /dev
4tmpfs 7.8G 4.0K 7.8G 1% /dev/shm
5tmpfs 7.8G 8.6M 7.8G 1% /run
6tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
7/dev/vda1 99G 2.5G 92G 3% /
8tmpfs 7.8G 0 7.8G 0% /tmp
9+/dev/vdb 196G 1.1M 186G 1% /HNDISK
10[root@ecs-267411 ~]# readlink /www
11+/HNDISK
12[root@ecs-267411 ~]#

涓閿畨瑁呭疂濉旈潰鏉

1[root@ecs-267411 ~]# url=https://download.bt.cn/install/install_lts.sh;if [ -f /usr/bin/curl ];then curl -sSO $url;else wget -O install_lts.sh $url;fi;bash install_lts.sh ed8484bec
2
3#----------------------------------------------------------------------
4| Bt-WebPanel FOR CentOS/Ubuntu/Debian
5#----------------------------------------------------------------------
6| Copyright 漏 2015-2099 BT-SOFT(http://www.bt.cn) All rights reserved.
7#----------------------------------------------------------------------
8| The WebPanel URL will be http://SERVER_IP:41862 when installed.
9#----------------------------------------------------------------------
10| 涓轰簡鎮ㄧ殑姝e父浣跨敤锛岃纭繚浣跨敤鍏ㄦ柊鎴栫函鍑鐨勭郴缁熷畨瑁呭疂濉旈潰鏉匡紝涓嶆敮鎸佸凡閮ㄧ讲椤圭洰/鐜鐨勭郴缁熷畨瑁
11#----------------------------------------------------------------------
12| 褰撳墠鎮ㄦ鍦ㄥ畨瑁呯殑鏄疂濉旈潰鏉跨ǔ瀹氱増-9.0-lts
13#----------------------------------------------------------------------
14
15Do you want to install Bt-Panel to the /www directory now?(y/n): y

瀹夎瀹屾垚鍚庯紝杈撳嚭绠$悊闈㈡澘淇℃伅

1========================================
2姝e湪寮鍚潰鏉縎SL锛岃绋嶇瓑............
3========================================
4璇佷功寮鍚垚鍔燂紒
5========================================
6Stopping Bt-Tasks... done
7Stopping Bt-Panel... done
8Starting Bt-Panel.... done
9Starting Bt-Tasks... done
10cat: /etc/redhat-release: No such file or directory
11cat: /etc/redhat-release: No such file or directory
12Last metadata expiration check: 0:22:26 ago on Sat 07 Dec 2024 08:41:34 PM CST.
13Package firewalld-1.0.2-2.r13.hce2.noarch is already installed.
14Dependencies resolved.
15Nothing to do.
16Complete!
17Created symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service 鈫 /usr/lib/systemd/system/firewalld.service.
18Created symlink /etc/systemd/system/multi-user.target.wants/firewalld.service 鈫 /usr/lib/systemd/system/firewalld.service.
19success
20True
21==================================================================
22Congratulations! Installed successfully!
23=============娉ㄦ剰锛氶娆℃墦寮闈㈡澘娴忚鍣ㄥ皢鎻愮ず涓嶅畨鍏=================
24
25 璇烽夋嫨浠ヤ笅鍏朵腑涓绉嶆柟寮忚В鍐充笉瀹夊叏鎻愰啋
26 1銆佷笅杞借瘉涔︼紝鍦板潃锛歨ttps://dg2.bt.cn/ssl/baota_root.pfx 鍙屽嚮瀹夎,瀵嗙爜銆恮ww.bt.cn銆
27 2銆佺偣鍑汇愰珮绾с-銆愮户缁闂戞垨銆愭帴鍙楅闄╁苟缁х画銆戣闂
28 鏁欑▼锛歨ttps://www.bt.cn/bbs/thread-117246-1-1.html
29 mac鐢ㄦ埛璇蜂笅杞戒娇鐢ㄦ璇佷功锛歨ttps://dg2.bt.cn/ssl/baota_root.crt
30
31========================闈㈡澘璐︽埛鐧诲綍淇℃伅==========================
32
33+ 銆愪簯鏈嶅姟鍣ㄣ戣鍦ㄥ畨鍏ㄧ粍鏀捐 41862 绔彛
34+ 澶栫綉闈㈡澘鍦板潃: https://113.44.32.158:41862/0554b4df
35+ 鍐呯綉闈㈡澘鍦板潃: https://192.168.0.9:41862/0554b4df
36+ username: 19kfsbc9
37+ password: c35e1822
38
39 娴忚鍣ㄨ闂互涓嬮摼鎺ワ紝娣诲姞瀹濆瀹㈡湇
40 https://www.bt.cn/new/wechat_customer
41==================================================================
42Time consumed: 11 Minute!