Centos7.2 安装 saltops
mkdir -p /opt
cd /opt
wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
tar zxvf Python-3.4.3.tgz
cd Python-3.4.3
./configure --enable-shared --prefix=/usr/local
make && make altinstall
这里我们使用的是 make altinstall,如果使用 make install,你将会看到在系统中有两个不同版本的 Python 在/usr/bin/目录中。这将会导致很多问题,而且不好处理。 如果提示找不到 so 文件,可以添加以下变量:export LD_LIBRARY_PATH=/usr/local/lib
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install virtualenv
virtualenv -p /usr/local/bin/python3.4 venv
source venv/bin/activate
cd /opt/
git clone http://git.oschina.net/wuwenhao/saltops.git saltops
cd saltops
pip install -r ./requiement.txt
yum install -y https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm
yum clean expire-cache
yum install -y salt-master
yum install -y salt-minion
yum install -y salt-ssh
yum install -y salt-syndic
yum install -y salt-cloud
yum install -y salt-api
pip install django-cors-headers
启动 salt
salt-master -d
salt-minion -d
salt-api -d
python3 manage.py makemigrations && python3 manage.py migrate
python3 manage.py createsuperuser --username hifly #根据最初的问题回答,创建自己的管理员
python3 manage.py celery worker --loglevel=info
python3 manage.py celery beat &
python3 manage.py runserver 0.0.0.0:8000