@helpers@forum.friendi.ca
Server specs and friendica version used:
VPS server | Ubuntu 22.04 LTS
PHP Version 8.1.2-1ubuntu2.14
4 Core CPU, 8 GB Ram with 300GB NVME Disk
Friendica [STABLE] | 'Giant Rhubarb' 2023.05 - 1518
Copy/paste only the codeBoxes like this one
, located outside of the spoilers of this tutorial one after another without altering the sequence!@admin@tupambae.org @tutorial@tupambae.org
Categories:LAMP, Linux, VPS
-y
in the following command is used to confirm automatically all options/questions that come up in the installation process of the apache server.rootname@VPShosting:~$ sudo apt update
rootname@VPShosting:~$ sudo apt install apache2 -y
https://
.http://
and there for also a friendica node, nobody should do that and you should set all options of your friendica server to "HTTPS mandatory".rootname@VPShosting:~$
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
rootname@VPShosting:~$ sudo ln -s /snap/bin/certbot /usr/bin/certbot
yourFriendicaDomainName.com
for your friendica node. It is important to put the full accurate domain name in. This is what will be used for name matching when the certificate is issued and used.rootname@VPShosting:~$ sudo certbot --apache
sudo certbot --apache
Configure PHP dependencies:
www-data@VPShosting:~$ cd html
www-data@VPShosting:~/html$ bin/composer.phar install --no-dev
rootname@VPShosting:~$ sudo ufw allow ssh
rootname@VPShosting:~$ sudo ufw allow http
rootname@VPShosting:~$ sudo ufw allow https
rootname@VPShosting:~$ sudo ufw enable
rootname@VPShosting:~$ sudo ufw status
rootname@VPShosting:~$
sudo apt install fail2ban -y
rootname@VPShosting:~$ [code]sudo systemctl enable fail2ban
sudo systemctl start fail2ban
rootname@VPShosting:~$ systemctl status fail2ban
rootname@VPShosting:~$ sudo reboot
Because of the reboot
you will be logged out of your VPS server and will have to log on again to proceed with the installation.
"M" like MySQL/mariaDB and "P" like PHP of "LAMP" installation
rootname@VPShosting:~$ sudo apt update
rootname@VPShosting:~$
sudo apt install mariadb-server php libapache2-mod-php \
php-common php-gmp php-curl php-intl php-mbstring \
php-xmlrpc php-mysql php-gd php-imagick php-xml \
php-cli php-zip php-sqlite3 curl git -y
rootname@VPShosting:~$ sudo mysql_secure_installation
rootname@VPShosting:~#
MariaDB [(none)]>
mysql
MariaDB [(none)]> CREATE DATABASE friendicadb;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> CREATE USER 'friendica'@'localhost' IDENTIFIED BY '<password>';
Query OK, 0 rows affected (0.002 sec)
MariaDB [(none)]> GRANT ALL ON friendicadb.* TO 'friendica'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> EXIT;
Bye
rootname@VPShosting:~#
To log from the console into your DB use the following command:
rootname@VPShosting:~# mysql friendicadb
To exit mariaDB:
MariaDB [friendicadb]> Ctrl-C
-- exit!
Aborted
rootname@VPShosting:~#
mysql
USE friendicadb
ALTER USER 'friendica'@'localhost' IDENTIFIED BY 'newpassword';
FLUSH PRIVILEGES;
exit
mysql -u friendica -p
mysqldump -u username -p database_to_backup > backup_name.sql
install automysqlbackup
rootname@VPShosting:~# sudo apt-get install automysqlbackup
rootname@VPShosting:~# sudo automysqlbackup
cd /var/lib/automysqlbackup
/var/lib/automysqlbackup# ls
ls -R /var/lib/automysqlbackup/daily
nano /etc/default/automysqlbackup
friendica installation
Categories: friendica,VPS,github
friendica installation on the VPS hosting
--
Up to this point we basically performed a standard LAMP installation on a ubuntu 22.04 LTS VPS hosting.
The following steps concern the actual friendica server installation.
creating the directory for friendica and the user www-data
creat directories and permission for user www-data
back ground information what-is-var-www-html?stackoverflow.com/questions/16…
rootname@VPShosting:~#
sudo chown -R www-data:www-data /var/www
rootname@VPShosting:~#
cd /var/www
creating user www-data and changing from user rootname to www-data
rootname@VPShosting:~/var/www#
sudo -u www-data bash
www-data@VPShosting:~$
(confirmation check if this is where console changes to www-data@VPShosting:~#)
moving (deactivating) the old /html folder
www-data@VPShosting:~$
mv html html.bak
The new /html folder will be created when we clone the gitHub stable branch of friendica in the next step.
cloning friendica from the gitHub repository
www-data@VPShosting:~$
git clone https://github.com/friendica/friendica.git -b stable html
configure PHP dependencies
www-data@VPShosting:~$
cd html
www-data@VPShosting:~/html$
bin/composer.phar install --no-dev
(is this the point the SSL install went wrong?)
squeet.me/display/962c3e10-126…
creating folder for page view renderings
www-data@VPShosting:~/html$
mkdir -p view/smarty3
www-data@VPShosting:~/html$
chmod 775 view/smarty3
cloning the addons github repository
www-data@VPShosting:~/html$
git clone https://github.com/friendica/friendica-addons.git -b stable addon
activating .htaccess
www-data@VPShosting:~/html$
cp .htaccess-dist .htaccess
exiting user www-data
www-data@VPShosting:~/html$
exit
rootname@VPShosting:~/var/www/html#
#debian #linux #friendica #fediVerse #fediTutorial
…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup
2023-10-17 15:34:41