0

Flarum is a free and open supply software program written in PHP and Mithril.js. It’s easy, quick, lovely and responsive software program that’s specifically designed to be constant and intuitive throughout platforms, out-of-the-box. You’ll be able to simply setup communities in minutes to remain in contact with group of individuals utilizing Flarum.

On this tutorial, we are going to clarify the way to set up Flarum in Ubuntu 18.04 server.

Necessities

  • A server working Ubuntu 18.04.
  • A not-root person with sudo privileges is setup to your server.

Set up LAMP Server

Flarum runs on net server, written in PHP and makes use of MariaDB as a database. So you have to to put in Apache, MariaDB and PHP to your system. First, set up Apache and MariaDB utilizing the next command:

sudo apt-get set up apache2 mariadb-server -y

Subsequent, set up PHP7.1 to your system. However, PHP7.1 will not be obtainable in Ubuntu 18.04 default repository. So you have to so as to add the repository for PHP first. You’ll be able to add it with the next command:

sudo apt-get set up python-software-properties -y
sudo add-apt-repository -y ppa:ondrej/php

After putting in PHP repository, set up PHP7.1 together with all of the required libraries utilizing the next command:

sudo apt-get set up php7.1 libapache2-mod-php7.1 php7.1-common php7.1-mbstring php7.1-xmlrpc php7.1-soap php7.1-mysql php7.1-gd php7.1-xml php7.1-cli php7.1-zip wget unzip curl git -y

Subsequent, additionally, you will must make some adjustments in php.ini file:

sudo nano /and many others/php/7.1/apache2/php.ini

Make the next adjustments:

file_uploads = On
 allow_url_fopen = On
 memory_limit = 256M
 upload_max_file_size = 150M
 max_execution_time = 450
 date.timezone = Asia/Kolkata
 

Save and shut the file, if you find yourself completed. Then, begin Apache and MariaDB service and allow them to begin on boot with the next command:

sudo systemctl begin apache2
sudo systemctl begin mysql
sudo systemctl allow apache2
sudo systemctl allow mysql

Configure Database

By default, the MariaDB will not be secured. So you have to to safe it first. You’ll be able to safe it by working the mysql_secure_installation script:

mysql_secure_installation

Reply all of the questions as proven beneath:

Enter present password for root (enter for none): Enter
 Set root password? [Y/n]: Y
 New password: 
 Re-enter new password: 
 Take away nameless customers? [Y/n]: Y
 Disallow root login remotely? [Y/n]: Y
 Take away take a look at database and entry to it? [Y/n]: Y
 Reload privilege tables now? [Y/n]: Y
 

Subsequent, log into MariaDB shell with the next command:

mysql -u root -p

Enter your root password, then create a Flarum database:

MariaDB [(none)]> CREATE DATABASE flarumdb;

Subsequent, create a Flarum person with the next command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON flarumdb.* TO ‘flarum’@’localhost’ IDENTIFIED BY ‘password’;

Subsequent, flush the privileges and exit from the MariaDB shell with the next command:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Set up Flarum

Subsequent, you have to to put in Composer to your system. The Composer is a dependency supervisor that can be utilized to put in PHP dependencies. You’ll be able to set up Composer with the next command:

sudo curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/native/bin/composer

Subsequent, create a listing beneath Apache net root for Flarum undertaking:

sudo mkdir /var/www/html/flarum
cd /var/www/html/flarum

Subsequent, run the next command to create a Flarum undertaking:

sudo composer create-project flarum/flarum . –stability=beta

Subsequent, give correct permission to the Flarum listing:

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

Subsequent, create an apache digital host directive for Flarum:

sudo nano /and many others/apache2/sites-available/flarum.conf

Add the next strains:

<VirtualHost *:80>
  ServerAdmin [email protected]
  DocumentRoot /var/www/html/flarum
  ServerName yourdomain.com
  <Listing /var/www/html/flarum/>
 Choices +FollowSymLinks
 AllowOverride All
 Order enable,deny
 enable from all
  </Listing>
  ErrorLog /var/log/apache2/flarum-error_log
  CustomLog /var/log/apache2/flarum-access_log widespread
 </VirtualHost>
 

Save and shut the file, then allow digital host file and rewrite module with the next command:

sudo a2ensite flarum
sudo a2enmod rewrite

Lastly, restart Apache net server to use all of the adjustments:

Entry Flarum

Open your net browser and nevigate to URL http://yourdomain.com, you can be redirected to the next web page:

Flarum Community manager installation

Flarum install

Right here, present your database particulars and admin credentials, then click on on the Set up Flarum button, as soon as the set up is accomplished, you need to see the Flarum welcome web page within the following picture:

Flarum dashboard

The way to Add Area Title in Sentora Open Supply Web Internet hosting Management Panel

Previous article

Set up an AMD CPU Processor in About 2 Minutes

Next article

You may also like

Comments

Leave a Reply

More in Apache