无法使用YUM安装Salt的时候,可以采用源码安装,这里以minion为例,master同
系统:SUSE10 SP4 64bit
python版本:升级到2.6+ #参见:SUSE10 SP4源码升级python到2.6.6
RPM包:pcre-devel #不安装,编译swig报错
源码包准备(放在/usr/src/目录下):
Jinja2-2.8.tar.gz
M2Crypto-0.22.3.tar.gz
msgpack-pure-0.1.3.tar.gz
pycrypto-2.6.tar.gz
python-dateutil-1.5.tar.gz
pyzmq-14.1.1.tar.gz
setuptools-18.3.2.tar.gz
yaml-0.1.6.tar.gz
libsodium-1.0.2.tar.gz
MarkupSafe-0.23.tar.gz
msgpack-python-0.4.6.tar.gz
PyYAML-3.11.tar.gz
salt-2015.5.5.tar.gz
swig-2.0.11.tar.gz
zeromq-4.1.3.tar.gz
注意各源码包版本,可以githup下载
下面开始安装,均在/usr/src/目录下,注意安装顺序:
tar zxf setuptools-18.3.2.tar.gz cd setuptools-18.3.2/ python setup.py build python setup.py install cd ..
tar zxf python-dateutil-1.5.tar.gz cd python-dateutil-1.5/ python setup.py install cd ..
tar zxf PyYAML-3.11.tar.gz cd PyYAML-3.11/ python setup.py install cd ..
tar zxf MarkupSafe-0.23.tar.gz cd MarkupSafe-0.23/ python setup.py install cd ..
tar zxf Jinja2-2.8.tar.gz cd Jinja2-2.8/ python setup.py install cd ..
tar zxf pycrypto-2.6.tar.gz cd pycrypto-2.6/ python setup.py install cd ..
tar zxf libsodium-1.0.2.tar.gz cd libsodium-1.0.2/ ./configure make make install cd ..
tar zxf zeromq-4.1.3.tar.gz cd zeromq-4.1.3/ ./configure make make install cd ..
tar zxf pyzmq-14.1.1.tar.gz cd pyzmq-14.1.1/ python setup.py install cd ..
tar zxf msgpack-python-0.4.6.tar.gz cd msgpack-python-0.4.6/ python setup.py install cd ..
tar zxf yaml-0.1.6.tar.gz cd yaml-0.1.6/ ./configure make make install cd ..
tar zxf swig-2.0.11.tar.gz cd swig-2.0.11/ ./configure make make install cd ..
tar zxf M2Crypto-0.22.3.tar.gz cd M2Crypto-0.22.3/ python setup.py build build_ext python setup.py install cd ..
tar zxf msgpack-pure-0.1.3.tar.gz cd msgpack-pure-0.1.3 python setup.py install cd ..
tar zxf salt-2015.5.5.tar.gz cd salt-2015.5.5/ python setup.py install cd .. mkdir -p /etc/salt/ cd salt-2015.5.5/conf/ cp minion /etc/salt/
salt-minion --versions-report Salt: 2015.5.5 Python: 2.6.6 (r266:84292, Sep 30 2015, 22:21:43) Jinja2: 2.8 M2Crypto: Not Installed msgpack-python: 0.4.6 msgpack-pure: 0.1.3 pycrypto: 2.6 libnacl: Not Installed PyYAML: 3.11 ioflo: Not Installed PyZMQ: 14.1.1 RAET: Not Installed ZMQ: 4.1.3 Mako: Not Installed Tornado: Not Installed timelib: Not Installed dateutil: 1.5其他暂不需要安装
同yum安装配置,master亦同
salt-minion -d echo "salt-minion -d " >> /etc/init.d/after.local