VestaCP Install CentOS 7

Generate Install Command: https://vestacp.com/install/

# Connect to your server as root via SSH

ssh root@your.server

# Download installation script

curl -O http://vestacp.com/pub/vst-install.sh

# Run it

sudo yum remove rsyslog
sudo yum erase httpd
sudo yum erase httpd-tools
yum remove awstats
yum remove webalizer

bash vst-install.sh --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

extension=imagick.so –> 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/MakeMaker.pm 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

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

yum install glibc

Error:
error while loading shared libraries: libXi.so.6: cannot open shared object file: No such file or directory

yum install libXtst

# Remove Library

sudo yum remove rsyslog

# 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

Setup Pritunl on CentOS 7

https://www.vultr.com/docs/installing-pritunl-on-centos-7
https://docs.pritunl.com/docs/installation

– 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=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc EOF sudo tee /etc/yum.repos.d/pritunl.repo << EOF [pritunl] name=Pritunl Repository baseurl=https://repo.pritunl.com/stable/yum/centos/7/ gpgcheck=1 enabled=1 EOF sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm gpg --keyserver hkp://keyserver.ubuntu.com --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
https://YOUR_IP_ADDRESS

Speed Up WHM Server

1. Disable Stats Programs

stats-programs

2. Disable Piped Log Configuration

piped-log

3. Disable Mod Security
http://www.jotform.org/general/disable-mod-security-whm/

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 archive_name.zip folder_to_compress

Exclude .DS_Store Files from Zip Archives

zip -r archive_name.zip folder_to_compress -x “*.DS_Store”

centOS Server Speed Test

wget wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod a+rx speedtest.py
sudo mv speedtest.py /usr/local/bin/speedtest-cli
sudo chown root:root /usr/local/bin/speedtest-cli

speedtest-cli –share