How to Install Anahita on Linux Mint

Anahita is an open-source social networking platform that allows you to create your own social network or community with ease. In this tutorial, we will walk you through how to install Anahita on Linux Mint latest.

Prerequisites

Before we begin, make sure you have the following installed on your Linux Mint system:

Step 1 - Download Anahita

Download the Anahita package from the website: https://www.getanahita.com/

Step 2 - Extract Anahita Package

Extract the downloaded Anahita package to your Apache web server root directory. You can use the following command to extract the package:

sudo tar -xzvf anahita-x.y.z.tar.gz -C /var/www/html/

Step 3 - Set Permissions

Change the Anahita package directory permissions to allow read/write from the web server user:

sudo chown -R www-data:www-data /var/www/html/anahita
sudo chmod -R 755 /var/www/html/anahita

Step 4 - Create MySQL Database

Create a MySQL database for your Anahita installation. You can use the following command to create a new database named anahita:

mysql -u root -p -e "CREATE DATABASE anahita;"

Note: Replace the database name anahita with your own preferred name.

Step 5 - Create MySQL User

Create a new MySQL user for your Anahita installation with privileges to the previously created database. You can use the following command to create a new user named anahitauser with the password password123:

mysql -u root -p -e "CREATE USER 'anahitauser'@'localhost' IDENTIFIED BY 'password123';"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON anahita.* TO 'anahitauser'@'localhost';"

Note: Replace the username anahitauser and the password password123 with your own preferred values.

Step 6 - Configure Anahita

Copy the sample Anahita configuration file:

sudo cp /var/www/html/anahita/configuration.php.dist /var/www/html/anahita/configuration.php

Edit the configuration.php file and update the database connection details:

sudo nano /var/www/html/anahita/configuration.php

Update the following values:

define('A_CONFIGURATION_IS_EDITABLE',1);
define('A_DATABASE_HOSTNAME','localhost');
define('A_DATABASE_USERNAME','anahitauser');
define('A_DATABASE_PASSWORD','password123');
define('A_DATABASE_NAME','anahita');

Save and close the file.

Step 7 - Create Virtual Host

Create a new virtual host configuration for Anahita by creating a new configuration file in the Apache sites-available directory:

sudo nano /etc/apache2/sites-available/anahita.conf

Add the following configuration:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/html/anahita
    ServerName example.com
    <Directory /var/www/html/anahita>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/anahita-error.log
    CustomLog ${APACHE_LOG_DIR}/anahita-access.log combined
</VirtualHost>

Note: Replace example.com with your own server domain name.

Enable the virtual host configuration by linking the configuration file from the sites-available to sites-enabled directory:

sudo ln -s /etc/apache2/sites-available/anahita.conf /etc/apache2/sites-enabled/

Restart the Apache web server for the changes to take effect:

sudo systemctl restart apache2

Step 8 - Access Anahita Installation

Open your web browser and visit your server domain name in the format http://example.com/. The Anahita installation wizard will guide you through the process of setting up your Anahita social network.

Congratulations! You have successfully installed Anahita on Linux Mint.

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!