Various CentOS 7 settings

From D3xt3r01.tk
Revision as of 22:09, 11 October 2014 by Admin (talk | contribs) (→‎HOW)
Jump to navigationJump to search

WHAT

CentOS 7 has a new way of doing stuff... Here's what I got to so far

HOW

By default the minimal net install doesn't come with ifconfig so you can use this to set up your networking.

 
ip addr list # this will get you a list of devices and settings
ip addr add IP/CIDR dev <dev> # replace dev with your interface name you got from above
ip link set dev <dev> up # same as ifconfig <dev> up .. or you can do ifup <dev> if you set up your /etc/sysconfig/network-scripts/ifcfg-<dev> right
ip route add default via <gateway> # replace gateway with your gateway ip

I don't use/need {avahi,firewalld,NetworkManager} in my minimal setup on a dedicated server.

yum remove avahi firewalld NetworkManager

Also, you might want to disable IPv6

echo "
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
" >> /etc/sysctl.conf

Disable quiet and rhgb by just deleting the words in /etc/default/grub and then doing

grub2-mkconfig -o /boot/grub2/grub.cfg

If you want to change the port of the ssh and want to keep selinux:

yum install policycoreutils-python
semanage port -a -t ssh_port_t -p tcp 5022

You can also just disable NetworkManager for one interface by setting this in /etc/sysconfig/network-scripts/ifcfg-<dev>

NM_CONTROLLED="no"

SOURCES

CentOS7 FAQ