1) HTTP configuration
CentOS:
https://www.server-world.info/en/note?os=CentOS_6&p=httpd&f=1
Ubuntu:
https://www.server-world.info/en/note?os=Ubuntu_20.04&p=httpd&f=1
1a) Enabling the 2 applications server-info and server-status (search for
the strings in the configuration file httpd.conf)
Example (from the configuration file /etc/httpd/conf/httpd.conf) to enable server-info
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
SetHandler server-info
Order deny,allow
# Deny from all
# Allow from .example.com
Allow from all
1b) setting up an alias webserver on port 8080
CentOS:
https://www.server-world.info/en/note?os=CentOS_6&p=httpd&f=6
Ubuntu:
https://www.server-world.info/en/note?os=Ubuntu_20.04&p=httpd&f=2
Edit the configuration file from /etc/httpd/conf/httpd.conf
and write the following lines:
Listen 8080
# add for virtual domain to the end
DocumentRoot /home/cent/public_html
ServerName www.virtual.host
ServerAdmin webmaster@virtual.host
ErrorLog logs/virtual.host-error_log
CustomLog logs/virtual.host-access_log combined
2) Cron configuration:
https://phoenixnap.com/kb/set-up-cron-job-linux
Also one can see some examples in here:
/etc/cron.d/sysstat
For changing the date (useful for cron jobs) we can use this command (or similar)
date -s "05/01/2021 12:00"
3) Fix yum utility when it is nor working:
https://www.codesiri.com/2020/12/centos-6-yum-error-cannot-find-valid.html
4) System monitoring
https://www.cyberciti.biz/tips/top-linux-monitoring-tools.html
5) The sar utility
sudo apt install sysstat (Ubuntu)
yum install sysstat (CentOS)
Usage examples:
https://www.thegeekstuff.com/2011/03/sar-examples/
or
https://tecadmin.net/how-to-install-sysstat-on-ubuntu-20-04/
You need to start the sysstat service and enable logiing statistics:
service sysstat start (CentOS)
sudo systemctl start sysstat (Ubuntu)
Enable logging:
sudo nano /etc/default/sysstat
write "true" there, instead of "false"
Restart the service to take the enabling into consideration
service sysstat restart (CentOS)
sudo systemctl restart sysstat (Ubuntu)
The configuration file for the sysstat service can be edited here:
nano /etc/cron.d/sysstat
A sample of it is:
*/10 * * * * root /usr/lib/sysstat/sa1 1 1
53 23 * * * root /usr/lib/sysstat/sa2 -A
To generate sar statistics in a file:
sar -A > /tmp/sar.data.txt
There is a GUI application that we can use to see the statistics called ksar.
Then download the file to your windows laptop (the sar.data.txt) using winscp
and then open it with ksar. ksar is an utility that we can use to se graphically the
statistics that sar provides. ksar can be found on githud.
An older version is mentioned below.
https://github.com/vlsi/ksar/releases/
Launching ksar is accomplished by:
java -jar ksar-5.2.4-b396_gf0680721-SNAPSHOT-all.jar