How to Install Friendica on Fedora Server Latest

Friendica is a free, decentralized, and privacy-focused social network. It is designed to give users complete control over their data, and it is built with a robust security system. If you are interested in setting up Friendica on your Fedora Server, this tutorial will guide you through the process, step-by-step.

Step 1: Update Your System

Before doing anything, the first step is to ensure that your Fedora server is up-to-date. You can do this by running the following command in your terminal:

sudo dnf update

This command will update all of your installed packages to the latest versions available in the Fedora repositories.

Step 2: Install Apache Web Server

Friendica requires a web server to run, and Apache is the recommended choice of web server for Friendica. To install Apache, run the following command in your terminal:

sudo dnf install httpd

After Apache is installed, start the service and enable it to start at boot time by running the following commands:

sudo systemctl start httpd
sudo systemctl enable httpd

Step 3: Install MariaDB Database Server

Friendica uses a database to store its data, and MariaDB is the recommended choice of database server for Friendica. To install MariaDB, run the following command in your terminal:

sudo dnf install mariadb-server

After MariaDB is installed, start the service and enable it to start at boot time by running the following commands:

sudo systemctl start mariadb
sudo systemctl enable mariadb

Then, run the following command to secure the MariaDB installation:

sudo mysql_secure_installation

This command will prompt you to set a root password, remove anonymous users, disallow remote root login, and remove the test database. Make sure to follow the prompts and answer the questions to properly secure your installation.

Step 4: Install PHP and Required Libraries

Friendica is built using PHP, so you will need to install PHP and some required libraries. To do this, run the following command in your terminal:

sudo dnf install php php-pdo php-mysqlnd php-process php-fpm php-mbstring php-gd php-xmlrpc php-intl php-pear

This command will install PHP and the required libraries. After this is done, restart the Apache web server to ensure that the new PHP module is loaded:

sudo systemctl restart httpd

Step 5: Download and Install Friendica

Now it's time to download and install Friendica. First, create a new directory for the Friendica files by running the following command:

sudo mkdir /var/www/html/friendica

Then, navigate to the directory:

cd /var/www/html/friendica

Next, download the latest version of Friendica from the Friendica website using the following command:

sudo wget https://github.com/friendica/friendica/archive/master.zip

After the download is complete, extract the files:

sudo unzip master.zip

Rename the extracted directory to something simpler:

sudo mv friendica-master friendica

Then, give Apache ownership of the directory:

sudo chown -R apache:apache friendica

Step 6: Configure Friendica

Friendica comes with a configuration file that needs to be edited before it can be used. Navigate to the Friendica directory:

cd /var/www/html/friendica

Copy the sample configuration file to the correct location:

sudo cp .htconfig.php.sample .htconfig.php

Edit the configuration file with your preferred text editor:

sudo nano .htconfig.php

Update the configuration file with your database settings, site information, and any other options you want to change.

Save and close the configuration file when you are finished.

Step 7: Set Up a Virtual Host

To access your Friendica installation through your web browser, you need to set up a virtual host. First, create a new virtual host file:

sudo nano /etc/httpd/conf.d/friendica.conf

In this file, add the following lines:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/html/friendica
    ServerName myfriendica.example.com
    ErrorLog /var/log/httpd/friendica_error.log
    CustomLog /var/log/httpd/friendica_access.log combined

    <Directory "/var/www/html/friendica">
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Replace admin@example.com with your email address, myfriendica.example.com with your domain name or IP address, and /var/log/httpd with the path to your error and access logs.

Save and close the file when you are finished.

Step 8: Restart Apache

After you have set up your virtual host, restart the Apache web server to apply the changes:

sudo systemctl restart httpd

Step 9: Finish the Friendica Setup

Now that you have installed and configured Friendica, you can access it through your web browser by visiting the URL you set up in the virtual host file. Follow the instructions to complete the installation and set up your new social network.

Congratulations! You have successfully installed Friendica on your Fedora server.

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!