一、安装Apache
# yum install -y httpd httpd-devel
# systemctl start httpd.service # 启动
# systemctl stop httpd.service # 关闭
# systemctl restart httpd.service # 重启
# systemctl enable httpd.service # 开机自启
防火墙开放80端口
# firewall-cmd --zone=public --add-port=80/tcp --permanent
# firewall-cmd --reload
开启Apache,外网已经可以通过ip访问Apache的默认页面了
二、安装Python36、pip3、virtualenv
# yum install -y epel-release
# yum install -y python36
# python36 -V
Python 3.6.6
# yum install -y python36-setuptools
# easy_install-3.6 pip
# pip3 -V
pip 18.1 from /usr/local/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip (python 3.6)
# pip3 install virtualenv
三、创建项目
创建flask项目(最简