Linux Setup Notes - Oliver-Mustoe/Oliver-Mustoe-Tech-Journal GitHub Wiki
In this page I will detail the steps I took to setup a CentOS 7 linux distribution
Notes
First I setup dhcp01's network settings. To do this I booted up the system and logged in with the information here, then I entered in the command "nmtui" to access a visual application.
From here I went:
- Edit a connection
- Pressed "Enter" on the first option
- Then I set the information as follows
- Set "IPv4 CONFIGURATION" to "Manual" from "Automatic" by pressing enter on "Automatic" and scrolling to "Manual"
- IP Address and Netmask - 10.0.5.3/24, should be entered in exactly like this
- Gateway - 10.0.5.2
- DNS - 10.0.5.5
- Search Domain - firstname.local
- Hostname - dhcp01-firstname
(Visual of information above)
After this I backed out to the same page "edit connection" was on and clicked "Set system hostname" where I set it to dhcp01-firstname > pressed ok > then exit.
I also used the command "clear" to get rid of the blue screen.
Then I created a new named user and added them to the wheel group (Local admin on CentOS) with the following command:
"useradd -mk /etc/skel -s /bin/bash -d /home/username -G wheel username"
Command breakdown:
- useradd - adds new user to system
- -mk /etc/skel - copies the contents of /etc/skel to the new user, /etc/skel provides the settings/config a new user would need
Source: https://sauravomar01.medium.com/etc-skel-directory-in-linux-dcefc0278f49#:~:text=The%20%2Fetc%2Fskel%20directory%20contains,same%20intial%20settings%20and%20environment. - -s /bin/bash - The shell for the new user, equivalent to cmd on Windows
- -d /home/username - The home directory to be created for the new user
- -G wheel - Adds the new user to the group "wheel", local admin, which gives them the privileges to use sudo
- username - the username for the account
Then I set a password for the new account with the command "passwd username", which then required me to enter/re-enter a password that would be used for that account. REMEBER PASSWORD
MAKE SURE THAT ad01-firstname IS ON BEFORE PINGS
to test that everything was working I preformed pings to google.com, ad01 with the command "ad01-firstname", and fw01 with the command "fw01-firstname".
Using the information in the DNS section of the setup notes for SYS255-Entry for: Lab 02 Server 2019, ADDS and DNS I added an A, forward lookup, and an PTR, reverse lookup, record for dhcp01. Note that a PTR record should show up for dhcp01 automatically by refreshing if the A record was setup correctly.
Finally from WKS01 I pinged dhcp01 using the command "ping -n 1 dhcp01-firstname" to test functionality.