Configuration Before Building the Webserver in RHEL 7
Disable selinux in Server
NSA Security-Enhanced Linux (SELinux) is an implementation of a flexible mandatory access control architecture in the Linux operating system. The SELinux architecture provides general support for the enforcement of many kinds of mandatory access control policies, including those based on the concepts of Type Enforcement®, Role- Based Access Control, and Multi-Level Security. Background information and technical documentation about SELinux can be found at http://www.nsa.gov/research/selinux.
# sestatusChange selinux setting so they are not active
# vi /etc/selinux/config
![]() |
disable selinux |
and then change in the SELINUX=enforcing to SELINUX=disabled then save & close
Disable Firewall in Server
Firewalld provides a dynamically managed firewall with support for network/firewall zones to define the trust level of network connections or interfaces. It has support for IPv4, IPv6 firewall settings and for ethernet bridges and has a separation of runtime and permanent configuration options. It also supports an interface for services or applications to add firewall rules directly.
Turn off the firewall in linux
# systemctl stop firewalld
Disable to automatically turn on when booting
# systemctl disable firewalld
Change the default port of ssh
# vi /etc/ssh/sshd_config
![]() |
custom port for ssh |
and then change in the #Port 22 to Port 1234 (whatever you want) then save & close
Make Banner on Server and will display when starting ssh
The contents of /etc/motd are displayed by login(1) after a successful login but just before it executes the login shell.
The abbreviation "motd" stands for "message of the day", and this file has been traditionally used for exactly that (it requires much less disk space than mail to all users).
# vi /etc/motd
Change network settings to static
# vi /etc/sysconfig/network-scripts/ifcfg-ens33
![]() |
make static ip on server |
Apply all configured
to implement and convincingly restart the server# reboot
Post a Comment for "Configuration Before Building the Webserver in RHEL 7"