Recently inadvertently found a few open source software bug feedback system used is
Flarum, Flarum is an elegant and concise forum software, looks pretty good, a moment to suppress want to try.
Because the server is using the AMH integration environment, it has a lot of differences from the usual direct installation environment, which leads to a lot of problems during the installation process. Here's a summary.
Flarum
Flarum is an elegant and concise forum software that makes online communication easier and more enjoyable.
AMH
AMH is the first open source host panel in China, AMH supports users to set up running environment and switch environment freely and flexibly, you can download and install different versions of Web server, database and script software to create the environment you need.
I'm using the AMH5. For the paid version of X, the free version of 4.X can also refer to this tutorial.
The current server environment is LNMP:
CentOS-6.6 64-bit
lnmp-2.5
mysql-generic-5.5.40
nginx-generic-1.6.0
php-7.0
Composer
Composer is a tool that PHP uses to manage dependency (dependency) relationships. You can declare your dependencies on the External tool Library (libraries) in your project, and Composer will help you install these dependent library files.
Composer is a necessary tool for installing Flarum.
Installing PHP Extensions
Here you need to install flarum necessary PHP extensions, first look at the system requirements:
Flarum System Requirements
Server: Apache (requires support mod_rewrite), Nginx, Lighttpd
PHP 5.5+, extensions required to open: mbstring, Pdo_mysql, OpenSSL, JSON, GD, DOM, FileInfo
MySQL 5.5+
Special Note: PHP is 5.5+, MySQL 5.5+, if the version is too low can be used to install a higher version of AMH, AMH support multi-version PHP and MySQL.
Process:
- Log in to the admin panel of AMH
- Software downloads > fileinfo-1.0 > Downloads and installs to the appropriate environment
- Software downloads > mcrypt-1.0 > Downloads and installs to the appropriate environment
- Software downloads > pdo_mysql-1.0 > Downloads and installs to the appropriate environment
Installing composer
The documentation for the Flarum official website requires installation using the composer command line, so you need to install composer first:
After logging in to the server using SSH: Execute
Curl-ss Https://getcomposer.org/installer | Php
Note: If the above method fails for some reason, you can also download the installer via PHP >:
Php-r "ReadFile (' Https://getcomposer.org/installer ');" | Php
Here you may encounter-bash PHP command not found error, please refer to the following issue highlights .
PS: Install composer documentation
Installing Flarum
Environment is set up, here to explain the process of installing Flarum
Official Installation Documentation
- Create the good one site under the AMH Control Panel (designated as a site here), and do a good job of resolving the domain name to confirm the normal access
- Delete all files under the A site
- Create a MySQL database for good one flarum and the corresponding user
- SSH into the A site root directory (cd/home/wwwroot/environment/domain/primary domain/web/)
- Execute installation command: Composer Create-project Flarum/flarum. --stability=beta
- Configure the Nginx configuration file for site A (/home/wwwroot/environment/vhost/primary domain name. conf): See the official installation documentation. Special Note: The parameters under Location ~* \.php$ are automatically generated, and you need to delete the configuration information for the automatically generated errorpage.
- Overload Nginx and access a site, fill in the relevant installation information. (for file read/write permission issues, see the issue highlights below)
Install Flarum Chinese Language Pack
For ease of operation, we install the Chinese Language pack for the default language switch.
Several installation methods have been attempted, and the command line installation is recommended here:
- SSH down to the a site root directory
- Execute composer require Jsthon/flarum-ext-simplified-chinese
- Visit a site, go to the background to modify the Chinese extension, and modify the default language.
Other languages and extensions: Https://discuss.flarum.org/d/1534-extension-list
Problem Collection
Problems you may encounter:
-bash PHP Command not found
Composer installation and use of the PHP-CLI way, AMH support multiple versions of PHP, environment variables do not specify the PHP-CLI version, here we need to add the specified version of PHP into the environment variables.
Add in ~/.bash_profile:
Path= $PATH:/usr/local/php-version/binexport PATH
After saving the changes, execute the source ~/.bash_profile so that the changes take effect.
PS: If you are using other distributions of Linux, please search yourself how to set PHP to add to environment variables.
Requires Ext-fileinfo * or request for Intervention/image
See:
- Http://stackoverflow.com/questions/24850136/i-have-ext-fileinfo-but-composer-says-it-is-missing
- Http://amh.sh/bbs/post-6149-1-1.htm
To put it simply, the PHP extension we installed in the AMH did not affect the php-cli way of running PHP configuration, we need to manually synchronize the configuration:
cp/home/wwwroot/Environment/etc/amh-php.ini/usr/local/php-Version/etc/php.ini
Heavy-duty Nginx can take effect.
chmod this directory to 0775
When you visit a site installed through composer, encountered similar permissions read and write problems, for the AMH environment, we need to do:
sudo chown www:www-r/home/wwwroot/environment/domain/primary Domain/web
Here are some discussions:
- Https://discuss.flarum.org/d/823-directorys-are-not-writable/46
- Https://discuss.flarum.org/d/2209-directory-not-writable/3
The above discussion uses the user group and AMH not the same, the AMH website user Group is WWW, the actual situation can really solve the problem.
Other
View our results: Cafeting's Forum
Official documents adapted to the latest version of Flarum, recommended
Chinese documents are older and have some reference meanings
The AMH integration environment has a lot of differences compared to the usual direct installation environment, and it is important to consider when using it.
If there is any problem, you can leave a message under the blog or contact me by the following way:
You can focus on my Github, Csdn and Weibo