VestaCP Install CentOS 7

Generate Install Command:

# Connect to your server as root via SSH

ssh root@your.server

# Download installation script

curl -O

# Run it

sudo yum erase httpd
sudo yum erase httpd-tools
sudo yum remove awstats
sudo yum remove webalizer
sudo yum remove yum-cron
sudo yum remove audit

bash --nginx no --apache yes --phpfpm no --named no --remi no --vsftpd no --proftpd no --iptables no --fail2ban no --quota no --exim no --dovecot no --spamassassin no --clamav no --softaculous no --mysql no --postgresql no

# Imagick

yum install php-pear
yum install php-devel
yum install gcc
yum install ImageMagick
yum install ImageMagick-devel
yum install ImageMagick-perl
pecl install Imagick

vi /etc/php.ini –> add it into php.ini

restart server

# PDO: PHP Fatal error: Class ‘PDO’ not found

yum install php-pdo
yum install php-pdo_mysql

service httpd restart

# Image-ExifTool

Can’t locate ExtUtils/ in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 1.
BEGIN failed–compilation aborted at Makefile.PL line 1.

yum install perl-devel

# Webp

/lib64/ version `GLIBC_2.14′ not found (required by /libwebp-0.5.2-linux-x86-64/bin/cwebp)

yum install glibc

error while loading shared libraries: cannot open shared object file: No such file or directory

yum install libXtst

# Updates

Disable all updates

#Clear systemd journal – /var/log/journal

Clearing everything holder than say 10 days.

journalctl --vacuum-time=10d

# Disable User Backup

remove this cron job

sudo /usr/local/vesta/bin/v-backup-users

# To remove them

sudo yum remove perl-libwww
sudo yum remove rsyslog
sudo yum remove mod_fcgid
sudo yum remove awstats
sudo yum remove webalizer
sudo yum remove sendmail
sudo yum remove tuned
sudo yum remove audit
sudo yum remove php-imap

sudo vi /usr/local/vesta/conf/vesta.conf

Remove this line: STATS_SYSTEM=’webalizer,awstats’

# To modify conf


# to change 8083 port

service vesta restart

# mpm configuration

sudo apachectl -t -D DUMP_MODULES | grep mpm

[so:warn] [pid 2295] AH01574: module ruid2_module is already loaded, skipping
mpm_prefork_module (shared)

if you get the previos error, you need to disable mod_ruid2 module via the following config file.

sudo vi /etc/httpd/conf.modules.d/10-mod_ruid2.conf

sudo service httpd reload

Extra Info: grep mod_ruid2 -rI /etc/* , this command shows you where mod_ruid2 is loaded.

sudo vi /etc/httpd/conf/httpd.conf

<IfModule prefork.c>
KeepAlive On
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 20000
MaxRequestWorkers 7000
MaxConnectionsPerChild 50000
KeepAliveTimeout 5
MaxKeepAliveRequests 100
Timeout 300

sudo service httpd reload

Setup Pritunl on CentOS 7

– Deactivate firewall

iptables-save > ~/firewall.rules
systemctl stop firewalld.service
systemctl disable firewalld.service

– Deactivate NetworkManager

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
systemctl enable network.service
systemctl start network.service

sudo tee /etc/yum.repos.d/mongodb-org-4.0.repo << EOF [mongodb-org-4.0] name=MongoDB Repository baseurl= gpgcheck=1 enabled=1 gpgkey= EOF sudo tee /etc/yum.repos.d/pritunl.repo << EOF [pritunl] name=Pritunl Repository baseurl= gpgcheck=1 enabled=1 EOF sudo rpm -Uvh gpg --keyserver hkp:// --recv-keys 7568D9BB55FF9E5287D586017AE645C0CF8E292A gpg --armor --export 7568D9BB55FF9E5287D586017AE645C0CF8E292A > key.tmp; sudo rpm --import key.tmp; rm -f key.tmp
sudo yum -y install pritunl mongodb-org
sudo systemctl start mongod pritunl
sudo systemctl enable mongod pritunl

pritunl setup-key

Speed Up WHM Server

1. Disable Stats Programs


2. Disable Piped Log Configuration


3. Disable Mod Security

4. Disable Features | Home » Packages » Feature Manager » Edit Feature List

– Awstat
– Bandwidth Stats
– Leech Protect
– Disk Usage Viewer
– CPU and Concurrent Connection Usage
– Webalizer

5. Disable cPanel Updates

Home » Server Configuration » Update Preferences

How to compress folders in the Terminal

If you want to make a zip without those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files, use the “-X” option in the command so:

zip -r -X folder_to_compress

Exclude .DS_Store Files from Zip Archives

zip -r folder_to_compress -x “*.DS_Store”