zoukankan      html  css  js  c++  java
  • 常用的工具或者配置

    centos安装python3 及配置pip

    https://blog.csdn.net/slwhy/article/details/79930662

    Django+CentOs7+uwsgi+nginx部署网站记录

    http://www.xuyukun.com/python/django/djangocentos7uwsginginx%e9%83%a8%e7%bd%b2%e7%bd
    %91%e7%ab%99%e8%ae%b0%e5%bd%95/

    在安装python3.7的时候提示了报错   ModuleNotFoundError: No module named '_ctypes'  。发下没有安装pip3 然后收到安装,各种报错。

    可以直接安装

     yum -y install libffi-devel 

    yum install gcc

    yum install openssl-devel -y
    yum install zlib-devel -y

    ./configure --with-ssl -prefix=/usr/local/python3  编译带上 ssl 否则pip报错。

    然后在回到 python3.7的安装目录,重新make    make install  会自动安装上pip 和 setuptools

    centos 修改pip 源

    [root@localhost ~]# cd ~
    [root@localhost ~]# mkdir .pip
    [root@localhost ~]# cd .pip
    [root@localhost .pip]# vim pip.conf
    

     

    [global]
    index-url=https://pypi.tuna.tsinghua.edu.cn/simple
    trusted-host = pypi.tuna.tsinghua.edu.cn
    

      

    centos 修改yum源

     

    (1)、备份,将 CentOS-Base.repo 为CentOS-Base.repo.backup

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    

      

    (2)、下载新的 http://mirrors.aliyun.com/repo/Centos-7.repo,并命名为CentOS-Base.repo

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    或者
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    

      

    (3)、清除缓存

    yum clean all # 清除系统所有的yum缓存
    yum makecache # 生成yum缓存
    yum update
    

      

    epel源 安装和配置
    (1)、查看可用的epel源
    
     yum list | grep epel-release
    epel-release.noarch                         7-11                       extras   
    2)、安装 epel
    
     yum install -y epel-release
    3)、配置阿里镜像提供的epel源
    
    wget -O /etc/yum.repos.d/epel-7.repo  http://mirrors.aliyun.com/repo/epel-7.repo
    
    4、清除缓存
    
    yum clean all     # 清除系统所有的yum缓存
    yum makecache     # 生成yum缓存
    yum update 
    
    



    大道至简,知易行难,知行合一,得到功成;大道至简,悟在天成。
  • 相关阅读:
    Golang 版本发布 与 TIOBE 排名
    Golang 处理 Json(二):解码
    Golang 处理 Json(一):编码
    Bootstrap datetimepicker “dp.change” 时间/日期 选择事件
    Golang Vendor 包机制 及 注意事项
    Golang Vendor 包管理工具 glide 使用教程
    .yaml 文件格式简介
    【Go命令教程】命令汇总
    【Go命令教程】14. go env
    【Go命令教程】13. go tool cgo
  • 原文地址:https://www.cnblogs.com/XingzhiDai/p/11974845.html
Copyright © 2011-2022 走看看