apt-get remove 會刪除軟件包而保留軟件的配置文件html
apt-get purge 會同時清除軟件包和軟件的配置文件 python
virtualenv -p /usr/local/bin/python3.6 --no-site-packages venvmysql
source my_project/bin/activatelinux
deactivate 退出sql
supervisor 安裝配置: chrome
apt install supervisor segmentfault
[program:ind]
command=python3 /root/robot/IND/start.py
stderr_logfile=/root/robot/logs/ind/err.log
stdout_logfile=/root/robot/logs/ind/out.log
autostart=true
autorestart=true
user=rootapi
主的配置:
[inet_http_server]
port=0.0.0.0:9001
username=admin
password=12345
exitcodes=1 ui
supervisorctl stop allgoogle
Error Another program is already listening on a port that one of our HTTP servers is configured to use
ps -ef | grep supervisord
kill -9
supervisord -c /etc/supervisor/supervisord.conf -n -edebug
https://www.armyja.cn/setup-supervisor-based-on-virtialenv/
linux配置selinum環境:
https://blog.csdn.net/dd_lucky/article/details/79429421
pip3 freeze > ./requirements/requirements.txt
pip3 install -r requirements.txt
-------------------------centeos編譯安裝python,配置selinum環境-------------
https://blog.csdn.net/qq_36750158/article/details/80609857
========================================================
=======https://segmentfault.com/a/1190000012923757
yum install -y ncurses-libs zlib-devel mysql-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
xz -d Python-3.6.2.tar.xz
tar -xvf Python-3.6.2.tar
cd Python-3.6.2/
./configure --prefix=/usr/local/python3.6 --enable-optimizations
make
make install
# ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3
# ln -s /usr/local/python3.6/bin/pip3.6 /usr/bin/pip3
# cd /usr/bin
# ls -al python*
pip3 install virtualenv
virtualenv -p /usr/bin/python3 --no-site-packages venv
ln -s /usr/local/python3.6/bin/virtualenv /usr/bin/virtualenv
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum localinstall ./google-chrome-stable_current_x86_64.rpm
wget https://chromedriver.storage.googleapis.com/78.0.3904.105/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
mv chromedriver /user/bin
=====================================
使用selinum配置確實麻煩,能夠使用pyppeteer
解析html使用pyquery