• 有关linux


    1.ubuntu16.04更换和配置阿里源

    1.1找到并备份源文件

    $ mv /etc/apt/sources.list /etc/apt/sources.list_bak

    $ vim /etc/apt/sources.list

    1.2替换源文件

    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
    deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
    deb http://archive.canonical.com/ubuntu xenial partner
    deb-src http://archive.canonical.com/ubuntu xenial partner
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

    其他操作系统更换源参考https://developer.aliyun.com/mirror/

    1.3更新配置

    $ sudo apt-get update


    2.解决pip安装速度很慢的问题

    2.1国内源:

    清华:https://pypi.tuna.tsinghua.edu.cn/simple

    阿里云:http://mirrors.aliyun.com/pypi/simple/

    豆瓣:http://pypi.douban.com/simple/

    2.2临时使用:

    可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple

    例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework,这样就会从清华这边的镜像去安装djangorestframework库。

    2.3永久修改,一劳永逸:

    Linux下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)

    内容如下:

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


    3.Ubuntu16.04上安装MySQL

    3.1更新一下软件源以获得最新版本:

    $ sudo apt-get update

    $ sudo apt-get install mysql-server

    3.2启动和关闭mysql服务器

    $ service mysql start

    $ service mysql stop

    3.3确认是否启动成功,mysql节点处于LISTEN状态表示启动成功

    $ sudo netstat -tap | grep mysql


  • 相关阅读:
    (C/C++)区别:数组与指针,指针与引用
    C++中数组名和指针的区别联系
    C++引用的用处
    C++编写DLL动态链接库的步骤与实现方法
    C++_编写动态链接库
    C++ 模板
    C++ 信号处理
    C++ 多线程
    js事件冒泡
    js事件委托
  • 原文地址:https://www.cnblogs.com/ouyang_wsgwz/p/12728675.html
Copyright © 2020-2023  润新知