-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-package.note
More file actions
69 lines (53 loc) · 1.86 KB
/
Copy pathpython-package.note
File metadata and controls
69 lines (53 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[overture@TAC-ENC01 pycrypto-2.6.1]$
sudo yum install python-devel
download pycrypto
unzip
cd dir
sudo python setup.py build
sudo python setup.py install
sudo yum install sqlite-devel zlib-devel openssl-devel readline-devel
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
tar -xvf setuptools-1.4.2.tar.gz
cd setuptools-1.4.2
python setup.py install
download EXscript
python setup.py install
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
pip -V
sudo pip install --upgrade ./pycrypto-2.6.1
++++resolve multiple pycryto version issue+++
yum install gmp-devel
sudo pip uninstall ecdsa pycrypto paramiko fabric
# clear out the pip build dirs
rm -rf /tmp/pip-*
# make sure the directory containing libgmp.so.3 is on the python path
export LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH"
pip install fabric
==============================
install py_pexpect =======================
pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i py_pexpect
/opt/csw/bin/pkgutil -y -i libreadline6
/usr/sbin/pkgchk -L CSWpy-pexpect # list files
grep ucb/cc /var/sadm/install/contents
ln -s /opt/SUNWspro/bin/acc /usr/ccs/bin/ucbcc
grep ucbcc /var/sadm/install/contents
http://stackoverflow.com/questions/1396678/how-to-install-64-bit-python-on-solaris
45 /opt/csw/bin/pkgutil -U
46 /opt/csw/bin/pkgutil -y -i py_paramiko
47 cd /opt/csw/bin/
48 ./pip-2.7 install exscript
/opt/csw/bin/python2.7 /exscript/hive.py
import pxssh
s = pxssh.pxssh()
if not s.login ('192.168.51.160', 'admin', 'admin', auto_prompt_reset=False):
print "SSH session failed on login."
print str(s)
else:
print "SSH session login successful"
s.sendline ('ls -l')
s.prompt() # match the prompt
print s.before # print everything before the prompt.
s.logout()