微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

个人网站搭建 01——Linux 安装宝塔面板

宝塔面板概念

官网:https://www.bt.cn/new/index.html

安全高效的服务器运维面板

使用宝塔前: 手工输入命令安装各类软件,操作起来费时费力并且容易出错,而且需要记住很多 Linux 的命令,非常复杂。

使用宝塔后: 2 分钟装好面板,一键管理服务器,鼠标点几下就能替代以前的复杂繁多命令,操作简单,看一眼就会使用。

打开服务器相应端口(认为 8888)

腾讯云:https://www.bt.cn/bbs/thread-1229-1-1.html

阿里云:https://www.bt.cn/bbs/thread-2897-1-1.html

华为云:https://www.bt.cn/bbs/thread-3923-1-1.html

安装命令(需要检测是否含有 yum 支持

# CentOS 安装命令
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
# Ubuntu/Deepin 安装命令
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
# Debian 安装命令
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
# Fedora 安装命令
wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
# Linux 面板 7.4.5 升级命令
curl http://download.bt.cn/install/update6.sh|bash

Do you want to install Bt-Panel to the /www directory Now?(y/n): y

提示你是否要安装,输入 y 回车。输入 y 之后它就会全自动搭建,稍等一到两分钟。安装完成后的反馈面板内容:

Congratulations! Install succeeded!

Bt-Panel: http://{IP地址}:8888
username: admin # 后面用来登录用户名
password: 1f766591 # 登录的密码
Warning:
If you cannot access the panel,
release the following port (8888|888|80|443|20|21) in the security group

基本应用安装

LNMP 与 LAMP

image-20210721185601653

LAMP = Linux + Apache + MysqL + PHP

LNMP = Linux + Nginx + MysqL + PHP

要省内存的话 LNMP 是最好的选择,但似乎不太稳定。

静态的多用 LNMP 还是不错的;动态内容多的话,LAMP 还是最稳定的。

编译安装 极速安装

编译安装也叫源码安装,宝塔官方给出的提示是 安装时间长(30-3小时)适合生产环境,极速安装也叫RPM安装,安装时间极快,性能与稳定性略低于编译安装。

对于新手站长们,如果时间允许的话,推荐使用编译安装。

宝塔面板网站开通

使用同一 IP 的不同端口创建网站

参考文章:https://www.longkui.site/program/other/p12041/2586/

通过配置修改添加网站和端口

  1. 修改认目录(即/www/server/panel/vhost/Nginx)下的 .conf 配置文件修改端口和目录;

  2. 添加防火墙开放端口并重启防火墙

    # 查看已开放的端口
    firewall-cmd --list-ports
    # 添加单个端口
    firewall-cmd --zone=public --add-port=8080/tcp --permanent
    # 重启防火墙
    firewall-cmd --reload
    

卸载宝塔面板

service bt stop && rm -rf /www

原文地址:https://www.jb51.cc/wenti/3281412.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐