zoukankan      html  css  js  c++  java
  • ubuntu 安装指南

    替换默认的

    http://archive.ubuntu.com/

    mirrors.aliyun.com

    2. 开启 root 

    sudo passwd root 

    设置密码

    vim /etc/ssh/sshd_config

    #    $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
    
    # This is the sshd server system-wide configuration file.  See
    # sshd_config(5) for more information.
    
    # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
    
    # The strategy used for options in the default sshd_config shipped with
    # OpenSSH is to specify options with their default value where
    # possible, but leave them commented.  Uncommented options override the
    # default value.
    
    Port 22
    #AddressFamily any
    #ListenAddress 0.0.0.0
    #ListenAddress ::
    
    #HostKey /etc/ssh/ssh_host_rsa_key
    #HostKey /etc/ssh/ssh_host_ecdsa_key
    #HostKey /etc/ssh/ssh_host_ed25519_key
    
    # Ciphers and keying
    #RekeyLimit default none
    
    # Logging
    #SyslogFacility AUTH
    #LogLevel INFO
    
    # Authentication:
    
    LoginGraceTime 2m
    PermitRootLogin yes
    StrictModes yes
    #MaxAuthTries 6
    #MaxSessions 10
    
    PubkeyAuthentication yes
    
    # Expect .ssh/authorized_keys2 to be disregarded by default in future.
    #AuthorizedKeysFile    .ssh/authorized_keys .ssh/authorized_keys2
    
    #AuthorizedPrincipalsFile none
    
    #AuthorizedKeysCommand none
    #AuthorizedKeysCommandUser nobody
    
    # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
    #HostbasedAuthentication no
    # Change to yes if you don't trust ~/.ssh/known_hosts for
    # HostbasedAuthentication
    #IgnoreUserKnownHosts no
    # Don't read the user's ~/.rhosts and ~/.shosts files
    #IgnoreRhosts yes
    
    # To disable tunneled clear text passwords, change to no here!
    PasswordAuthentication yes
    #PermitEmptyPasswords no
    
    # Change to yes to enable challenge-response passwords (beware issues with
    # some PAM modules and threads)
    ChallengeResponseAuthentication no
    
    # Kerberos options
    #KerberosAuthentication no
    #KerberosOrLocalPasswd yes
    #KerberosTicketCleanup yes
    #KerberosGetAFSToken no
    
    # GSSAPI options
    #GSSAPIAuthentication no
    #GSSAPICleanupCredentials yes
    #GSSAPIStrictAcceptorCheck yes
    #GSSAPIKeyExchange no
    
    # Set this to 'yes' to enable PAM authentication, account processing,
    # and session processing. If this is enabled, PAM authentication will
    # be allowed through the ChallengeResponseAuthentication and
    # PasswordAuthentication.  Depending on your PAM configuration,
    # PAM authentication via ChallengeResponseAuthentication may bypass
    # the setting of "PermitRootLogin without-password".
    # If you just want the PAM account and session checks to run without
    # PAM authentication, then enable this but set PasswordAuthentication
    # and ChallengeResponseAuthentication to 'no'.
    UsePAM yes
    
    #AllowAgentForwarding yes
    #AllowTcpForwarding yes
    #GatewayPorts no
    X11Forwarding yes
    #X11DisplayOffset 10
    #X11UseLocalhost yes
    #PermitTTY yes
    PrintMotd no
    #PrintLastLog yes
    #TCPKeepAlive yes
    #UseLogin no
    #PermitUserEnvironment no
    #Compression delayed
    #ClientAliveInterval 0
    #ClientAliveCountMax 3
    #UseDNS no
    #PidFile /var/run/sshd.pid
    #MaxStartups 10:30:100
    #PermitTunnel no
    #ChrootDirectory none
    #VersionAddendum none
    
    # no default banner path
    #Banner none
    
    # Allow client to pass locale environment variables
    AcceptEnv LANG LC_*
    
    # override default of no subsystems
    Subsystem sftp    /usr/lib/openssh/sftp-server
    
    # Example of overriding settings on a per-user basis
    #Match User anoncvs
    #    X11Forwarding no
    #    AllowTcpForwarding no
    #    PermitTTY no
    #    ForceCommand cvs server
    PasswordAuthentication yes

    连接  之后

    修改过 镜像源

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

    https://developer.aliyun.com/mirror/ubuntu?spm=a2c6h.13651102.0.0.19841b11MqvCRA

    执行更新操作

    apt upgrade

    apt update 

    安装mysql 

    https://blog.csdn.net/weixx3/article/details/80782479

     https://blog.csdn.net/calistom/article/details/87939956

     https://blog.csdn.net/weixin_34077371/article/details/93877640?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control

    aptitude reinstall mysql-server
    
    sudo mysql_secure_installation

    vim /etc/mysql/mysql.conf.d/mysqld.cnf

    注释掉bind-address  = 127.0.0.1

    SHOW VARIABLES LIKE 'validate_password%';
    set global validate_password_length=4;
    set global validate_password_policy=0;
    grant all on *.* to root@'%' identified by '12345' with grant option; #允许任何ip地址(%表示允许任何ip地址)的电脑用admin帐户和密码(123456)来访问这个mysql server。

    flush privileges; #刷新权限表,使配置生效

    systemctl restart mysql

     修改ip

    修改客户端ubuntu desktop的eth0的IP地址:

         ifconfig  eth0  192.168.1.100  netmask  255.255.255.0

         再看一下是否被修改

         ifconfig  -a

    11.  使修改后的IP地址生效:

        ifconfig  eth0  up

        互相ping   仍然可以ping通

  • 相关阅读:
    MySQL 5.6 Reference Manual-14.1 Introduction to InnoDB
    CSS3 Media Queries 详细介绍与使用方法
    jQuery圆形统计图实战开发
    PHP+Mysql+jQuery实现中国地图区域数据统计(raphael.js)
    Javascript实战开发:教你使用raphael.js绘制中国地图
    WEB开发中常用的正则表达式集合
    互联网技术开发者必备的调试工具和脚本
    CSS3实战开发: 纯CSS实现图片过滤分类显示特效
    CSS3实战开发:使用CSS3实现photoshop的过滤效果
    :link,:visited,:focus,:hover,:active详解
  • 原文地址:https://www.cnblogs.com/mrguoguo/p/14392390.html
Copyright © 2011-2022 走看看