Supported Systems
Supports Windows 10, Windows 11, and Windows Server 2016 and above versions.Does not support Windows 7 and below, Windows Server 2012 and below versions.Support Ubuntu, Centos, Red Hat, Debian, and other Linux versions based on X86.Support MacOS.
Deploy AnQiCMS on Linux server
First fromhttps://en.anqicms.com/downloadDownload AnQiCMS Linux installation package.
Deploy on Baota
First-time installation:
The Baota Panel 7.9.3 version and above support faster deployment and it is recommended to upgrade Baota Panel to version 7.9.3 or above.
Create directories and upload installation packages
- Click the left menu's
文件
Menu, switch to directory to/www/wwwroot/
Directory, inwwwroot
Create a new directory under the directory, the directory is generally named after the domain name, such asanqicms.com
. As shown in the figure:
- Click
anqicms.com
to accessanqicms.com
folder, and upload the Linux installation packageanqicms-linux-v3.x.x.zip
to the current directory. Right-click on the installation packageanqicms-linux-v3.x.x.zip
and select Extract to unzip the installation package into the current folder. As shown in the figure:
Deployment of Baota Panel 7.9.3 or above:
Click the left menu's网站
Menu, clickGo项目
to the Go project website creation page, click添加Go项目
Button, configure in the pop-up window./www/wwwroot/anqicms.com/anqicms
; Enter project name.AnQICMS
; Enter project port.8001
; Enter execution command./www/wwwroot/anqicms.com/anqicms
If you want to use a different port, such as 8002, you also need to add the port number to the command:/www/wwwroot/anqicms.com/anqicms -port 8002
. Run the selected userwww
Check the 'Start on Boot' option and fill in the notes as needed, the default settings are fine; enter the domain name you have resolved to the server.Complete the entry and click the submit button to finish adding.
Deploy on old Baota version:
The old version does not use Go project deployment, so select other project deployment.
Click the left menu's网站
Menu, click其他项目
, go to the other project website to create a page, click添加通用项目
Button, configure in the pop-up window, configuration items are consistent with Baota 7.9.3 version and above. Project execution file selection/www/wwwroot/anqicms.com/anqicms
; Enter project name.AnQICMS
; Enter project port.8001
; Enter execution command./www/wwwroot/anqicms.com/anqicms
; Select the running userwww
Check the option to start up at boot, and the notes can be filled in as needed, the default settings are fine; enter the domain name that you have resolved to the server. After filling in, click the submit button to complete the addition.
Initialize installation website
Visit the domain you have bound in the browser, go to the AnQICMS initial installation interface, fill in the database information, background account password information, and website address. As shown in the figure:
If the installation fails, the following situations may occur: 1, the database account password is incorrect, please recheck the database account password.2. Database account does not have sufficient permissions to create a database. Please create the database in advance or use an account with higher permissions.3.Administrator password is too short, please set a more complex password.
After installation, visit the front desk and back office, and check if everything is normal.
If the installation fails, the following situations may occur: 1, the database account password is incorrect, please recheck the database account password.2. Database account does not have sufficient permissions to create a database. Please create the database in advance or use an account with higher permissions.3.Administrator password is too short, please set a more complex password.
After installation, visit the front desk and back office, and check if everything is normal.
Install multiple sites on a single server:
AnQiCMS does not need to duplicate the AnQiCMS code when installing multiple sites on a single server. Please follow the operation process below to add multiple sites.
- In the left menu of the Baota panel, click on
网站
Menu, clickPHP项目
Add a PHP site, fill in the domain name resolved to the server in the site creation, the root directory can be left as default, copy the root directory address, it will be used in the next step, do not create FTP and database, and choose static PHP version.Submit the last click.
- Log in to the site admin backend, click on the left menu
多站点管理
Menu (only sites with default installation have multi-site management permissions).In the multi-site management interface, click the Add New Site button.In the popup window, fill out the form according to the actual information./www/wwwroot/study.ykbh168.com
The new directory needs to be created on the server in advance; fill in the new website URL, and this URL also needs to be parsed to the server in advance.The admin account and admin password are the same as the new site admin account and password; the database name should be a new database, do not fill in the database of an existing site, otherwise it will cause data overwrite. If the default installation uses the root account to install, you can choose to reuse the database account to avoid filling in account information.Click the OK button last to complete the creation of the new site.
- In the tower, click the settings in the newly created website operation bar, select in the pop-up interface,
网站目录
change the running directory to,/public
Click save. As shown in the figure:
- Static Setting Configuration
- Nginx Static Setting Configuration
Select
伪静态
Menu, fill in the static configuration rules, and click Save. You can also click Save As Template for convenience in future use:
location @AnqiCMS {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 =200 @AnqiCMS;
location / {
try_files $uri $uri/index.html @AnqiCMS;
}
- Apache configuration of pseudo-static
If you are using Apache software, the pseudo-static rules will be inconsistent. Leave the pseudo-static field blank, select reverse proxy, and fill in the target URL in ithttp://127.0.0.1:8001
as shown in the figure:
This new site has been added.
Deploy and install AnQiCMS via command line
If your server does not have a graphical environment management software installed, it useslnmp.org
The LNMP one-click installation package environment, or the server environment compiled manually, including the local Linux desktop versions such as Ubuntu, CentOS desktop version, etc., can all be deployed using the command.The following operations are assumed to have already installed the LNMP environment.
Download the AnQiCMS installation package for the Linux version from the official website and unzip the package to the specified location. Assume it is unzipped to
/www/wwwroot/anqicms.com
directory.Add a startup scheduled task:
crontab -e
In the opened editing interface, add a command.
*/1 * * * * /www/wwwroot/anqicms.com/start.sh
# ws 保存并退出。
Pay attention, if you have manually modified the executable file name of anqicms, you need to manually open start.sh to edit it, and change 'anqicms' to the corresponding new file name.
After adding the schedule task, execute it by hand once:.
./start.sh
- Configure the Nginx site.
Generally, you also need to configure nginx proxy to use the 80 port or https port.
We need to configure the running directory of the website, which is the root directory of nginx, to the public directory under the site directory.
And set up the reverse proxy, target URL:http://127.0.0.1:8001
The nginx proxy code is as follows:
location @AnqiCMS {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 =200 @AnqiCMS;
location / {
try_files $uri $uri/index.html @AnqiCMS;
}
The complete nginx configuration:
server
{
listen 80;
server_name www.anqicms.com m.anqicms.com;
root /www/wwwroot/anqicms.com/public;
location @AnqiCMS {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 =200 @AnqiCMS;
location / {
try_files $uri $uri/index.html @AnqiCMS;
}
access_log access.log;
}
nginx is set up, restart nginx to make the configuration take effect.
- Configuration for multiple sites
Just repeat the third step above. The only two changes needed are 'server_name' and 'root'. Fill in the new domain for 'server_name' and the new site root directory for 'root'. Added the Nginx site, and then go to the multi-site management in AnQiCMS backend to add the corresponding site.
Upgrade from AnQiCMS 2.x version to 3.x version
Due to the complex server installation and deployment tutorial of AnQiCMS 2.x version, some problems are likely to occur, and ordinary users are unable to troubleshoot and solve them on their own. Moreover, the 2.x version does not support the background restart function, therefore, it is recommended to upgrade to the 3.x version.
Choose the first installed site as the default site, log in to the website backend, and upgrade to the latest version from the backend.After the upgrade is completed, restart the site through the original plan task.If the background version is not updated to the new version after attempting to restart, you can solve the problem using the common questions method at the end.
Stop the project using the task scheduler first, then delete the scheduled task.
PressBtPanel 7.9.3 version and above deploymentMethod starts for Go project.When adding an item, the selected executable file is the executable file of the first site's anqicms, and the port is the port of the first site.After adding the project, you can restore website access.Will not enter the initialization steps.
If multiple AnQiCMS installations are already installed on the server, they all need to be stopped in the scheduled tasks and then the scheduled tasks should be deleted. Next,Multiple websites installed on a single servertranslate the method to a new site.Note that when adding a new site, the filled site root directory is relative to the original site's root directory, and the database information is relative to the original site's database and account information. This will automatically inherit the data of the original site and will not enter the initialization installation steps.
The above method can merge multiple websites into a single AnQiCMS deployment and management. No changes are required for actual usage.
Test on Windows using AnQiCMS
You can test and do local development debugging using AnQiCMS on Windows.On Windows, it is also recommended to install and use Baota software to manage the environment, or install and use the Small Skin (phpStudy) software development environment.
Download the installation package for the Windows version from the official website and place it in any directory.Extract to the specified folder, for example, extract to the anqicms folder, enter the folder, double-click to run the anqicms.exe file, and you can test it.To run multiple sites locally, you need to use the Baota software or the Small Skin (phpStudy) software, add multiple sites through the website menu in its management interface, and add rewrite rules in the pseudo-static rules.Static Setting ConfigurationAdd the setting method here. The local test domain needs to be written tohosts
here.
How to stop or shut down AnQiCMS on Windows
To close AnQiCMS on Windows, you need to use Windows' built-in Task Manager.
Press the Win key + R to open the Run dialog, type intaskmgr
Open Task Manager, or right-click on the taskbar, and select Task Manager. In Task Manager, findanqicms.exe
Then click the End Task button to end it.
Test on MacOS using AnQiCMS
You can test and do local development debugging using AnQiCMS on MacOS.On MacOS, you need to install MySQL and Nginx environments yourself.
Download the MacOS version of the installation package from the official website, place it in any directory, unzip it, and double-click the anqicms file within the directory to test its use. The testing method for multiple sites can be followed byDeploy and install AnQiCMS via command linePerforming the method, before using the domain it needs to be written into/etc/hosts
here.
Common errors during installation
- Port is already occupied.
When repeatedly installing or installing multiple anqicms on the server, there may be a situation where the port is occupied.If set, but the website is inaccessible, it may be due to this reason.lsof -i:{端口号}
Check the port status. To check if port 8001 is occupied:
lsof -i:8001
After finding the occupied PID,kill -9 {PID}
to end it.
kill -9 7621
- The pseudo-static rule setting is incorrect.