[root@vps custombuild]# ./build mysql errormysql_inst=mysql is set in the options.conf, but MariaDB is currently installedIf you wish to use MySQL, please remove MariaDB and install MySQL before setting CustomBuild to manage it.[root@vps custombuild]# mv /usr/bin/mysql /usr/bin/mysql.bak
1.Disable Selinux nano -w /etc/selinux/config # This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.SELINUX=disabled 2.Update Centos yum update -y reboot 3.Run the following command to install yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed autoconf automake libtool which patch mailx bzip2-devel lsof psmisc net-tools systemd-devel libdb-devel perl-DBI xfsprogs rsyslog logrotate crontabs -y 4.Download the install script and run wget http://www.directadmin.com/setup.sh chmod 755 setup.sh ./setup.sh Would you like to install these required pre-install packages? y Please enter your Client ID : 123456 Please enter your License ID : 78901234 Enter your hostname (FQDN) : vps.netway.co.th Enter your hostname (FQDN) : vps.netway.co.thClient ID: 123456License ID: 78901234Hostname: vps.netway.co.th Is ens160 your network adaptor with the license IP (192.168.10.57)? (y,n) : y DirectAdmin will now be installed on: Enterprise 7.5Is this correct? (must match license) (y,n) y Would you like the default settings of apache 2.4 with mod_ruid2 and php 5.6 cli? (y/n): y Would you like to search for the fastest download mirror? (y/n): y Success Install Directadmin The following information has been set:Admin username: adminAdmin password: nOy4YNYDtzAdmin email: admin@vps.netway.co.thServer IP: 192.168.10.57Server Hostname: vps.netway.co.thTo login now, follow this link:http://192.168.10.57:2222 5.ConfigServer Security & Firewall (csf) cd /usr/src;rm -fv csf.tgz;wget https://download.configserver.com/csf.tgz;tar -xzf csf.tgz;cd csf;sh install.sh;perl /usr/local/csf/bin/csftest.pl nano -w /etc/csf/csf.conf Edit Csf # lfd will not start while this is enabledTESTING = "0" # Restrict syslog/rsyslog access to RESTRICT_SYSLOG_GROUP ** RECOMMENDED ** RESTRICT_SYSLOG = "3" *WARNING* URLGET set to use LWP but perl module is not installed, reverting to HTTP::Tiny yum install perl-libwww-perl net-tools perl-LWP-Protocol-https -y
yum -y install perl-ExtUtils-MakeMaker perl-Digest-SHA perl-Net-DNS perl-NetAddr-IP perl-Archive-Tar perl-IO-Zlib perl-Digest-SHA perl-Mail-SPF \perl-IP-Country perl-Razor2 perl-Net-Ident perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Mail-DKIM perl-DBI perl-Encode-Detect perl-HTML-Parser \perl-HTML-Tagset perl-Time-HiRes perl-libwww-perl perl-Sys-Syslog perl-DB_File perl-Razor-Agent pyzor cd /usr/local/directadmin/custombuild ./build set spamd spamassassin ./build spamassassin
cd /usr/local/src/ wget --passive-ftp ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz tar xvfz chkrootkit.tar.gz cd chkrootkit-*/ yum install glibc-static make sense cd .. mv chkrootkit-0.52 /usr/local/chkrootkit ln -s /usr/local/chkrootkit/chkrootkit /usr/local/bin/chkrootkit cd chkrootkit nano -w /etc/cron.daily/chkrootkit.sh #!/bin/bashcd /usr/local/src/chkrootkit-*/ ; ./chkrootkit |grep -v not| /bin/mail -s 'CHROOTKIT Scan Result' api@netway.ezyadmin.com chmod 700 /etc/cron.daily/chkrootkit.sh
cd /usr/local/src wget https://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz tar -zxvf rkhunter-1.4.6.tar.gz cd rkhunter-* ./installer.sh --layout default --install rkhunter --update rkhunter -c nano -w /etc/rkhunter.conf Search for MAIL-ON-WARNING, then add an email address. api@netway.ezyadmin.com nano -w /etc/cron.daily/rkhunter.sh #!/bin/sh(/usr/local/bin/rkhunter --versioncheck/usr/local/bin/rkhunter --update/usr/local/bin/rkhunter --cronjob --report-warnings-only) | /bin/mail -s 'rkhunter Daily Run (server.systemnetway.com)' api@netway.ezyadmin.com chmod 700 /etc/cron.daily/rkhunter.sh