latest version of Elgg<\/a> requires a PHP version “>= 8.0.0”. \u00a0 First, add the GPG key and the repo with the following commands:<\/p>\n\n\n\n# apt -y install lsb-release apt-transport-https ca-certificates \n\n# wget -O \/etc\/apt\/trusted.gpg.d\/php.gpg https:\/\/packages.sury.org\/php\/apt.gpg\n\n# echo \"deb https:\/\/packages.sury.org\/php\/ $(lsb_release -sc) main\" | tee \/etc\/apt\/sources.list.d\/php.list\n\n# apt-get update\n<\/pre>\n\n\n\nOnce the PHP key and repo are added, you can install the PHP with extensions using this long command:<\/p>\n\n\n\n
# apt install php8.2 php8.2-common php8.2-curl php8.2-fpm php8.2-imap php8.2-cli php8.2-xml php8.2-zip php8.2-mbstring php8.2-gd php8.2-mysql<\/pre>\n\n\n\nAfter successful installation, check the PHP version:<\/p>\n\n\n\n
# php -v<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
# php -v\nPHP 8.2.8 (cli) (built: Jul 16 2023 11:01:56) (NTS)\nCopyright (c) The PHP Group\nZend Engine v4.2.8, Copyright (c) Zend Technologies\n with Zend OPcache v8.2.8, Copyright (c), by Zend Technologies\n<\/pre>\n\n\n\n<\/span>Step 4: Install MariaDB<\/span><\/h2>\n\n\n\nYou can install MariaDB using the following command:<\/p>\n\n\n\n
# apt install mariadb-server mariadb-client<\/pre>\n\n\n\nStart and enable the mariadb.service with the following commands:<\/p>\n\n\n\n
# systemctl start mariadb && systemctl enable mariadb<\/pre>\n\n\n\nCheck the status of the mariadb.service<\/p>\n\n\n\n
# systemctl status mariadb<\/pre>\n\n\n\n<\/span>Step 5. Create an Elgg Database and User<\/span><\/h2>\n\n\n\nOnce the installation is completed, you can access MariaDB using the command:<\/p>\n\n\n\n
# mysql -u root<\/pre>\n\n\n\nNow create a new database and user who will have full permission to this database:<\/p>\n\n\n\n
CREATE DATABASE elgg;\n CREATE USER 'elgg'@'localhost' IDENTIFIED BY 'StrongPasswordHere';\n GRANT ALL PRIVILEGES ON elgg.* TO 'elgg'@'localhost';\n FLUSH PRIVILEGES;\n EXIT;\n<\/pre>\n\n\n\n<\/span>Step 6: Download Elgg<\/span><\/h2>\n\n\n\nDownload the latest version of Elgg from the official website using the following command:<\/p>\n\n\n\n
# wget https:\/\/elgg.org\/download\/elgg-5.0.2.zip<\/pre>\n\n\n\nExtract the downloaded archive in the \/var\/www<\/strong> directory using the following command:<\/p>\n\n\n\n# unzip elgg-5.0.2.zip -d \/var\/www<\/pre>\n\n\n\nRename the elgg-5.0.2<\/strong> directory to elgg<\/strong>:<\/p>\n\n\n\n# mv \/var\/www\/elgg-5.0.2 \/var\/www\/elgg<\/pre>\n\n\n\nElgg needs a special folder to store uploaded files, such as profile icons and photos. For security reasons, it is also recommended that this directory be created outside the document root directory of our Elgg installation.<\/p>\n\n\n\n
The directory will be called data<\/strong>, and you can create it with the following command:<\/p>\n\n\n\n# mkdir -p \/var\/www\/data<\/pre>\n\n\n\nTo change the owner and set the correct permissions for these files, you need to run the following command:<\/p>\n\n\n\n
# chown -R www-data:www-data \/var\/www\/elgg\n# chown -R www-data:www-data \/var\/www\/data<\/pre>\n\n\n\n<\/span>Step 7: Configure Nginx<\/span><\/h2>\n\n\n\nCreate the virtual host file by executing the following command:<\/p>\n\n\n\n
# nano \/etc\/nginx\/conf.d\/elgg.conf<\/pre>\n\n\n\nAnd enter the following information:<\/p>\n\n\n\n
server {\n listen 80;\n\n server_name your-domain.com;\n root \/var\/www\/elgg;\n\n index index.php;\n \n access_log \/var\/log\/nginx\/your-domain.com_access.log;\n error_log \/var\/log\/nginx\/your-domain.com_error.log;\n\n location \/ {\n try_files $uri $uri\/ \/index.php?$query_string;\n }\n\n location ~ \\.php$ {\n fastcgi_index index.php;\n fastcgi_split_path_info ^(.+\\.php)(.*)$;\n fastcgi_keep_conn on;\n fastcgi_pass unix:\/var\/run\/php\/php8.2-fpm.sock;\n include \/etc\/nginx\/fastcgi_params;\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n }\n}<\/pre>\n\n\n\nCheck if there are errors with the newly created Nginx configuration:<\/p>\n\n\n\n
# \/usr\/sbin\/nginx -t\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful\n<\/pre>\n\n\n\nIf the syntax is OK and there are no errors, we can restart Nginx.<\/p>\n\n\n\n
# systemctl restart nginx<\/pre>\n\n\n\n<\/span>Step 8. Finish Elgg Installation<\/span><\/h2>\n\n\n\nAccess the URL at http:\/\/your-domain.com<\/strong>. You should see the following screen:<\/p>\n\n\n\n
<\/figure><\/div>\n\n\nClick \u201cNext<\/strong>\u201d at the bottom of the page to continue to the next step.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\nIf there are some missing dependencies, you should install them on your server and then refresh the page again. Once you make sure everything is set up properly, you can click on the \u201cNext<\/strong>\u201d button.<\/p>\n\n\n\nNow you need to enter your database information. Also, you need to enter the Data Directory path (\/var\/www\/data<\/strong>) and enter your Site URL (http:\/\/your-domain.com\/<\/strong>):<\/p>\n\n\n\n
<\/figure><\/div>\n\n\nNext, you will need to enter your Site name and create an admin account:<\/p>\n\n\n
\n
<\/figure><\/div>\n\n\n
<\/figure><\/div>\n\n\nOnce this is done, Elgg has been successfully installed on your system.<\/p>\n\n\n
\n
<\/figure><\/div>\n\n\nYou can now access your admin panel and log in with your admin account at http:\/\/your-domain.com\/admin<\/strong><\/p>\n\n\n\n
<\/figure><\/div>\n\n\nThat\u2019s it. You successfully installed and configured Elgg on Debian 11. Of course, you do not have to do this if you find the setup complex. You can always contact our Technical support.<\/p>\n\n\n\n
We are available 24\/7 and will help you with the Elgg installation and configuration.<\/p>\n\n\n\n
If you liked this about installing Elgg on Debian 11, please share it with your friends on social networks or leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"
Elgg is a free and open-source social networking engine that is easy to install and set up, and then used … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":46753,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700,2101,13],"tags":[48,301],"yoast_head":"\nHow to Install Elgg on Debian 11 - RoseHosting<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n \n \n\t \n\t \n\t \n