centOS 6.5 部署SaltStack

前端之家收集整理的这篇文章主要介绍了centOS 6.5 部署SaltStack前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

(1)、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


## 将python头文件拷贝到标准目录,以避免编译saltstack时,找不到所需的头文件

#cd/usr/local/include/python2.7
#cp-a./*/usr/local/include/

## 备份旧版本的python,并符号链接新版本的python

#cd/usr/bin
#mvpythonpython2.6
#ln-s/usr/local/bin/python

## 修改yum脚本,使其指向旧版本的python,已避免其无法运行
# vim /usr/bin/yum

#!/usr/bin/python --> #!/usr/bin/python2.6

(2)、PyYAML模块安装
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)、setuptools模块安装

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模块安装
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模块安装
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模块安装
http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz

注意:
系统自带的autoconf版本为2.63,在编译ZeroMQ时,由于版本较低,会报错不通过,故需安装大于2.63的版本。

#tarxvzfautoconf-2.69.tar.gz
#cdautoconf-2.69
#./configure
#make
#makeinstall


  1. 如果原来已经装过,还需要覆盖原来的。

  2. cp/usr/local/bin/autoconf/usr/bin/
    cp/usr/local/bin/autoreconf/usr/bin/

## 其他依赖库安装

#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报错:
Can't exec "aclocal" :没有那个文件或目录at /usr/share/autoconf/Autom4te/FileUtils .pmline326.
autoreconf:Failedtorunaclocal:没有那个文件或目录

解决方法

1
yum install automake
1
2
3
4
5
6
7
报错:
configure.ac:418:error:possiblyundefinedmacro:AC_LIBTOOL_WIN32_DLL
Ifthistokenandothersarelegitimate,pleaseusem4_pattern_allow.
SeetheAutoconfdocumentation.
autoreconf: /usr/bin/autoconf Failedwith exit status:1

解决方法


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模块安装

# 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
取消那四行的注释

# 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

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 salt-2014.7.0
# python setup.py install

# salt --versions-report

猜你在找的CentOS相关文章