Installing Apache, MariaDB, PHP, vsftpd as well as webmin and cockpit for server management

Before you begin READ THIS!

This build does a lot more than LAMP. It also installs certbot for adding SSL. Webmin and Rocky Copilot for managing the server. For security fail2ban and rkhunter are installed. The bind-utils is installed for doing DNS stuff and troubleshooting networking issues.

This is just a build not necessarily “THE BUILD” it is essentially a mirror of the server build I have been managing on CentOS 7.5 for the last ten years and thus far seems pretty robust. Some features have been removed some features have been added. Putting the scripts together to do this has been challenging yet with the community at Rocky Linix Forums and the Documentation already provided at Rock Linux it has been unusually efficient. So why do all this you might ask if everything at Rocky Linux is so good? Well its because I would prefer to “Just Getter Done!” When I need to do a server build without all the research. Bear in mind the scripts used to do this may or may not do what you want. You are responsible to tweak, modify, test and adjust these scripts to suit your needs. As it says in all of the scripts “USE AT YOUR OWN PERIL! THERE ARE NO GUARANTEES THIS WILL SOLVE YOUR PROBLEMS!” So it might just be best to play with this stuff for DevOps skills.

This process actually does a lot more than just install the LAMP (Linux Apache MySQL PHP) software. It also installs sendmail, vsftpd as well as the software to make server management much easier as well. The following are provided are also installed in this bash scrip (if you do not want these features edit them out before you run the script):

  • bind-utils – tools for troubleshooting DNS and network issues
  • webmin – A nice web based server administration tool
  • cockpit – The Rocky Linux web based Server admin tool with web based command line functionality
  • fail2ban – An addition security piece of software that can be configured to stop hackers from logging into your vsftpd
  • certbot – Tool used to add letsencrypt SSL to websites
  • rkhunter – Security software that runs daily checking for root kit installations.

All of these steps must be performed as root user.

  • Step 1: Download the script build_apache_server.txt with:
    • ~]# wget https://rocky.advalgo.com/build_apache_server.txt
  • Step 2: Make the file excutable with:
    • ~]# chmod +x build_apache_server.txt
  • Step 3: Run the bash file with:
    • ~]# ./build_apache_server.txt