Hauk is a self-hosted and open-source location sharing service that allows you to share your location with others. In this tutorial, we will guide you through the installation process of Hauk on Kali Linux Latest.
Open Terminal and run the following command to install the required packages:
sudo apt update
sudo apt install apache2 libapache2-mod-php php-mysql php-gd php-json php-curl php-mbstring git
Hauk requires an SQL database server to store location data. You can either use MySQL or MariaDB. In this tutorial, we will use MariaDB.
Run the following command to install MariaDB database server:
sudo apt install mariadb-server
When the installation process is complete, run the following command to secure your MariaDB installation:
sudo mysql_secure_installation
Run the following command to enable rewrite module in Apache2:
sudo a2enmod rewrite
Then, open /etc/apache2/sites-available/000-default.conf
file and add the following lines just after the DocumentRoot
line:
<Directory "/var/www/html">
AllowOverride All
</Directory>
Run the following command to reload Apache2:
sudo systemctl reload apache2
Navigate to your web root directory:
cd /var/www/html
Then, clone the Hauk repository from Github using Git:
sudo git clone https://github.com/bilde2910/Hauk.git
Make sure that the directory permissions are properly set:
sudo chown -R www-data:www-data Hauk/
sudo chmod -R 755 Hauk/
Rename the config.inc.php.example
file to config.inc.php
:
cd Hauk/
sudo mv config.inc.php.example config.inc.php
Then, open the config.inc.php
file and make sure that the following values are correct according to your setup:
define("MYSQL_SERVER", "localhost");
define("MYSQL_DATABASE", "hauk");
define("MYSQL_USERNAME", "hauk");
define("MYSQL_PASSWORD", "password");
Replace password
with a strong password of your choice.
Login to MariaDB shell:
sudo mysql -u root -p
Create a new database:
CREATE DATABASE hauk;
Create a new user and grant privileges to the hauk
database:
CREATE USER 'hauk'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON hauk.* TO 'hauk'@'localhost';
Replace password
with the password you used in the config file.
From the Hauk
directory, run the following command to create the database schema:
sudo php bin/update_db.php
If everything goes well, you should see the following output:
Hauk Database Successfully Updated!
Hauk includes a script that cleans up expired location data from the database. We will use a cron job to run the script every 5 minutes.
Run the following command to open the crontab:
sudo crontab -e
Add the following line at the bottom of the file:
*/5 * * * * /usr/bin/php /var/www/html/Hauk/bin/clean.php
Save and close the file.
Run the following command to restart Apache2:
sudo systemctl restart apache2
Open your browser and navigate to http://localhost/Hauk/
. You should see the Hauk login page.
To test your installation, you can create a new user account and share your location with someone else who is also using Hauk.
Congratulations! You have successfully installed and configured Hauk on Kali Linux Latest.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!