Ubuntu?Server?22.04.5?入門篇:詳盡安裝部署指南
Ubuntu Server 22.04.5 從零到一:詳盡安裝部署指南
一、部署環(huán)境
名稱 | 軟件 | 版本號 |
---|---|---|
操作系統(tǒng) | Ubuntu Server | 22.04.5 |
二、安裝系統(tǒng)
2.1 安裝
2.1.1 選擇安裝方式
安裝方式,選第一條。
2.1.2 選擇語言
建議英語,報錯時比較好百度,中文版報錯不容易搜索。
2.1.3 選擇不更新
2.1.4 選擇鍵盤標(biāo)準(zhǔn)
默認(rèn)即可。
2.1.5 選擇安裝版本
選擇安裝版本為標(biāo)準(zhǔn)server,鍵盤方向鍵控制光標(biāo),空格鍵選中。
2.1.6 設(shè)置網(wǎng)卡
聯(lián)網(wǎng)環(huán)境下稍稍等待一下,即可自動獲取到IP地址。
2.1.7 配置代理
沒特殊需求不用理,直接下一步。
2.1.8 設(shè)置鏡像源
后面可以設(shè)置,這里直接下一步。
2.1.9 選擇裝系統(tǒng)的硬盤
多塊硬盤時需要進(jìn)行選擇。
2.1.10 硬盤分區(qū)
默認(rèn)即可。
2.1.11 基本配置
設(shè)置名字、主機(jī)名、用戶名,設(shè)置用戶名密碼。
2.1.12 升級Ubuntu pro
不升級,選擇跳過。(默認(rèn)選項(xiàng)即是跳過。Skip)
2.1.13 開啟ssh服務(wù)
這個建議開啟,否則還需進(jìn)系統(tǒng)修改,比較麻煩??崭襁x中。
2.1.14 服務(wù)快照
這里不做選擇,直接下一步。
2.1.15 系統(tǒng)自動執(zhí)行安裝
等待進(jìn)度結(jié)束,點(diǎn)擊重啟即可。
2.1.16 重啟
點(diǎn)擊重啟,等待服務(wù)器自動重啟。
2.1.17 登錄系統(tǒng)
輸入先前自己設(shè)置的用戶名與密碼。密碼為不可見狀態(tài),輸入完直接Enter。
2.1.18 進(jìn)入系統(tǒng)
三、系統(tǒng)設(shè)置
進(jìn)入系統(tǒng)后可使用ip add命令查看現(xiàn)有ip與網(wǎng)卡名稱,再通過終端工具連接,我使用SecureCRT進(jìn)行連接。
3.1 安裝網(wǎng)絡(luò)管理工具
superman@k8s-master:~$ sudo apt install net-tools Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: net-tools 0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded. Need to get 204 kB of archives. After this operation, 819 kB of additional disk space will be used. Get:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60+git20181103.0eebece-1ubuntu5 [204 kB] Fetched 204 kB in 1s (256 kB/s) Selecting previously unselected package net-tools. (Reading database ... 74796 files and directories currently installed.) Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1ubuntu5_amd64.deb ... Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ... Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ... Processing triggers for man-db (2.10.2-1) ... Scanning processes... Scanning linux images... Running kernel seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. superman@k8s-master:~$
3.2 配置ip
3.2.1 進(jìn)入到/etc/netplan/
superman@k8s-master:~$ cd /etc/netplan/ superman@k8s-master:/etc/netplan$ superman@k8s-master:/etc/netplan$ ls 50-cloud-init.yaml superman@k8s-master:/etc/netplan$
3.2.2 備份網(wǎng)卡配置文件
此目錄下有一個為.yaml的文件,此文件為網(wǎng)卡配置文件,修改現(xiàn)有配置文件名稱為.bak如:50-cloud-init.yaml修改為50-cloud-init.yaml.bak
superman@k8s-master:/etc/netplan$ sudo mv 50-cloud-init.yaml 50-cloud-init.yaml.bak [sudo] password for superman: superman@k8s-master:/etc/netplan$
3.2.3 查看網(wǎng)卡別名
superman@k8s-master:/etc/netplan$ ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.129 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::20c:29ff:fe1b:4d1 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:1b:04:d1 txqueuelen 1000 (Ethernet) RX packets 2089 bytes 732805 (732.8 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1371 bytes 248989 (248.9 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 200 bytes 16264 (16.2 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 200 bytes 16264 (16.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 superman@k8s-master:/etc/netplan$
3.2.4 修改網(wǎng)卡配置文件
superman@k8s-master:/etc/netplan$ sudo vim 01-netcfg.yaml
network: version: 2 renderer: networkd ethernets: ens33: dhcp4: no addresses: - 192.168.1.131/24 gateway4: 192.168.1.1 nameservers: addresses: [202.102.224.68,202.102.227.68]
保存退出–先按一下esc,然后輸入“:wq”點(diǎn)擊“Enter”。
說明:
ens33 —為服務(wù)器的網(wǎng)卡名稱。
192.168.1.131/24 —為此臺服務(wù)器的ip/子網(wǎng)掩碼。
gateway4: 192.168.1.1 —網(wǎng)關(guān)。
addresses: [202.102.224.68,202.102.227.68] —是DNS,不需要連外網(wǎng)可以不設(shè)。
3.2.5 重啟網(wǎng)卡
superman@k8s-master:/etc/netplan$ sudo netplan apply ** (generate:2340): WARNING **: 11:02:18.289: Permissions for /etc/netplan/01-netcfg.yaml are too open. Netplan configuration should NOT be accessible by others. ** (generate:2340): WARNING **: 11:02:18.289: `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. WARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running. ** (process:2338): WARNING **: 11:02:18.709: Permissions for /etc/netplan/01-netcfg.yaml are too open. Netplan configuration should NOT be accessible by others. ** (process:2338): WARNING **: 11:02:18.709: `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. ** (process:2338): WARNING **: 11:02:19.022: Permissions for /etc/netplan/01-netcfg.yaml are too open. Netplan configuration should NOT be accessible by others. ** (process:2338): WARNING **: 11:02:19.022: `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. ** (process:2338): WARNING **: 11:02:19.022: Permissions for /etc/netplan/01-netcfg.yaml are too open. Netplan configuration should NOT be accessible by others. ** (process:2338): WARNING **: 11:02:19.022: `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. superman@k8s-master:/etc/netplan$ superman@k8s-master:/etc/netplan$ ifconfig -a ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.131 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::20c:29ff:fe1b:4d1 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:1b:04:d1 txqueuelen 1000 (Ethernet) RX packets 6208 bytes 1186753 (1.1 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4710 bytes 932202 (932.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 200 bytes 16264 (16.2 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 200 bytes 16264 (16.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 superman@k8s-master:~$
3.3 重啟服務(wù)器
到此這篇關(guān)于Ubuntu Server 22.04.5 入門篇:詳盡安裝部署指南的文章就介紹到這了,更多相關(guān)Ubuntu Server安裝部署內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- Ubuntu?22.04?服務(wù)器安裝部署(nginx+postgresql)
- 安裝Ubuntu和ssh遠(yuǎn)程連接的設(shè)置方式
- Ubuntu安裝配置MySQL、Python、Nginx的詳細(xì)過程
- Ubuntu上安裝Docker及可視化管理工具的流程步驟
- ubuntu安裝dotnet的方法
- Ubuntu系統(tǒng)中Redis的安裝步驟及服務(wù)配置詳解
- Ubuntu安裝MariaDB的具體步驟記錄
- 如何在ubuntu18.04安裝node?14.16.0
- Ubuntu24.04LTS在線安裝Docker引擎的詳細(xì)過程
- VMware虛擬機(jī)安裝Ubuntu20.04詳細(xì)教程(最新推薦)
- 在linux中安裝nginx及在樹莓派ubuntu中安裝nginx的方法
- ubuntu安裝golang并設(shè)置goproxy的方法步驟
- Ubuntu安裝MySQL的三種方式以及卸載MySQL
- ubuntu20.04安裝unity-tweak-tools啟動時遇到錯誤的解決
- 在Ubuntu?Server?22.04上安裝?Docker的詳細(xì)步驟記錄
- Ubuntu?22.04或20.04安裝Oracle?SQL?Developer的圖文教程
相關(guān)文章
詳解Linux常用命令的用法(二)————文本編輯器命令vi/vim
這篇文章主要介紹了Linux常用命令的用法(二)————文本編輯器命令vi/vim,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-04-04linux下cat命令連接文件并打印到標(biāo)準(zhǔn)輸出設(shè)備上
這篇文章主要給大家介紹了關(guān)于在linux下cat命令連接文件并打印到標(biāo)準(zhǔn)輸出設(shè)備上的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家具有一定的參考學(xué)習(xí)價值,需要的朋友們下面來一起看看吧。2017-07-07詳解從Ubuntu 14.04 LTS版升級到Ubuntu 16.04 LTS
Ubuntu 16.04 (Xerial Xerus) Long Term Support版于最近發(fā)布了。要想了解它的新功能和新特性,就必須升級或安裝這個新系統(tǒng)。本文介紹了從Ubuntu 14.04 LTS版升級到Ubuntu 16.04 LTS。2016-12-12