{"id":1428,"date":"2015-01-15T16:36:22","date_gmt":"2015-01-15T08:36:22","guid":{"rendered":"http:\/\/www.yallonking.com\/?p=1428"},"modified":"2015-01-15T20:51:55","modified_gmt":"2015-01-15T12:51:55","slug":"%e6%ba%90%e7%a0%81%e5%ae%89%e8%a3%85saltstack","status":"publish","type":"post","link":"http:\/\/www.yallonking.com\/?p=1428","title":{"rendered":"\u6e90\u7801\u5b89\u88c5saltstack"},"content":{"rendered":"<p>\u4e4b\u524d\u5728redhat6.2_x64\u4e0a\u88c5saltstack\u6bd4\u8f83\u5bb9\u6613\uff0c\u5f53\u65f6\u8003\u8651\u5230\u670d\u52a1\u5668\u6ca1\u6709\u8054\u7f51\uff0c\u5c31\u7528\u7684\u672c\u5730yum\u6e90\u548c\u6240\u9700\u7684\u5305\u8fdb\u884c\u5b89\u88c5\u7684\uff0c\u5f53\u65f6\u4e5f\u6bd4\u8f83\u987a\u5229\uff0c\u5149\u76d8\u4e2d\u7684\u5305\u4ee5\u53ca\u81ea\u5df1\u4e0b\u8f7d\u7684\u5305\u90fd\u80fd\u591f\u5f88\u597d\u7684\u65b9\u4fbf\u7684\u8fdb\u884c\u5b89\u88c5\uff1b\u540e\u6765\u53c8\u4f7f\u7528\u540c\u6837\u7684\u65b9\u6cd5\u5728master\u7aef\u8d77\u4e00\u4e2ahttpd\u670d\u52a1\u5c06\u6240\u9700\u7684\u5305\u4f5c\u4e3a\u7f51\u7edc\u4e2d\u7684yum\u6e90\uff0c\u7ee7\u7eed\u5728redhat6.2\u4e0a\u5b89\u88c5saltstack\u771f\u662f\u5c61\u8bd5\u4e0d\u723d\uff1b\u4f46\u662f\uff0c\u4eca\u5929\u518d\u6b21\u5c1d\u8bd5\u4f7f\u7528\u4ee5\u4e0a2\u79cd\u65b9\u6cd5\u5728redhat5.7\u4e0a\u5b89\u88c5saltstack\u65f6\u5c31\u95ee\u9898\u591a\u591a\uff0c\u65e0\u8bba\u662f\u8054\u7f51\u5b89\u88c5\u8fd8\u662f\u505ayum\u7684\u65b9\u6cd5\u5b89\u88c5\u5747\u4e0d\u6210\u529f\uff0c\u9042\u5c31\u5c1d\u8bd5\u7528\u6e90\u7801\u7684\u65b9\u5f0f\u5b89\u88c5saltstack\u3002\u8fc7\u7a0b\u6bd4\u8f83\u66f2\u6298\uff0c\u5728\u8fd9\u91cc\u6574\u7406\u4e0b\uff0c\u4ee5\u98e8\u540e\u4eba\u3002<\/p>\n<p><a href=\"http:\/\/www.yallonking.com\/wp-content\/uploads\/2015\/01\/saltstack.jpg\" class=\"cboxElement\" rel=\"example_group\"1428><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1431\" src=\"http:\/\/www.yallonking.com\/wp-content\/uploads\/2015\/01\/saltstack-300x268.jpg\" alt=\"saltstack\" width=\"300\" height=\"268\" srcset=\"http:\/\/www.yallonking.com\/wp-content\/uploads\/2015\/01\/saltstack-300x268.jpg 300w, http:\/\/www.yallonking.com\/wp-content\/uploads\/2015\/01\/saltstack.jpg 476w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u4e0b\u8fb9\u4fbf\u662f\u6574\u4e2a\u5b89\u88c5\u8fc7\u7a0b\uff0c\u90e8\u5206\u5b89\u88c5\u547d\u4ee4\u7684\u8f93\u51fa\u5df2\u7701\u7565\u3002<br \/>\n===========================================================<\/p>\n<p>\u6e90\u7801\u5b89\u88c5saltstack<\/p>\n<p>1\u3001\u64cd\u4f5c\u7cfb\u7edf\u4fe1\u606f<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# uname -a\r\nLinux linux3 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU\/Linux\r\n[root@linux3 ~]# cat \/etc\/redhat-release \r\nRed Hat Enterprise Linux Server release 5.7 (Tikanga)\r\n<\/pre>\n<p>2\u3001\u6240\u9700\u8f6f\u4ef6\u5305<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# mkdir saltinstall\r\n[root@linux3 ~]# cd saltinstall\/\r\n[root@linux3 saltinstall]# ls -ltr\r\ntotal 32832\r\n-rw-r--r--  1 root root    571091 Jan 15 15:03 zlib-1.2.8.tar.gz\r\n-rw-r--r--  1 root root    256862 Jan 15 15:03 setuptools-0.6c11.tar.gz\r\n-rw-r--r--  1 root root    232384 Jan 15 15:03 python-dateutil-1.5.tar.gz\r\n-rw-r--r--  1 root root   4434910 Jan 15 15:03 openssl-1.0.1k.tar.gz\r\n-rw-r--r--  1 root root    248685 Jan 15 15:03 PyYAML-3.11.tar.gz\r\n-rw-r--r--  1 root root    443445 Jan 15 15:03 pycrypto-2.6.tar.gz\r\n-rw-r--r--  1 root root     13416 Jan 15 15:03 MarkupSafe-0.23.tar.gz\r\n-rw-r--r--  1 root root    378470 Jan 15 15:03 Jinja2-2.7.3.tar.gz\r\n-rw-r--r--  1 root root   2153667 Jan 15 15:03 zeromq-4.0.5.tar.gz\r\n-rw-r--r--  1 root root    503012 Jan 15 15:03 yaml-0.1.6.tar.gz\r\n-rw-r--r--  1 root root    995366 Jan 15 15:03 pyzmq-14.4.1.tar.gz\r\n-rw-r--r--  1 root root  14846119 Jan 15 15:03 Python-2.7.8.tgz\r\n-rw-r--r--  1 root root    113908 Jan 15 15:03 msgpack-python-0.4.4.tar.gz\r\n-rw-r--r--  1 root root      3584 Jan 15 15:03 msgpack-pure-0.1.3.tar.gz\r\n-rw-r--r--  1 root root     74795 Jan 15 15:03 M2Crypto-0.22.3.tar.gz\r\n-rw-r--r--  1 root root   5310295 Jan 15 15:03 swig-2.0.11.tar.gz\r\n-rw-r--r--  1 root root   2845127 Jan 15 15:37 salt-2014.1.4.tar.gz\r\n<\/pre>\n<p>3\u3001\u5b89\u88c5gcc\u76f8\u5173\u5305<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# mount \/dev\/cdrom \/mnt\r\nmount: block device \/dev\/cdrom is write-protected, mounting read-only\r\n[root@linux3 ~]# cat \/etc\/yum.repos.d\/local.repo\r\n[rhel-localrepos]\r\nname=Red Hat Enterprise Linux $releasever - $basearch\r\nbaseurl=file:\/\/\/mnt\/Server\r\nenabled=1\r\ngpgcheck=1\r\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-redhat-release\r\n[root@linux3 ~]# yum install gcc* -y\r\n<\/pre>\n<p>4\u3001\u5b89\u88c5python<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf Python-2.7.8.tgz \r\n[root@linux3 saltinstall]# cd Python-2.7.8\r\n[root@linux3 Python-2.7.8]# .\/configure \r\n[root@linux3 Python-2.7.8]# make\r\n[root@linux3 Python-2.7.8]# make install\r\n[root@linux3 Python-2.7.8]# .\/python -V\r\nPython 2.7.8\r\n<\/pre>\n<p>\u4fee\u6539\u73af\u5883\u53d8\u91cf\u4f7f\u7528\u6700\u65b0\u7684python<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# which python\r\n\/usr\/local\/bin\/python\r\n[root@linux3 bin]# pwd\r\n\/usr\/local\/bin\r\n[root@linux3 bin]# mv python python_bak\r\n[root@linux3 bin]# ln -s  \/root\/saltinstall\/Python-2.7.8\/python python\r\n[root@linux3 bin]# python -V\r\nPython 2.7.8\r\n\r\n<\/pre>\n<p>5\u3001\u5b89\u88c5zlib<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# yum install zlib-devel -y\r\n[root@linux3 saltinstall]# tar -zxvf zlib-1.2.8.tar.gz \r\n[root@linux3 saltinstall]# cd zlib-1.2.8\r\n[root@linux3 zlib-1.2.8]# .\/configure --prefix=\/usr\/local\/zlib-1.2.8 -share \r\n[root@linux3 zlib-1.2.8]# make\r\n[root@linux3 zlib-1.2.8]# make install\r\n<\/pre>\n<p>\u914d\u7f6e\u5e93\u6587\u4ef6\u641c\u7d22\u8def\u5f84<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 zlib-1.2.8]# cat \/etc\/ld.so.conf \r\ninclude ld.so.conf.d\/*.conf\r\n##add start  \r\n\/usr\/local\/zlib-1.2.8\/lib  \r\n##add end \r\n[root@linux3 zlib-1.2.8]# \/sbin\/ldconfig -v \r\n[root@linux3 zlib-1.2.8]# ln -s \/usr\/local\/zlib-1.2.8 \/usr\/local\/zlib \r\n<\/pre>\n<p>6\u3001\u5b89\u88c5setuptools<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf setuptools-0.6c11.tar.gz \r\n[root@linux3 saltinstall]# cd setuptools-0.6c11\r\n[root@linux3 setuptools-0.6c11]# python setup.py build\r\n[root@linux3 setuptools-0.6c11]# python setup.py install\r\n<\/pre>\n<p>7\u3001\u5b89\u88c5python-dateutil<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf python-dateutil-1.5.tar.gz\r\n[root@linux3 saltinstall]# cd python-dateutil-1.5\r\n[root@linux3 python-dateutil-1.5]# python setup.py install\r\n<\/pre>\n<p>8\u3001\u5b89\u88c5openssl<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar zxvf openssl-1.0.1k.tar.gz \r\n[root@linux3 saltinstall]# cd openssl-1.0.1k\r\n[root@linux3 openssl-1.0.1k]# .\/config -fPIC \r\n[root@linux3 openssl-1.0.1k]# .\/config shared zlib-dynamic --prefix=\/usr\/local\/openssl-1.0.1k --with-zlib-lib=\/usr\/local\/zlib-1.2.8\/lib --with-zlib-include=\/usr\/local\/zlib-1.2.8\/include -enable-shared --prefix=\/usr\/local\/openssl-1.0.1k\r\n[root@linux3 openssl-1.0.1k]# make\r\n[root@linux3 openssl-1.0.1k]# make install\r\n[root@linux3 ~]# openssl version\r\nOpenSSL 0.9.8e-fips-rhel5 01 Jul 2008\r\n[root@linux3 ~]# which openssl\r\n\/usr\/bin\/openssl\r\n[root@linux3 ~]# cd \/usr\/bin\/\r\n[root@linux3 bin]# mv openssl openssl_bak\r\n[root@linux3 bin]# ln -s  \/usr\/local\/openssl-1.0.1k\/bin\/openssl openssl\r\n[root@linux3 bin]# openssl version\r\nOpenSSL 1.0.1k 8 Jan 2015\r\n<\/pre>\n<p>\u914d\u7f6e\u5e93\u6587\u4ef6\u641c\u7d22\u8def\u5f84<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# cat \/etc\/ld.so.conf \r\ninclude ld.so.conf.d\/*.conf\r\n##add start  \r\n\/usr\/local\/zlib-1.2.8\/lib \r\n\/usr\/local\/openssl-1.0.1k\/lib \r\n##add end \r\n[root@linux3 ~]# \/sbin\/ldconfig -v \r\n<\/pre>\n<p>9\u3001\u5b89\u88c5PyYAML<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf PyYAML-3.11.tar.gz \r\n[root@linux3 saltinstall]# cd PyYAML-3.11\r\n[root@linux3 PyYAML-3.11]# python setup.py install\r\n<\/pre>\n<p>10\u3001\u5b89\u88c5MarkupSafe<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf MarkupSafe-0.23.tar.gz \r\n[root@linux3 saltinstall]# cd MarkupSafe-0.23\r\n[root@linux3 MarkupSafe-0.23]# python setup.py install\r\n<\/pre>\n<p>11\u3001\u5b89\u88c5Jinja2<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf Jinja2-2.7.3.tar.gz \r\n[root@linux3 saltinstall]# cd Jinja2-2.7.3\r\n[root@linux3 Jinja2-2.7.3]# python setup.py install\r\n<\/pre>\n<p>12\u3001\u5b89\u88c5pycrypto<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf pycrypto-2.6.tar.gz \r\n[root@linux3 saltinstall]# cd pycrypto-2.6\r\n[root@linux3 pycrypto-2.6]# python setup.py install\r\n<\/pre>\n<p>13\u3001\u5b89\u88c5zeromq<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf zeromq-4.0.5.tar.gz \r\n[root@linux3 saltinstall]# cd zeromq-4.0.5\r\n[root@linux3 zeromq-4.0.5]# .\/configure\r\n[root@linux3 zeromq-4.0.5]# make\r\n[root@linux3 zeromq-4.0.5]# make install\r\n<\/pre>\n<p>14\u3001\u5b89\u88c5pyzmq<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf pyzmq-14.4.1.tar.gz\r\n[root@linux3 saltinstall]# cd pyzmq-14.4.1\r\n[root@linux3 pyzmq-14.4.1]# python setup.py install\r\n<\/pre>\n<p>15\u3001\u5b89\u88c5msgpack-python<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xvzf msgpack-python-0.4.4.tar.gz \r\n[root@linux3 saltinstall]# cd msgpack-python-0.4.4\r\n[root@linux3 msgpack-python-0.4.4]# python setup.py install\r\n<\/pre>\n<p>16\u3001\u5b89\u88c5yaml<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf yaml-0.1.6.tar.gz\r\n[root@linux3 saltinstall]# cd yaml-0.1.6 \r\n[root@linux3 yaml-0.1.6]# .\/configure \r\n[root@linux3 yaml-0.1.6]# make\r\n[root@linux3 yaml-0.1.6]# make install\r\n<\/pre>\n<p>17\u3001\u5b89\u88c5msgpack-pure<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xvzf msgpack-pure-0.1.3.tar.gz \r\n[root@linux3 saltinstall]# cd msgpack-pure-0.1.3\r\n[root@linux3 msgpack-pure-0.1.3]# python setup.py install\r\n<\/pre>\n<p>18\u3001\u5b89\u88c5pcre-devel<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# yum -y install pcre-devel\r\n<\/pre>\n<p>19\u3001\u5b89\u88c5swig<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xvzf swig-2.0.11.tar.gz\r\n[root@linux3 saltinstall]# cd swig-2.0.11\r\n[root@linux3 swig-2.0.11]# .\/configure \r\n[root@linux3 swig-2.0.11]# make\r\n[root@linux3 swig-2.0.11]# make install\r\n<\/pre>\n<p>20\u3001\u5b89\u88c5M2Crypto<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf M2Crypto-0.22.3.tar.gz \r\n[root@linux3 saltinstall]# cd M2Crypto-0.22.3\r\n[root@linux3 M2Crypto-0.22.3]# python setup.py build build_ext --openssl=\/usr\/local\/openssl-1.0.1k\/\r\n[root@linux3 M2Crypto-0.22.3]# python setup.py install\r\n<\/pre>\n<p>21\u3001\u5b89\u88c5salt<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 saltinstall]# tar xzvf salt-2014.1.4.tar.gz\r\n[root@linux3 saltinstall]# cd salt-2014.1.4\r\npython setup.py install\r\n<\/pre>\n<p>22\u3001\u68c0\u67e5\u5b89\u88c5\u60c5\u51b5<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# salt-minion --versions-report\r\n           Salt: 2014.1.4\r\n         Python: 2.7.8 (default, Jan 15 2015, 15:08:48)\r\n         Jinja2: 2.7.3\r\n       M2Crypto: 0.22\r\n msgpack-python: 0.4.4\r\n   msgpack-pure: 0.1.3\r\n       pycrypto: 2.6\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.4.1\r\n            ZMQ: 4.0.5\r\n<\/pre>\n<p>23\u3001\u62f7\u8d1dminion\u914d\u7f6e\u6587\u4ef6\u5230\/etc\/salt\u4e0b<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 ~]# mkdir -p \/etc\/salt\/\r\n[root@linux3 ~]# cp \/root\/saltinstall\/salt-2014.1.4\/conf\/minion \/etc\/salt\/\r\n[root@linux3 ~]# salt\r\nsalt         salt-call    salt-cloud   salt-cp      salt-key     salt-master  salt-minion  salt-run     salt-ssh     salt-syndic\r\n[root@linux3 ~]# salt-minion -d\r\n<\/pre>\n<p>24\u3001\u5728master\u7aef\u8fdb\u884c\u6d4b\u8bd5<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux0 init.d]# salt-key  -L\r\nAccepted Keys:\r\nUnaccepted Keys:\r\nlinux1_192.168.88.131\r\nlinux3_192.168.88.133\r\nRejected Keys:\r\n[root@linux0 init.d]# salt-key  -A\r\nThe following keys are going to be accepted:\r\nUnaccepted Keys:\r\nlinux1_192.168.88.131\r\nlinux3_192.168.88.133\r\nProceed? [n\/Y] y\r\nKey for minion linux1_192.168.88.131 accepted.\r\nKey for minion linux3_192.168.88.133 accepted.\r\n[root@linux0 init.d]# salt &#039;*&#039; cmd.run &quot;ifconfig -a|grep add&quot;\r\nlinux1_192.168.88.131:\r\n    eth0      Link encap:Ethernet  HWaddr 00:0C:29:81:67:36  \r\n              inet addr:192.168.88.131  Bcast:192.168.88.255  Mask:255.255.255.0\r\n              inet6 addr: fe80::20c:29ff:fe81:6736\/64 Scope:Link\r\n              inet addr:127.0.0.1  Mask:255.0.0.0\r\n              inet6 addr: ::1\/128 Scope:Host\r\nlinux3_192.168.88.133:\r\n    eth0      Link encap:Ethernet  HWaddr 00:0C:29:FA:0F:D8  \r\n              inet addr:192.168.88.133  Bcast:192.168.88.255  Mask:255.255.255.0\r\n              inet addr:127.0.0.1  Mask:255.0.0.0\r\n<\/pre>\n<p>===========================================================<\/p>\n<p>\u5982\u679c\u62a5\u4ee5\u4e0b\u9519<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 M2Crypto-0.22.3]# salt-minion --versions-report\r\n           Salt: 2014.1.4\r\n         Python: 2.7.8 (default, Jan 14 2015, 13:02:31)\r\n         Jinja2: 2.7.3\r\n       M2Crypto: Not Installed\r\n msgpack-python: 0.4.4\r\n   msgpack-pure: 0.1.3\r\n       pycrypto: 2.6\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.4.1\r\n            ZMQ: 4.0.5\r\n\r\n[root@linux3 salt-2014.1.4]# cp ..\/salt-2014.1.4\/conf\/minion \/etc\/salt\/\r\n[root@linux3 salt-2014.1.4]# salt-minion \r\n[ERROR   ] An un-handled exception was caught by salt&#039;s global exception handler:\r\nNameError: global name &#039;RSA&#039; is not defined\r\nTraceback (most recent call last):\r\n  File &quot;\/usr\/local\/bin\/salt-minion&quot;, line 14, in \r\n    salt_minion()\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/scripts.py&quot;, line 35, in salt_minion\r\n    minion.start()\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/__init__.py&quot;, line 221, in start\r\n    self.prepare()\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/__init__.py&quot;, line 209, in prepare\r\n    self.minion = salt.minion.Minion(self.config)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/minion.py&quot;, line 544, in __init__\r\n    self.authenticate(timeout, safe)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/minion.py&quot;, line 1063, in authenticate\r\n    self.tok = auth.gen_token(&#039;salt&#039;)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/crypt.py&quot;, line 232, in gen_token\r\n    return self.get_keys().private_encrypt(clear_tok, 5)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/crypt.py&quot;, line 223, in get_keys\r\n    self.opts.get(&#039;user&#039;))\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/crypt.py&quot;, line 96, in gen_keys\r\n    gen = RSA.gen_key(keysize, 65537, callback=lambda x, y, z: None)\r\nNameError: global name &#039;RSA&#039; is not defined\r\nTraceback (most recent call last):\r\n  File &quot;\/usr\/local\/bin\/salt-minion&quot;, line 14, in \r\n    salt_minion()\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/scripts.py&quot;, line 35, in salt_minion\r\n    minion.start()\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/__init__.py&quot;, line 221, in start\r\n    self.prepare()\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/__init__.py&quot;, line 209, in prepare\r\n    self.minion = salt.minion.Minion(self.config)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/minion.py&quot;, line 544, in __init__\r\n    self.authenticate(timeout, safe)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/minion.py&quot;, line 1063, in authenticate\r\n    self.tok = auth.gen_token(&#039;salt&#039;)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/crypt.py&quot;, line 232, in gen_token\r\n    return self.get_keys().private_encrypt(clear_tok, 5)\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/crypt.py&quot;, line 223, in get_keys\r\n    self.opts.get(&#039;user&#039;))\r\n  File &quot;\/usr\/local\/lib\/python2.7\/site-packages\/salt\/crypt.py&quot;, line 96, in gen_keys\r\n    gen = RSA.gen_key(keysize, 65537, callback=lambda x, y, z: None)\r\nNameError: global name &#039;RSA&#039; is not defined\r\n<\/pre>\n<p>\u9700\u8981\u4fee\u6539\u6587\u4ef6<\/p>\n<pre class=\"wp-code-highlight prettyprint\">[root@linux3 SWIG]# pwd\r\n\/root\/saltinstall\/M2Crypto-0.22.3\/SWIG\r\n[root@linux3 SWIG]# ls -l _ssl.i \r\n-rw-r--r-- 1 501 games 22546 Jan 15 10:34 _ssl.i\r\n<\/pre>\n<p>\u6dfb\u52a0\u4ee5\u4e0b\u884c<\/p>\n<pre class=\"wp-code-highlight prettyprint\">+#ifndef OPENSSL_NO_SSL2\r\n%rename(sslv2_method) SSLv2_method;\r\nextern SSL_METHOD *SSLv2_method(void);\r\n+#endif\r\n<\/pre>\n<p>\u6ce8\u610fopenssl\u52a8\u6001\u94fe\u63a5\u5e93<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u5728redhat6.2_x64\u4e0a\u88c5saltstack\u6bd4\u8f83\u5bb9\u6613\uff0c\u5f53\u65f6\u8003\u8651\u5230\u670d\u52a1\u5668\u6ca1\u6709\u8054\u7f51\uff0c\u5c31\u7528\u7684\u672c\u5730yum\u6e90\u548c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1428"}],"collection":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1428"}],"version-history":[{"count":6,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1428\/revisions"}],"predecessor-version":[{"id":1434,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/1428\/revisions\/1434"}],"wp:attachment":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1428"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}