代码拉取完成,页面将自动刷新
同步操作将从 纳兰秋水/AnsibleUI 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
PYPATH='/usr/local/PyAnsibleUI/'
PORT=10089
# yum -y install epel-release
# yum -y install gcc-c++ openssl-devel python-pip python-devel make libffi-devel mysql-devel sqlite-devel
if [[ ! -f files/id_rsa ]]; then
echo -e '\033[32m生成Ansible所需私钥,在files目录下\033[0m'
ssh-keygen -t rsa -f files/id_rsa -P ''
fi
if [[ ! -d $PYPATH ]]; then
echo '安装Python环境'
echo -e "\033[31m安装Python位置为${PYPATH}\033[0m"
if [[ ! -f files/Python-3.7.3.tgz ]]; then
echo "\033[33m============>Python包不存在,正在下载<============\033[0m"
wget -O files/Python-3.7.3.tgz https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
fi
cd files
tar zxf Python-3.7.3.tgz
cd Python-3.7.3
./configure --prefix=${PYPATH} && make && make install
else
echo -e '\033[35m指定Python环境已安装\033[0m'
fi
echo -e '\033[34m============>安装所需Python模块<============\033[0m'
${PYPATH}bin/pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
echo -e "\033[44m============>执行<============\033[0m\033[36m
export PYTHONOPTIMIZE=1
${PYPATH}bin/celery multi start 1 -A myCelery -l info -c4 --pidfile=tmp/celery_%n.pid -f logs/celery.log
${PYPATH}bin/python3 manage.py runserver 0.0.0.0:${PORT}
\033[33m============>启动程序<============\033[0m"
# export PYTHONOPTIMIZE=1
# echo -e "\033[36m============>启动Celery<============\033[0m"
# ${PYPATH}bin/celery multi start 1 -A myCelery -l info -c4 --pidfile=tmp/celery_%n.pid -f logs/celery.log
# ${PYPATH}bin/celery -A myCelery worker -l info
# echo -e '\033[36m============>启动主程序<============\033[0m'
# echo -e "\033[33m程序启动,端口 ${PORT}\033[0m"
# ${PYPATH}/bin/python3 manage.py runserver 0.0.0.0:${PORT}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。