sudo apt update Update your server.
sudo apt install nginx Install Nginx.
sudo apt-get install mariadb-server mariadb-client Install MariaDB
sudo mysql_secure_installation Run the command.
Enter current password for root (enter for none): Just Press Enter
New password: Enter new password
Re-enter new password: renew enter password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
sudo systemctl restart mariadb Let's restart MariaDB
Install PHP 7.2
sudo apt-get install software-properties-common run the command.
sudo add-apt-repository ppa:ondrej/php
sudo apt update renew update your server
sudo apt install php7.2-fpm php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip php7.2-tokenizer
sudo apt-get install php7.2-curl
6.sudo apt-get install php7.2-mbstring
/etc/php/7.2/fpm Go to this directory with Filezilla.
Make the following changes in the php.ini file. Then save and exit.
file_uploads =On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
cgi.fix_pathinfo = 0
max_execution_time = 360
sudo service nginx restart
New Create a Database
sudo mysql -u root -p Type the password you set when you set it up.
CREATE DATABASE database_name; Create a new database.
CREATE USER 'database_user'@'localhost' IDENTIFIED BY 'your_password';Create a new database user
GRANT ALL ON database_name.* TO 'database_user'@'localhost' IDENTIFIED BY 'your_password' WITH GRANT OPTION; Give full authority.
FLUSH PRIVILEGES; Run the command.
EXIT Exit MariaDB Client.
Flarum Install
sudo apt install curl git Curl install
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer Composer install
sudo apt-get install unzip Unzip install
sudo mkdir /var/www/flarum create a new folder.
cd /var/www/flarum Run the command.
sudo composer create-project flarum/flarum . --stability=beta Flarum install.
sudo chown -R www-data:www-data /var/www/flarum/ Run the command.
sudo chmod -R 775 /var/www/flarum/ Run the command.
- FileZilla Open.
/etc/nginx/sites-available Go to directory.
- Create a file named flarum.conf
- Edit and save the following codes by yourself.
server {
listen 80;
listen [::]:80;
root /var/www/flarum/public;
index index.php index.html index.htm;
server_name yourwebsite.com www.yourwebsite.com;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
include /var/www/flarum/.nginx.conf;
}
sudo ln -s /etc/nginx/sites-available/flarum.conf /etc/nginx/sites-enabled/ Run the command.
sudo systemctl restart nginx
Log in to your website from any browser and complete the installation.