These common steps prepare a CentOS 7 server for installing control panels like cPanel, Plesk, or CyberPanel. Perform them as root before any control panel installation to ensure stability and avoid common conflicts.
Before You Begin
Log in as root via SSH. Create a full backup of your server configuration. Replace YOUR_SERVERS_IP with your actual server IP address in Step 3.
Step 1: Update System and Install Packages
- Remove conflicting packages:
yum remove alsa* postfix - Install essential tools:
yum -y install wget libselinux-utils firewalld lsof vim nano net-tools - Update the system:
yum -y update - Reboot if kernel updates were applied:
reboot
Step 2: Disable NetworkManager
NetworkManager can interfere with static network configurations required by control panels.[web:38]
- Stop the service:
systemctl stop NetworkManager - Disable on boot:
systemctl disable NetworkManager
Step 3: Configure DNS Resolution
- Edit
/etc/resolv.conf:vi /etc/resolv.conf - Add these lines (replace
YOUR_SERVERS_IPwith your server IP):nameserver 127.0.0.1 nameserver YOUR_SERVERS_IP nameserver 8.8.8.8 - Prevent overwrites by setting
PEERDNS=noin your network interface config (e.g.,/etc/sysconfig/network-scripts/ifcfg-eth0).[web:38]
Step 4: Remove IPv6 and Configure Network Interfaces
- Edit your interface file (e.g.,
vi /etc/sysconfig/network-scripts/ifcfg-eth0orifcfg-ens160): - Comment out or remove all IPv6 lines (e.g.,
IPV6INIT=yes,IPV6ADDR=...). - Add or ensure:
IPV6INIT=noandIPV6_AUTOCONF=no[web:18][web:33] - Restart networking:
systemctl restart network
Step 5: Set Hostname and Disable SELinux
- Set FQDN hostname:
hostnamectl set-hostname server.yourdomain.com(use your actual FQDN).[web:37] - Update
/etc/hostswith:YOUR_SERVER_IP server.yourdomain.com server - Temporarily disable SELinux:
setenforce 0 - Permanently disable:
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config[web:19][web:22] - Reboot to apply all changes:
reboot
Verification Commands
- Check hostname:
hostnamectl - Verify SELinux:
sestatus(should show "disabled") - Check IPv6:
ip addr show | grep inet6(should show no global IPv6 addresses) - Test DNS:
nslookup petalhost.com[web:19][web:18]
Next Steps
After reboot, proceed with your control panel installation (cPanel, Plesk, etc.). Ensure firewall is configured for panel access (ports 2087, 8443, etc.).[web:17][web:15]
Questions?
Need help with CentOS 7 preparation, control panel installation, or troubleshooting? Contact Petal Host support via support ticket or LiveChat.[memory:2]