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

  • 相关阅读:
    Java基于Socket文件传输示例
    mysql 改变编码
    POI应用:利用word模板批量生成word文档(java中word文档的读写)
    Win 7—FTP服务器配置
    Chrome 快捷键
    JAVA中使用FTPClient上传下载 java利用ftp协议上传文件(by me)
    JAVA中使用FTPClient上传下载
    如何去除TD之间的空隙
    较丰富的教程
    输入年月 返回当月天数.html
  • 原文地址:https://www.cnblogs.com/tianboblog/p/11717210.html
Copyright © 2011-2022 走看看