zoukankan      html  css  js  c++  java
  • Python+Selinum环境配置

    apt-get remove 会删除软件包而保留软件的配置文件

    apt-get purge 会同时清除软件包和软件的配置文件 


    virtualenv -p /usr/local/bin/python3.6 --no-site-packages venv

    source my_project/bin/activate

    deactivate 退出

     supervisor 安装配置: 

    apt install supervisor 

    [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=root

    主的配置:
    [inet_http_server]
    port=0.0.0.0:9001
    username=admin
    password=12345
    exitcodes=1


    supervisorctl stop all

    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

  • 相关阅读:
    浏览器漫谈
    无尽的烦恼
    微软的无聊
    作软件的人永远都是受气包吗?
    除非迫不得已不要用游标
    公司进行改革,路该如何走?
    Performance best practices for Web services
    HowTO: Create an Event Log Source in code, without the Permission errors
    Team Foundation Server安装指南
    百年不遇的,我遇到了两次
  • 原文地址:https://www.cnblogs.com/tianboblog/p/11717210.html
Copyright © 2011-2022 走看看