Deploy SaltStack in CentOS 6.5
(1) install python 2.7
Https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
#tarxvzfPython-2.7.8.tgz
#cdPython-2.7.8
#./configure--prefix=/usr/local
#make--jobs=`grepprocessor/proc/cpuinfo|wc-l`
#makeinstall
# Copy the python header file to the standard directory to avoid missing the required header file when compiling the saltstack.
#cd/usr/local/include/python2.7
#cp-a./*/usr/local/include/
# Back up the old version of python and link the new version of python with symbols
#cd/usr/bin
#mvpythonpython2.6
#ln-s/usr/local/bin/python
# Modify the yum script to point it to the old version of python, so that it cannot run
# Vim/usr/bin/yum
#! /Usr/bin/python --> #! /Usr/bin/python2.6
(2) install the PyYAML Module
Http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
Https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz
#tarxvzfyaml-0.1.5.tar.gz#cdyaml-0.1.5
#./configure--prefix=/usr/local
#make--jobs=`grepprocessor/proc/cpuinfo|wc-l`
#makeinstall
#tarxvzfPyYAML-3.11.tar.gz
#cdPyYAML-3.11
#pythonsetup.pyinstall
(3) install the setuptools Module
Https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz
#tarxvzfsetuptools-7.0.tar.gz
#cdsetuptools-7.0
#pythonsetup.pyinstall
(4) markupsafe module Installation
Https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.9.3.tar.gz
#tarxvzfMarkupSafe-0.9.3.tar.gz
#cdMarkupSafe-0.9.3
#pythonsetup.pyinstall
(5) jinja2 module Installation
Https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
#tarxvzfJinja2-2.7.3.tar.gz
#cdJinja2-2.7.3
#pythonsetup.pyinstall
(6) autocon module Installation
Http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
Note:
The autoconf version that comes with the system is 2.63. When compiling ZeroMQ, an error may fail due to a low version. Therefore, you must install a version later than 2.63.
#tarxvzfautoconf-2.69.tar.gz
#cdautoconf-2.69
#./configure
#make
#makeinstall
If it has already been installed, it also needs to overwrite the original one.
cp
/usr/local/bin/autoconf
/usr/bin/
cp
/usr/local/bin/autoreconf
/usr/bin/
# Install other dependent Libraries
#yum-yinstalllibuuid.x86_64libuuid-devel.x86_64
#yum-yinstalluuid.x86_64uuid-devel.x86_64
#yum-yinstalluuid-c++.x86_64uuid-c++-devel.x86_64
Https://github.com/jedisct1/libsodium/archive/1.0.1.tar.gz
#tarxvzflibsodium-1.0.1.tar.gz
#cdlibsodium-1.0.1
#./autogen.sh
#./configure--prefix=/usr/local
#make--jobs=`grepprocessor/proc/cpuinfo|wc-l`
#makeinstall
.
/autogen
. Sh error:
Can't
exec
"aclocal"
: No file or directory
/usr/share/autoconf/Autom4te/FileUtils
.pmline326.
Autoreconf: failedtorunaclocal: No file or directory
Solution:
1
yum
install
automake
Error:
configure.ac:418:error:possiblyundefinedmacro:AC_LIBTOOL_WIN32_DLL
Ifthistokenandothersarelegitimate,pleaseusem4_pattern_allow.
SeetheAutoconfdocumentation.
autoreconf:
/usr/bin/autoconf
failedwith
exit
status:1
Solution:
yum
install
libtool
Http://download.zeromq.org/zeromq-4.0.5.tar.gz
Https://pypi.python.org/packages/source/p/pyzmq/pyzmq-14.4.1.tar.gz
#tarxvzfzeromq-4.0.5.tar.gz
#cdzeromq-4.0.5
#./autogen.sh
#./configure--prefix=/usr/local
#make--jobs=`grepprocessor/proc/cpuinfo|wc-l`
#makeinstall
#tarxvzfpyzmq-14.4.1.tar.gz
#cdpyzmq-14.4.1
#pythonsetup.pyconfigure--zmq=/usr/local
#pythonsetup.pyinstall
(7) M2Crypto module Installation
# Yum-y install swig. x86_64
Http://www.openssl.org/source/openssl-1.0.1g.tar.gz
#tarxvzfopenssl-1.0.1g.tar.gz
#cdopenssl-1.0.1g
#./configshared--prefix=/usr/local
#make&&makeinstall
cp
-a
/usr/local/include/openssl
/usr/include/
vimPython-2.7.8
/Modules/Setup
#Socketmodulehelperforsocket(2)
_socketsocketmodule.ctimemodule.c
#SocketmodulehelperforSSLsupport;youmustcommentouttheother
#socketlineabove,andpossiblyedittheSSLvariable:
#SSL=/usr/local/ssl
_ssl_ssl.c\
-DUSE_SSL-I$(SSL)
/include
-I$(SSL)
/include/openssl
\
-L$(SSL)
/lib
-lssl-lcrypto
Uncomment the four lines
# Vim/etc/ld. so. conf
/Usr/local/lib
/Usr/local/lib64
#/Sbin/ldconfig
# Cd Python-2.7.8
# Make & make install
Https://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.22.3.tar.gz
#tarxvzfM2Crypto-0.22.3.tar.gz
#cdM2Crypto-0.22.3
#pythonsetup.pyinstall
Install saltstack
Https://github.com/saltstack/salt/releases/download/v2014.7.0/salt-2014.7.0.tar.gz
# Tar xvzf salt-2014.7.0.tar.gz
# Cd sale-2014.7.0
# Python setup. py install
# Salt -- versions-report