资产管理、资产采集、灰度发布、反向代理、批量任务、任务编排、计划任务、日志审计、权限管理、角色管理、部门管理、运维自动化
setenforce 0
sed -i "s/enforcing/disabled/g" /etc/selinux/config
# 修改字符集,否则可能报 input/output error的问题,因为日志里打印了中文
localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8
echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf
wget http://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
tar -xvf Python-3.7.1.tar.xz && cd Python-3.7.1
./configure --prefix=/usr/local/python37
make && make install
yum install redis -y
service redis start
##settings 设置了密码,可自行修改Redis.conf
cd /opt/
git clone https://github.com/leoiceo/OpenSA
wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py --insecure
# 创建日志目录
mkdir -p /data/opensa/logs
# 修改pypi源
mkdir -p ~/.pip/
cat > ~/.pip/pip.conf <<EOF
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
EOF
cd OpenSA
/usr/local/python37/bin/pip install -r requirements.txt
cd /opt/OpenSA
sh migrate.sh
# 初始化权限和用户
python manage.py permission_data
# 国际化文件生成
django-admin makemessages -l en
django-admin compilemessages
cd /opt/OpenSA
nohup /usr/local/python37/bin/celery -B -A opensa worker --loglevel=INFO &
cd /opt/OpenSA
python manage.py runserver 0.0.0.0:8000
管理员: [email protected]
密码:redhat