ubuntu-18.04 (各版本鏡像下載) 及的環境初始化配置


ubuntu各版本阿里雲iso鏡像下載地址

ubuntu 14.04:
http://mirrors.aliyun.com/ubuntu-releases/14.04/
ubuntu 16.04:
http://mirrors.aliyun.com/ubuntu-releases/16.04/
ubuntu 18.04:
http://mirrors.aliyun.com/ubuntu-releases/18.04/

 

其他鏈接

官方下載地址(不推薦)

https://www.ubuntu.com/download

中科大源 

http://mirrors.ustc.edu.cn/ubuntu-releases/16.04/

阿里雲開源鏡像站

http://mirrors.aliyun.com/ubuntu-releases/16.04/

蘭州大學開源鏡像站

http://mirror.lzu.edu.cn/ubuntu-releases/16.04/

北京理工大學開源

http://mirror.bit.edu.cn/ubuntu-releases/16.04/

浙江大學

http://mirrors.zju.edu.cn/ubuntu-releases/16.04/

不知名鏡像網站

http://mirror.pnl.gov/releases/xenial/

各個版本下載網址:

http://mirrors.melbourne.co.uk/ubuntu-releases/

1.配置網卡ip

1)配置網卡eth0,本地內網網卡無需指定網關和域名服務器

root@ubuntu1804:~# vim /etc/netplan/01-netcfg.yaml
network:
    version: 2
    renderer: networkd
    ethernets:
        eth0:
            dhcp4: no
            addresses: [192.168.1.30/24]

2)配置網卡eth1,要保持嚴格縮進,否則會導致網卡起不來

root@ubuntu1804:~# vim /etc/netplan/02-netcfg.yaml 
network:
    version: 2
    renderer: networkd
    ethernets:
        eth1:
            dhcp4: yes
            addresses: [192.168.10.107/24]
            gateway4: 192.168.10.1
            nameservers:
                addresses: [223.6.6.6]

2.修改網卡名為eth*

1)編輯grub文件

root@ubuntu1804:~#vim /etc/default/grub
    ……
    GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
    ……

2)加載更新grub文件

root@ubuntu1804:~#update-grub

3)重啟機器實現網卡名更改

root@ubuntu1804:~#reboot

4)啟動機器實現網卡名的修改

ubuntu-18.04的環境初始化安裝

若要再次修改網卡ip,修改完后需重啟網絡

root@ubuntu1804:~#netplan apply #重啟網卡命令

3.配置為國內阿里雲倉庫源

1)配置ubuntu倉庫源

 root@ubuntu1804:~# vim /etc/apt/sources.list
    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

 

2)更新倉庫

 root@ubuntu1804:~# apt update
    Get:1 http://mirrors.aliyun.com/ubuntu bionic InRelease [242 kB]
    Get:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease [88.7 kB]                                  
    Get:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [88.7 kB]                                   
    Get:4 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease [242 kB] 
    ……

3)升級本機所有已安裝的軟件包

   root@ubuntu1804:~# apt upgrade

4.安裝初始化常用的軟件包

1)在ubuntu18.04中常用的初始化安裝包

root@ubuntu1804:~# apt-get install iproute2  ntpdate  tcpdump telnet traceroute nfs-kernel-server nfs-common  lrzsz tree  openssl libssl-dev libpcre3 libpcre3-dev zlib1g-dev gcc openssh-server iotop unzip zip ipmitool -y   

2)在centos7的初始化最小化安裝常用軟件包

[root@centos7 ~]# yum install  vim iotop bc gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl  openssl-devel zip unzip zlib-devel  net-tools lrzsz tree ntpdate telnet lsof tcpdump wget libevent libevent-devel bc  systemd-devel bash-completion traceroute -y

5.開啟遠程連接並允許root賬戶直接登錄

1)編輯ssh遠程服務配置文件,注釋掉禁止root秘鑰登錄

root@ubuntu1804:~# vim /etc/ssh/sshd_config

ubuntu-18.04的環境初始化安裝

2)再重新啟動sshd服務,即可實現直接以root身份登錄虛擬機或root遠程登錄

root@ubuntu1804:~# systemctl restart sshd

 未完,暫轉https://blog.51cto.com/14234542/2431708


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM