编译安装SaltStack客户端

在Ubuntu9.10下不能用apt-get方式安装saltstack客户端,所以写了个简单的步骤。

 

apt-get -y install libpcre3-dev    
apt-get -y install python-dev
cd /usr/local/src/&&mkdir salt&&mv salt.tar.gz salt


cd /usr/local/src/salt/
tar -zxvf salt.tar.gz
tar -zxvf salt-0.17.2.tar.gz
cd salt-0.17.2
python setup.py install
mkdir /etc/salt
ln -s /usr/local/bin/salt-minion /etc/init.d/
cp ../salt-0.17.2/conf/minion /etc/salt/

cd ..&&tar -zxvf PyYAML-3.10.tar.gz
cd PyYAML-3.10
python setup.py install

cd ..&&tar -zxvf setuptools-0.6c8.tar.gz
cd setuptools-0.6c8
python setup.py install

cd ..&&tar -zxvf Jinja2-2.7.1.tar.gz
cd Jinja2-2.7.1
python setup.py install

cd ..&&tar -zxvf msgpack-python-0.3.0.tar.gz
cd msgpack-python-0.3.0
python setup.py install

cd ..&&tar -zxvf swig-2.0.11.tar.gz
apt-get -y install libpcre3-dev    
cd swig-2.0.11
./configure
make
make install

cd ..&&tar -zxvf M2Crypto-0.21.1.tar.gz
apt-get -y install python-dev
cd M2Crypto-0.21.1
python setup.py build
python setup.py install

easy_install pyzmq

cd ..&&tar -zxvf pycrypto-2.6.tar.gz
cd pycrypto-2.6
python setup.py build
python setup.py install

vi /etc/salt/minion

sysv-rc-conf salt-minion on
/etc/init.d/salt-minion &