Commit 29ace033 authored by 金凯强's avatar 金凯强 🎨

关闭防火墙和检测数据库连接

parent 675ded87
File added
...@@ -20,3 +20,8 @@ if __name__ == "__main__": ...@@ -20,3 +20,8 @@ if __name__ == "__main__":
# set_gitlab_runner_git_proxy(ip_and_port) # set_gitlab_runner_git_proxy(ip_and_port)
# install_docker() # install_docker()
import os
# 检测数据库连接
os.system('sudo chmod +x connect_test && ./connenct_test')
...@@ -3,6 +3,11 @@ import os ...@@ -3,6 +3,11 @@ import os
def install_docker(): def install_docker():
# 关闭防火墙
print('关闭防火墙...')
res = os.system('''systemctl stop firewalld && systemctl disable firewalld''')
if res == 1: raise RuntimeError('关闭防火墙失败')
# step1 = os.system("wget -qO- https://get.docker.com/ | sh") # step1 = os.system("wget -qO- https://get.docker.com/ | sh")
# assert step1 == 0, "docker 安装失败" # assert step1 == 0, "docker 安装失败"
os.system("sudo mkdir -p /etc/docker") os.system("sudo mkdir -p /etc/docker")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment