新增端口后,需要重启宝塔 /etc/init.d/bt start
/etc/init.d/nginx start
mysql 和 redis的开启都在 /etc/init.d/ 下面
https://www.csdn.net/tags/MtjaYg3sOTY0NjAtYmxvZwO0O0OO0O0O.html
docker pull centos
挂载目录
docker run -d -it -p 11211:11211 -p 9501:9501 -p 9502:9502 -p 9000:9000 -p 8888:8888 -p 8080:8080 -p 8000:8000 -p 6379:6379 -p 4040:4040 -p 3306:3306 -p 3000:3000 -p 888:888 -p 443:443 -p 110:110 -p 80:80 -p 25:25 -v D:/code:/www --privileged=true centos
查看容器id,并进入容器
docker ps
docker exec -it 容器ID bash
如:docker exec -it 2cd7898ec830 bash
[root@7bcd3b706f8a ~]# yum install -y wget
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - AppStream 69 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
https://developer.aliyun.com/article/949587
解决方法
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum update -y
yum install -y wget
可以成功
cd ~
yum install python39
[root@7bcd3b706f8a ~]# python3 --version
Python 3.9.6
# 设置默认 python 版本
[root@7bcd3b706f8a ~]# alternatives --set python /usr/bin/python3
[root@7bcd3b706f8a ~]# python --version
Python 3.9.6
# 安装ifconfig
yum install -y net-tools
# 安装vim
yum install -y vim
# 安装 clear
yum install -y ncurses
https://www.bt.cn/new/download.html
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec
安装成功后,显示
-------------------------------------------------------
外网面板地址: http://120.235.173.156:8888/e1fcbf20
内网面板地址: http://172.17.0.2:8888/e1fcbf20
username: lwxyvj6a
password: 7e24365a
---------------------------------------------------------
直接访问此:
http://127.0.0.1:8888/e1fcbf20
Error: DBUS_ERROR: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
没有防火墙,不用管
- 2024年1月31日 本地禁用ssl,方便使用; `/etc/init.d/bt` 回车,选`26`