CentOS 5 System Installation Saltstack installation
Recently the company has some new requirements and needs to deploy some saltstack to manage some of the servers. So I recently studied the installation and deployment of Saltstack.
To tell you the truth, if you use CentOS 6 above the system, then you do not have to read my article, because 6 of the system can be directly used Epel software source, with Yum way to install, as long as the server installed a salt-master, In the management node to install a salt-minion is OK, installation is simply no longer convenient.
However, if it is so simple to deal with this problem I will not have to write this article, after all, the ideal is always unrealistic, so, there must be a wonderful problem I met Ah.
The company server environment is all a water of CentOS 5.11, which brings a little bit of a drag on the deployment of the place, because after the Epel source, I search the salt, found the result is this:
[[email protected] ~]# yum search saltloaded plugins: downloadonly, fastestmirror, securityloading mirror speeds from cached hostfile * base: mirrors.btte.net * epel: mirrors.neusoft.edu.cn * extras: mirrors.btte.net * rpmforge: ftp.neowiz.com * updates: mirrors.yun-idc.com====== ======================== matched: salt ==============================apbs.i386 : Adaptive poisson boltzmann solverapbs.x86_64 : adaptive poisson boltzmann solvereurephia-utils.x86_64 : misc. eurephia utilitiesperl-crypt-saltedhash.noarch : Assists in working with salted hashespython-halite.noarch : saltstack web uisalt-api.noarch : a web api for to access Salt the parallel remote : Execution system
Search results found there is no salt-master, salt-minion What, this should be the CentOS 5 system of the Yum source of the problem, since the Yum way can not be used, then a different installation, it is the way this article wants to record.
Installing Saltstack with PIP
First step, upgrade Python to python2.6
The python on my server is version 2.4, so use Yum to install python2.6, which is also a huge slot in CentOS 5 on the version of the pythong2.6 package is called PYTHON26, this naming rules also appear in the php53 and so on above, let a person very egg pain AH (originally installed Gangglia-web because the default php-5.1 version of a function does not support, let me a good meal toss, and finally compiled the ganglia into RPM package, and then ignore the dependent installation), oh, off-topic, do not mention, continue to install python2.6.
Step two, install the PIP command
The PIP command needs to be installed using Python to run the installation scripts, first to download the installation script:
wget https://bootstrap.pypa.io/get-pip.py
After the download is complete, install the PIP using the following command:
python2.6 get-pip.py
Use PIP to install salt after installation is complete
Pip Install salt
When you're done, you think it's done? The pattern Tucson broken! The truth is not what you think!
First, we need to find a configuration file, and Mkdir/etc/salt directory, put the configuration file in this directory, master put the master configuration file, Minion put Minion configuration files, these files can be from the CentOS Copy it from the Yum salt in the 6 machine (that's what I'm doing).
Yes, there's a startup script. Don't forget to get it together and put it in the/etc/init.d/. After all this, it is necessary to install a few dependent packages on both machines, otherwise the Minion will die in seconds. Install the following packages directly with Yum: Python26-crypto, Python26-m2crypto, PYTHON26-ZMQ
After loading, you can normally start, modify the Minion configuration file, master: [Master IP], and then on the master machine can see the Minion key.
This article is from the "Artisan" blog, please be sure to keep this source http://8838848.blog.51cto.com/8828848/1675377
CentOS System Installation Saltstack installation