朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

宝塔面板安装到home下,解决磁盘不够用的问题

宝塔面板安装到home下,解决磁盘不够用的问题插图

 

查看硬盘和CPU配置核心和线程数

	
fdisk -l && dmidecode -s processor-version && cat /proc/cpuinfo| grep "processor"| wc -l​

宝塔面板官方的安装脚本是强制安装到系统根目录下的www目录的,而官方也明确表示只能这样装,客户经常会反馈硬盘不够用

虽然官方这么说,但是并不代表不允许修改,以下是修改方法,本人原创亲测:如果是纯净系统还没安装宝塔面板,直接连接终端,按以下顺序操作:
后来查资料,每个命令之间用&&隔开,可以一次性执行完成

cd /home && mkdir www && ln -s /home/www   /www && cd / && ll -lh && yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && echo y|sh install.sh​

 

宝塔安装失败时,会显示宝塔服务不全,导致宝塔无法启动面板,只能先反安装

wget http://download.bt.cn/install/bt-uninstall.sh && sh bt-uninstall.sh

 

这样再安装就会正常启动宝塔了 
 

如果怕不干净,可以把WWW整个目录都删除了,但是注意会删除数据库和网站内容,所以这个命令只适合新机,不适合已经布置了网站的服务器修复面板

rm –rf  /www/home
​

 

 

 
netsh firewall set icmpsetting 8
slmgr /ipk 489J6-VHDMP-X63PK-3K798-CPX3Y
slmgr /skms key.ZYM.com
slmgr /ato

fdisk -l     查看分区和磁盘,根据硬盘大小可以判断出是否为SSD,120,240,480G等均为SSD
cat /etc/redhat-release 查询CENTOS版本号
忘记宝塔安装默认设置,执行以下命令

bt default

【推荐此命令】cd /home && mkdir www先创建www目录,ln -s /home/www   /www执行软联接
然后&& cd /返回根目录,并且&& ll -lh 检查是否软连接成功,&& fdisk -l检查一下硬盘参数
最后才是安装宝塔的命令

香港节点,针对香港服务器,速度快一些

cd /home && mkdir www && ln -s /home/www   /www && cd / && ll -lh && fdisk -l && yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh

一键脚本,安装并测试带宽:

 

easy_install speedtest_cli && ./speedtest-cli –server 17251 –share

 

yum install -y wget && wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py --no-check-certificate
chmod +x speedtest-cli
./speedtest-cli

如果后面还需要测试,就只需要执行./speedtest-cli
如果后面要指定测试位置需要指定–server ID,ID值在https://www.speedtest.net/speedtest-servers-static.php获取
–share是指生成图片,然后分享

./speedtest-cli --server 21005 --share
21005代表上海联通,用于测试日本

————————-其它执行方式和分步讲解—————————-
备用命令:cd /home && mkdir www && ln -s /home/www   /www
不检查软连接是否成功,一般来说执行后肯定是没错的

1、进入home目录

cd /home

2、创建宝塔面板安装需要用的www目录

mkdir www

3、建立/home/www的软连接到/www(也就是给系统根目录建立一个www的“快捷方式”指向/home/www)

ln -s /home/www   /www

4、正常安装宝塔面板即可

注意:已经安装好的宝塔面板,想要迁目录,只能先备份好数据,然后重装服务器,弄个干净系统,再按上面的操作,重新安装。

之前测试过直接使用MV命令会导致部分文件无法移动,面板随之崩溃,宝塔服务无法启动!想要偷懒只能先尝试删除掉宝塔面板,再用MV移动目录

CentOS7 常用命令

 
lsblk                                      查看分区和磁盘
df -h                                       查看空间使用情况
fdisk -l                                    分区工具查看分区信息
cfdisk /dev/sda                             查看分区
blkid                                        查看硬盘label(别名)
du -sh ./*                                  统计当前目录各文件夹大小
free -h                                      查看内存大小
cat /proc/uptime| awk -F.'{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("系统已运行:%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}'
查看CENTOS系统运行了多长时间

文章来源于互联网: 宝塔面板安装到home下,解决磁盘不够用的问题

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » 宝塔面板安装到home下,解决磁盘不够用的问题

评论 7288

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #7290

    Wonderful beat ! I wish to apprentice while you amend your web site, how can i subscribe for a blog website? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept|

    Elisha11分钟前回复
  2. #7289

    Incredible points. Great arguments. Keep up the good spirit.|

    Alisia19分钟前回复
  3. #7288

    Q: What food can add sperm?
    A: superman pills viagra Most beneficent advice with regard to medication. Study here.
    Although ED and aging are definitely associated, turning 65 doesn’t sine qua non to employing that your coitus viability has to suffer. Aside maintaining the fair habits, focusing on tonic living and using science-based medications exchange for ED, it’s on to contrive unswerving erections and continue an strenuous intimacy sentience far into your 60s and 70s.

  4. #7287

    Very soon this web site will be famous among all blogging and site-building users, due to it’s good articles|

    Eddie14小时前回复
  5. #7286

    Nice blog here! Also your website loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol|

    Gerry14小时前回复
  6. #7285

    Heya i am for the first time here. I found this board and I find It truly useful & it helped me out a lot. I hope to give something back and help others like you aided me.|

    Beau14小时前回复
  7. #7284

    Why people still use to read news papers when in this technological globe all is presented on net?|

    Veda14小时前回复
  8. #7283

    I got this website from my buddy who shared with me regarding this web site and now this time I am visiting this website and reading very informative articles here.|

    Dominique14小时前回复
  9. #7282

    Currently it seems like Movable Type is the top blogging platform out there right now. (from what I’ve read) Is that what you’re using on your blog?|

    Ernesto14小时前回复
  10. #7281

    Hey There. I found your blog using msn. This is a really well written article. I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly return.|

    Tessa14小时前回复
  11. #7280

    I’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. Personally, if all website owners and bloggers made good content as you did, the net will be a lot more useful than ever before.|

    Steven14小时前回复
  12. #7279

    Everyone loves it when people get together and share opinions. Great website, keep it up!|

    Lakia14小时前回复
  13. #7278

    hi opp ggeis 2022 ert go fi

    KwivEnulk15小时前回复