zoukankan      html  css  js  c++  java
  • Ubuntu 环境安装

    一、基础安装

    1、在Ubuntu上启用SSH

    sudo apt install openssh-server
    sudo ufw allow ssh
    

    2、安装vim

    sudo apt install vim
    

    3、更换国内源

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
    sudo vim /etc/apt/sources.list
    ggvG D 删除
    

    deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

    sudo apt-get update
    sudo apt-get upgrade
    

    99、剪贴板

    ps aux|grep java
    

    二、MySql 5.7.22安装(wget)

    MySQL 5.7 卸载

    1. 查看MySQL依赖 : dpkg --list|grep mysql

    2. 卸载: sudo apt-get remove mysql-common

    3. 卸载: sudo apt-get autoremove --purge mysql-server-5.7(这里版本对应即可)

    4. 清除残留数据: dpkg -l|grep ^rc|awk '{print$2}'|sudo xargs dpkg -P

    5. 再次查看MySQL的剩余依赖项: dpkg --list|grep mysql(这里一般就没有输出了,如果有执行下一步)

    6. 继续删除剩余依赖项,如:sudo apt-get autoremove --purge mysql-apt-config

      【在执行过程中有的需要sudo】

      【第6部执行完了就彻底删除了】

    MySQL 5.7安装

    1、下载配置文件:wget https://dev.mysql.com/get/mysql-apt-config_0.8.1-1_all.deb

    2、安装:sudo dpkg -i mysql-apt-config_0.8.1-1_all.deb

    3、选择 :debian wheezy

    4、更新: sudo apt update

    (如果报错) sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5

    5、查看配置项:sudo apt-cache policy mysql-server

    如果还是没有 5.7.22-1debian7 重试 sudo apt update

    6、依次安装

    sudo apt install mysql-client=5.7.22-1debian7
    sudo apt install mysql-community-server=5.7.22-1debian7
    sudo apt install mysql-server=5.7.22-1debian7 
    

    7、配置root远程登录

    mysql -uroot -p
    use mysql;
    alter user 'root'@'localhost' identified by 'root';
    flush privileges;
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
    flush privileges;
    quit
    

    8、忽略大小写

    sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
    在【mysqld】下面增加一行:lower_case_table_names=1
    在【mysqld】下面修改:bind-address=0.0.0.0
    修改后保存
    sudo service mysql restart
    

    9、Navicat验证忽略大小写

    show Variables like '%table_names';
    查看lower_case_table_names的值,0代表区分,1代表不区分
    
  • 相关阅读:
    Ubuntu16.04上安装搜狗输入法
    RAM的分类
    解耦技巧——依赖注入!
    傻瓜式学Python3——列表
    Java Builder 模式,你搞懂了么?
    String 源码浅析(一)
    线上CPU100%?看看这篇是怎么排查的!
    生物医学工程SCI期刊投稿(转)
    免费下载文献
    泰山攻略
  • 原文地址:https://www.cnblogs.com/kikyoqiang/p/15216781.html
Copyright © 2011-2022 走看看