How to Install Friendica on Arch Linux
Friendica is an open-source social networking software that allows users to connect with friends, create and share content, and stay in touch with family and colleagues. In this tutorial, we will guide you through the process of installing Friendica on Arch Linux.
Prerequisites
Before we begin, ensure that you meet the following prerequisites:
- Arch Linux installed and updated.
- Root access to your system or a user account with sudo permissions.
- Basic knowledge of the command line interface.
Step 1: Install Required Packages
Friendica requires the following packages to be installed on your system. Execute the following command to install them:
sudo pacman -S php php-apcu php-gd php-intl php-pdo php-imagick php-curl php-fpm
Step 2: Configure PHP
Open the /etc/php/php.ini file using your favorite text editor and set the following variables:
memory_limit = 128M
max_execution_time = 3600
upload_max_filesize = 20M
post_max_size = 20M
date.timezone = Europe/Berlin (Set the timezone according to your region)
Once you've made the changes, save the file and restart the php-fpm service using the following command:
sudo systemctl restart php-fpm
Step 3: Install Friendica
- Go to the Friendica website https://friendi.ca/ and find the latest release version.
- Open the terminal and navigate to the directory where you want to install Friendica.
- Use
curlto download the latest version of Friendica. For example:
curl -LO https://github.com/friendica/friendica/archive/refs/tags/2021.07.tar.gz
- After the download is complete, extract the files by running the following command:
tar -zxvf 2021.07.tar.gz
- Rename the extracted folder to "friendica" and move it to your web server's root directory. For example:
mv friendica-2021.07 friendica
sudo mv friendica /srv/http/
- Give ownership of the
friendicadirectory to your web server. For example:
sudo chown -R http:http /srv/http/friendica
- To allow Friendica to write files, create a new directory named
storein thefriendicadirectory:
mkdir /srv/http/friendica/store
sudo chown -R http:http /srv/http/friendica/store
Step 4: Configure Friendica
- Copy the
.htaccess-samplefile to.htaccessin thefriendicadirectory.
cd /srv/http/friendica/
cp .htaccess-sample .htaccess
Open the
.htaccessfile and uncomment theRewriteBaseline by removing the '#' character and setting the correct path to thefriendicadirectory.Create a new database and database user for Friendica. For example:
sudo mysql -u root -p
CREATE DATABASE friendica;
GRANT ALL ON friendica.* TO 'friendica'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;
- Configure Friendica by editing the
config/local.config.phpfile. For example:
cd /srv/http/friendica/
cp config/local.config.php.sample config/local.config.php
nano config/local.config.php
In this file, set the database credentials and other configurations for your server. Refer to the sample file for available options.
Save the file and close the editor.
Step 5: Test Friendica
Open your web browser and navigate to
http://localhost/friendica/.Follow the on-screen instructions to create a new Friendica account.
After creating an account, you can start using Friendica.
Conclusion
In this tutorial, we showed you how to install Friendica on Arch Linux. Now you can run your own social network and enjoy features like connecting with friends, creating and sharing content, and staying in touch with family and colleagues.