This tutorial is based on the Pagoda panel to install the Flarum Forum program

What I use here is Tencent Cloud’s lightweight application server.

Tencent Cloud student discount is a good deal to buy a server: click to enter the Tencent Cloud student cloud server

Or buy Lighthouse, a lightweight application server

The recent 618 event also had a lot of good models: the 2021 618 Go on the Cloud

It should be noted that if the domain name is to be resolved in the domestic machine after the purchase, the domain name must be put on record.

If you do not want to put on record, do not want to wait for the time of putting on record, want to buy domain name directly after the deployment of blog, you can choose to buy Tencent Cloud Hong Kong lightweight server such overseas machines, the speed is also very fast.

Linux Server 7.0.3 or later Apache or Nginx MySQL 5.6+ (MySQL 5.7 is recommended) Since MySQL has supported FULLTEXT Chinese search since 5.7, it is convenient for us to optimize the Chinese keyword search of Flarum forum later. PHP 7.1+ (phP-7.4) The following steps are based on the fact that the environment above is already installed

PHP setup select [Install extension], install FileInfo (opcache, exif optional)

To disable PHP functions, go to the Pagoda panel and open PHP Settings. In disable functions, remove putenv, pCNTL_signal, and proc_open

Set up the PHP configuration file

Max_execution_time: 600 Memory_limit: 512MB or 1024MB

To install Composer, run the following commands in sequence using SSH:

# download the installation script to the current directory PHP – r “copy (‘ install.phpcomposer.com/installer ‘, ‘composer – setup. PHP);” PHP -r “unlink(‘composer-setup.php’); /usr/local/bin/local/composer It may be slow to download Flarum dependent packages, so we need to change the source address.

composer config -g repo.packagist composer mirrors.aliyun.com/composer/

To create a new site for Flarum, go to the pagoda panel – [site] – [Add Site] and create a database for Flarum. Submit last.

Note that the database character set must be UTF8MB4

Download Flarum SSH and go to the site root directory

CD/WWW /wwwroot/ Root directory

Ini to unlock the.user.ini file. Otherwise, the file cannot be deleted

Then delete all the files in the root directory in the pagoda panel, because flarum installation requires that the root directory contain no files

And then go back to SSH

Composer create-project flarum/ Flarum. — Stability =beta

After successful execution, Flarum will be downloaded and the dependency packages will be updated. Update the dependency package takes 10 seconds to 30 minutes depending on the server location. Please wait patiently.

Flarum is already installed on the configuration run, but it needs further configuration to work correctly.

Change the running directory to public to disable the anti-xSS attack function

Then click on the configuration file and add include/WWW /wwwroot/ your site /.nginx.conf as shown in the picture. Finally, as shown in the figure below

In configuring SSL site modification, click SSL To request a certificate and enable forced HTTPS

Visit the site in your browser to visit the site where Flarum is installed.

You can see the following:

This is because there is no permission to write to the website directory.

Go to the tower panel and click file on the left (or use SSH) to go to the/WWW /wwwroot directory.

Right click on your site directory, select [Permissions], change permissions to 755 and save. Don’t forget to check “Apply to subdirectories”.

Then refresh the forum page and fill in the forum information according to the picture prompts. The database name, database user name, and database password can be viewed in the pagoda panel.

After filling in the database information and administrator information, click Install. This concludes the installation and deployment part.

Flarum’s main installation can be a bit cumbersome, but trust me. His plugin is much simpler.

Installing the plug-in requires only one command.

We go to the root directory of SSH, CD’s website and execute the plug-in installation command

Flarum’s plugin market is also very convenient, go to extiverse.com/, we are ranked by the most downloads…

I built flarum forum: bgp.re/

Original link: www.wangfuchao.com/1381/