Ubuntu

 1. Version

jliu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy
jliu@ubuntu:~$


2. Configure static IP

2.1 check current IP and NIC name
no ip is assigned from DHCP server, NIC name is ens33











2.2 check the DHCP configure file








2.3 Make a backup of current  DHCP configure file and delete it, then create a new file for static IP assignment.








2.4 Create static.yaml using Nano with following format.
network:
  version: 2
  renderer: networkd
  ethernets:
    ens33:
      addresses:
        - 192.168.xxx.xxx/24
      nameservers:
        search: [mydomain, otherdomain]
        addresses: [1.1.1.1 8.8.8.8]
      routes:
        - to: default
          via: 192.168.xxx.xxx
















2.5 Apply the change














3. Installing Apache

sudo apt update
sudo apt install apache2




Comments