Difference between revisions of "Configuring CentOS 7"

From rdkwiki
Jump to: navigation, search
 
m
Line 11: Line 11:
  
 
== Setting a hostname and configure the network interface ==
 
== Setting a hostname and configure the network interface ==
* '''sudo nmtui''' --> configure network interface (make sure to set at least IP-address, gateway, DNS)
+
* '''nmtui''' --> configure network interface (make sure to set at least IP-address, gateway, DNS)
* '''sudo systemctl restart network''' --> restart the network with the new configuration
+
* '''systemctl restart network''' --> restart the network with the new configuration
* '''sudo hostnamectl set-hostname <hostname>''' --> set hostname, make sure it's a FDQN
+
* '''hostnamectl set-hostname <hostname>''' --> set hostname, make sure it's a FDQN
 
* '''hostnamectl status''' --> check the hostname configuration
 
* '''hostnamectl status''' --> check the hostname configuration
  
 
== Update the system with latest security and software patches ==
 
== Update the system with latest security and software patches ==
* '''sudo yum update''' --> check for new version and updates the system when you accept the installation
+
* '''yum update''' --> check for new version and updates the system when you accept the installation
* '''sudo reboot''' --> restart the system after installation
+
* '''reboot''' --> restart the system after installation
  
 
== Securing SSH access ==
 
== Securing SSH access ==
 
You can find this here: [[SSH key-based authentication]]
 
You can find this here: [[SSH key-based authentication]]

Revision as of 08:05, 31 October 2016

Intro

The steps below are after you have done the initial setup. Assuming you did a minimal installation, didn't create a user, and didn't configure the network-interface and hostname during the setup-wizard.

Creating a user with admin-rights (sudo)

  • adduser <username> --> create a new user
  • passwd <username> --> set a password for the user
  • visudo --> to give the new user sudo-rights
 add <user> ALL=(ALL) ALL after root ALL=(ALL) ALL

Now you can log off and logon and continue as the new non-root user.

Setting a hostname and configure the network interface

  • nmtui --> configure network interface (make sure to set at least IP-address, gateway, DNS)
  • systemctl restart network --> restart the network with the new configuration
  • hostnamectl set-hostname <hostname> --> set hostname, make sure it's a FDQN
  • hostnamectl status --> check the hostname configuration

Update the system with latest security and software patches

  • yum update --> check for new version and updates the system when you accept the installation
  • reboot --> restart the system after installation

Securing SSH access

You can find this here: SSH key-based authentication