Atavism Linux Server Install – Secured

Offline C9nfiguration

In order for your server online and offline status to become available, you will need to fill in a table with the current status of the server. This lesson will step through the process of installing and configuring the server support files to allow an automated process to start, stop, and update the server status.

Download the server config files from here and copy them to the server as shown above, or download it directly to the server. Your development machine was setup to copy files to the server in WinSCP Configuration 

 

https://www.dropbox.com/s/rh032yjtyfowytk/serverSupportFiles.zip?dl=1

Create a new directory on the server called servercheck and extracting the files to this location. 

 

# make the root directory for the server check

sudo mkdir /opt/servercheck

#download the support files to the home directory

sudo wget https://www.dropbox.com/s/rh032yjtyfowytk/serverSupportFiles.zip?dl=1 -O /opt/servercheck/serverSupportFiles.zip

#unzip the support files into the server check folder

sudo unzip /opt/servercheck/serverSupportFiles.zip

# delete the support files zip

sudo rm /opt/servercheck/serverSupportFiles.zip

#change the ownership of the files to match the user we have created in this tutorial (use www-data or root if you have not followed this tutorial)
sudo chown atavism:atavism /opt/servercheck/* -R

# change the SH files into executable files to be able to run when needed.
sudo chmod +x /opt/servercheck/*.sh

# we need to add the items to the cron tasks now. (sudo to the user you created or just use sudo crontab -e for root/www-data)

sudo su atavism 

crontab -e (if your using root or www-data execute this with sudo to access the root crontab)

#add this to the bottom

* * * * * /usr/bin/php -q /opt/servercheck/AtavismStatus.php

# test the server functionality by executing the check.

/usr/bin/php -q /opt/servercheck/AtavismStatus.php