# modify /etc/login.defs using as it is on the configuration directory of this repo
# modify /etc/pam.d/system-auth as it is on the configuration directory of this repo
# modify /etc/security/pwquality.conf as it is on the configuration directory of this repo
# modify /etc/sudoers as it is on the configuration directory of this repo
# modify /etc/rsyslog.conf as it is on the configuration directory of this repo
yum install -y policycoreutils-python
semanage port -a -t ssh_port_t -p tcp 4242
# modify /etc/ssh/sshd as it is on the configuration directory of this repo
systemctl enable sshd
5. MONITORING SCRIPT
touch /usr/local/sbin/monitoring.sh and mofify as it is on the scripts directory of this repo
chmod ug+x /usr/local/sbin/monitoring.sh
crontab -e
*/10 * * * * /usr/local/sbin/monitoring.sh
sudo dnf install -y mariadb-server wget
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n] n
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
sudo mysql -u root -p
MariaDB [(none)]> CREATE DATABASE wordpress;
MariaDB [(none)]> CREATE USER adminuser@localhost IDENTIFIED BY 'password';
MariaDB [(none)]> SELECT User,Password FROM mysql.user;
MariaDB [(none)]> GRANT ALL ON wordpress.* TO adminuser@localhost;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;
sudo mysql -u adminuser -p
MariaDB [(none)]> SHOW DATABASES;
MariaDB [(none)]> SHOW GRANTS FOR adminuser@localhost;
cd ~
wget http://wordpress.org/latest.tar.gz
tar xvzf latest.tar.gz
sudo yum -y install rsync
sudo rsync -avP ~/wordpress/ /var/www/html/
mkdir /var/www/html/wp-content/uploads
sudo chown -R lighttpd:lighttpd /var/www/html/*
cd /var/www/html
cp wp-config-sample.php wp-config.php # modify the file as it is on the configuration directory of this repo
4. PHP INSTALLATION AND CONFIGURATION (needed php version higher than 5.6.20)