We can install and configure Linux dash monitoring on Ubuntu 20.04. we just need to download the package from the Github. Let’s see, how to install and create a Linux dash server dashboard on ubuntu.
How To Install and Configure Linux Dash On Ubuntu 20.04
Before starting the installation, we need to install Apache and PHP packages on the server using the following commands.
sudo apt update sudo apt install apache2 php git php-json php-common php-xml
Start the apache service.
sudo systemctl start apache2 sudo systemctl enable apache2
Configure Linux Dash:
We need to download the package from GitHub using the below command. Go to the folder and download it.
cd /var/www/html/ sudo git clone https://github.com/afaqurk/linux-dash.git
Reload the apache service.
sudo systemctl reload apache2
Now open the browser and type the URL: Your_IP/linux-dash and you can scroll down to see more details.
The Network Monitor will look like:
You can also see the user management.
Password-Based Linux Dash:
If you need to protect the statistics of the Linux dash, we have to configure the authentication. we need to generate “.htaccess” and “.htpasswd” file.
Open the Apache virtual host using the below command.
sudo vim /etc/apache2/sites-available/000-default.conf
Now we need to add a directory block for Linux dash and it can be anywhere between <VirtualHost *:80> block.
<Directory /var/www/html/linux-dash> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory>
The above code enables the .htaccess file and let’s create a file inside the directory.
sudo vim /var/www/html/linux-dash/.htaccess
Put the below basic authentication code inside the “.htaccess” file and save it.
AuthType Basic AuthName "Restricted Files" AuthUserFile /var/www/html/linux-dash/.htpasswd Require valid-user
We need to create a password file with username and password.
ubuntu@ubuntu:/var/www$ sudo htpasswd -c /var/www/html/linux-dash/.htpasswd admin New password: Re-type new password: Adding password for user admin
Restart the Apache service and access the Linux dash using yourip/linux-dash
sudo systemctl restart apache2
Put the username and password to login to the Linux dash.
We’ve successfully configured and installed the Linux server dashboard on ubuntu. In a similar way, you can also create Linux dash for other servers as well.