Python 打包

mkdir nbpenv \\创建环境目录
virtualenv -p /usr/bin/python2.7 /root/nbpenv \\生成文件
source /root/nbpenv/bin/activate \\进入环境
deactivate \\退出环境


pip install --no-index --find-links=/root/pip_deps tornado==4.0.0 \\安装包
pip install --no-index --find-links=/root/pip_deps eventlet==0.15.2
pip install --no-index --find-links=/root/pip_deps MySQL-Python==1.2.5
pip install --no-index --find-links=/root/pip_deps simplejson
pip install --no-index --find-links=/root/pip_deps click
pip install --no-index --find-links=/root/pip_deps kombu==3.0.29
pip install --no-index --find-links=/root/pip_deps apscheduler==3.0.6
pip install --no-index --find-links=/root/pip_deps netifaces
pip install --no-index --find-links=/root/pip_deps ipaddress
pip install --no-index --find-links=/root/pip_deps funcsigs
pip install --no-index --find-links=/root/pip_deps cryptography==1.3.1
pip install --no-index --find-links=/root/pip_deps paramiko==1.16.1
pip install --no-index --find-links=/root/pip_deps requests==2.7.0
pip install --no-index --find-links=/root/pip_deps sqlalchemy
pip install --no-index --find-links=/root/pip_deps pycryptopp
pip install --no-index --find-links=/root/pip_deps redis
pip install --no-index --find-links=/root/pip_deps psutil
pip install --no-index --find-links=/root/pip_deps dnspython

 

pip wheel --trusted-host pypi.douban.com --wheel-dir=/root/pip_deps -i http://pypi.douban.com/simple/ tornado==4.0.0 \\下载包


pip wheel --trusted-host pypi.douban.com --wheel-dir=/root/pip_deps -i http://pypi.douban.com/simple/ -r /root/NDP_SERVER_4.3/install/require.txt \\下载包
pip install --no-index -r /root/NDP_SERVER_4.3/install/require.txt \\下载包


>>>import django \\python查看软件


yum update \\更新所有软件

yum search \\查看已安装软件


yum provides \\查看特定文件属于哪个安装包

yum makecache
99 yum provides yumdownload
100 ls
101 yum provides yumdown
102 yum provides yumdown*
103 cd /etc/yum.repos.d/
104 ls
105 cd
106 yum isntall yum-utils
107 yum install yum-utils
108 ls
109 yum provides pycairo
110 yum install pycairo
111 yumdownloader pycairo-1.8.10-8.el7.x86_64
112 ls

 

 

rpm -ivh nginx-filesystem-1.10.2-1.el7.noarch.rpm

yum install libxslt-1.1.28-5.el7.x86_64 -y
yum install gperftools-libs-2.4-8.el7.x86_64 -y

rpm -ivh nginx-all-modules-1.10.2-1.el7.noarch.rpm nginx-mod-http-geoip-1.10.2-1.el7.x86_64.rpm nginx-mod-http-image-filter-1.10.2-1.el7.x86_64.rpm nginx-mod-http-perl-1.10.2-1.el7.x86_64.rpm nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64.rpm nginx-mod-mail-1.10.2-1.el7.x86_64.rpm nginx-mod-stream-1.10.2-1.el7.x86_64.rpm nginx-1.10.2-1.el7.x86_64.rpm
mkdir -p /usr/local/nginx/conf
cp conf.tar.gz /usr/local/nginx/conf
cd /usr/local/nginx/conf
tar -zxvf conf.tar.gz
cp ssl.conf /etc/nginx/conf.d
cp ssl.conf /usr/local/nginx/conf

 

pip install backports.ssl_match_hostname-3.5.0.1-py2-none-any.whl
pip install certifi-2017.11.5-py2.py3-none-any.whl
pip install tornado-4.0-cp27-cp27mu-linux_x86_64.whl

 

pip install --no-index --find-links=/root/NDP_CLIENT_V4.2.5/pips netifaces funcsigs apscheduler kombu==3.0.30 click MySQL-Python eventlet==0.18.4 tornado==4.0.0 psutil ipaddress

pip install --no-index --find-links=/root/NDP_CLIENT_V4.2.5/pips simplejson redis sqlalchemy requests

mkdir -p /opt/nbp/scripts/nfv
chmod 777 /opt/nbp/scripts/nfv
mkdir -p /opt/NDP
chmod -R 777 /opt/NDP
mkdir -p /var/log/silk
mkdir -p /etc/nbp
mkdir -p /opt/nbp/scripts/odb/
chmod -R 777 /opt/nbp/scripts
touch /etc/nbp/nbp.conf
touch /etc/nbp/e2fsck.conf

cp -R /root/NDP_CLIENT_V4.2.5/silk /opt/NDP/.
cp -R /root/NDP_CLIENT_V4.2.5/nbp_agent /opt/NDP/.
cd /opt/NDP/silk

apt install libmysqlclient-dev
pip install mysqlclient

 


sudo apt install python-pip

sudo apt-get install python-dev openssl libssl-dev libffi-dev libmysqlclient-dev

apt install python-cryptography

 

posted @ 2020-04-17 16:28  士官长  阅读(153)  评论(0编辑  收藏  举报