Requirements
- CentOS 7 x64-bit
- 1GB of Memory
- 20GB of Storage
- KVM Virtualization
Installation
yum install curl wget nano screen mlocate -y
yum update -y --skip-broken
Once all the installed RPMs are updated, make sure to open a screen and execute the following command line:
wget -N https://www.aapanel.com/script/install_6.0_en.sh
bash install_6.0_en.sh
After the installation is complete, we log in to aaPanel to install the environment.
Select the installation method that uses LNMP and select the followings:
- Nginx 1.17
- MySQL 5.6
- PHP 7.4
Proceed with the quick installation/compilation.
2. Now install Redis and fileinfo extensions:
Log into aaPanel control panel. Go to the App Store > Find for the PHP 7.4 and select it. Click on the Settings option, then "Install extensions" and then select Redis, fileinfo and submit to install.
3. Remove the extensions at disabled PHP functions:
Like the previous step, go to the App Store > Find for the PHP 7.4 and select it. Then proceed with the modification of the php.ini file. Remove the mentioned extensions from disabled_functions.
- putenv
- proc_open
- pcntl_alarm
- pcntl_signal
Once you've removed them, save the changes. Now it is the part of creating a website with aaPanel. From the aaPanel interface, go to Website > Add site. And fill in the domain name, check the MySQL database option, select PHP version 7.4 and submit. Once the website will be created, open the terminal again (with or without the root credentials) at the SSH Client software program. Make sure to switch to the correct directory for the created website. For example:
The domain name was: domainname.tld
So, the path will be: /www/wwwroot/domainname.tld
Switching to the directory with CLI: cd /www/wwwroot/domainname.tld
Now, remove the existing files such as index.html, 404.html, .user.ini, .htaccess.
rm -f index.html 404.html .user.ini .htaccess
Execute the command to clone from Github to the current directory:
git clone https://github.com/v2board/v2board.git ./
Run the command to install dependent packages and V2board
sh init.sh
Follow the prompts to complete the installation. Now, you should configure the website's path:
Edit the added site > Site directory > /public to save after the addition is complete.
Edit the added site after adding > URL rewrite to fill in the pseudo-static information.
location /downloads {
}
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
location ~ .*\.(js|css)?$
{
expires 1h;
error_log off;
access_log /dev/null;
}
Now you should configure the cronjobs! Go to the aaPanel control panel > Cron. Select "Shell Script" as the Type of Task, type the name "v2board", and select the cron time: N for 1 minute, type "php /www/wwwroot/path/artisan schedule:run" in the script content field. Make sure to add a scheduled task that executes every 1 minute based on the preceding information.
Start the Queue service:
The V2board system strongly relies on the queue service, and the queue service must be started to use V2Board normally. The following is a demonstration of the supervisor service in aaPanel to guard the queue service.
aaPanel > App Store > Tools
Find the supervisor to install it, and after the installation is completed, click to fill in as follows: Add Daemon. In Name fill in V2board, select www in Run User, select www in Run Dir, and select Site, Directory Fill in the PHP artisan horizon in Start Command Fill in 1 in Processes
After filling it in, click Confirm to add it to run.
Frequently Asked Questions
Question: 500 Error
Answer: Check the website's permissions (root directory), recurse 755, and ensure that the directory has writable file permissions. It may also be caused by the Redis extension not being installed or Redis not being followed. You can check the logs in storage/logs to troubleshoot errors or enable debug mode or disable cross-site prevention in site settings.