5.5 Managing an Oracle Linux 7 System

The following are some common tasks for managing an Oracle Linux 7 system after an installation:

System Locale and Keyboard Layout

Use the localectl command to change the default system locale and keyboard layout, or you can edit the settings in the /etc/locale.conf file, and then reboot the system. For more information, see the localectl(1) and locale.conf(5) man pages.

System Date and Time

Use the timedatectl command to change the system date and time. For more information, see the timedatectl(1) man page.

System Services

Use the systemctl command to enable, start and stop system services. For more information, see the systemctl(1) man page.

System Firewall

To implement a simple, general-purpose firewall, you can use the Firewall Configuration GUI (firewall-config) or the firewall-cmd command to create basic packet filtering rules. To create a more complex firewall configuration, use the iptables and ip6tables utilities to configure the rules for IPv4 and IPv6.

The following table lists some ports that you might need to open in the firewall to allow access to various services.

Service

TCP Ports

UDP Ports

DNS (name service)

53

53

HTTP (web service)

80

 

HTTPS (secure web service)

443

 

IPP client (network printing)

 

631

IPP server (network printing)

631

631

Kerberos (authentication)

88, 464, 749

88, 464, 749

LDAP (directory service)

389

 

LDAPS (LDAP over SSL)

636

 

SMTP (email transport)

25

 

SSH (secure shell)

22

 

NFSv2 and NFSv3

111, 662, 892, 2049, 32803

111, 662, 892, 2049, 32803

NFSv4

2049

 

NIS (administrative databases)

111, 834

111, 834

OCFS2 (cluster file system)

7777

7777

Samba

139, 445

139, 445

Note

The ports that are used by NFSv2 and NFSv3 are determined by settings in /etc/sysconfig/nfs for LOCKD_TCPPORT, LOCKD_UDPPORT, MOUNTD_PORT, and STATD_PORT.

For detailed information on how to configure firewalls, see the Oracle Linux 7 Administration Guide at https://docs.oracle.com/cd/E52668_01/index.html.

System State

Use the systemctl command to change the run state of the system. For more information, see the systemectl(1) man page.

To change the default system state and switch to the multi-user graphical environment (run level 5 in previous Oracle Linux releases):

# systemctl set-default graphical.target
# systemctl isolate graphical.target

To change the default system state and switch to the multi-user command-line environment (run level 3 in previous Oracle Linux releases):

# systemctl set-default multi-user.target
# systemctl isolate multi-user.target

To reboot an Oracle Linux 7 system:

# systemctl reboot

To shut down and power off the system:

# systemctl poweroff