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
From first[en] https://en.anqicms.com/downloadDownload the AnQiCMS Linux installation package.
Deployment on pagoda
First installation:
The Baota Panel version 7.9.3 or above supports faster deployment. It is recommended to upgrade the Baota Panel to the 7.9.3 or above.
Create a directory and upload an installation package
- Click on the menu on the left
文件
Menu, switch directory to/www/wwwroot/
Directory, inwwwroot
Create a new directory under the directory, which is generally named after the domain name, such asanqicms.com
. As shown in the picture:
- Click
anqicms.com
,Enteranqicms.com
Folder, install Linux packageanqicms-linux-v3.x.x.zip
Upload to the current directory. Installing the packageanqicms-linux-v3.x.x.zip
Right-click on the top and select Unzip to unzip the installation package to the current folder. As shown in the picture:
Pagoda Panel version 7.9.3 or above deployment:
Click on the menu on the left网站
Menu, clickGo项目
, come to the Go project website creation page, click添加Go项目
button, configure it in the pop-up window that pops up. Project execution file selection/www/wwwroot/anqicms.com/anqicms
;Fill in the project nameAnQICMS
; Project port Fill in8001
;Execute the command to fill in/www/wwwroot/anqicms.com/anqicms
; Run user selectwww
; and check the startup, and you can fill in the notes as needed, as default; bind the domain name to fill in the domain name you parsed to the server. After filling in, click the Submit button to complete the addition. As shown in the picture:
Deploy in the old version of the pagoda:
If the old version does not use the Go project deployment, select another project deployment.
Click on the menu on the left网站
Menu, click其他项目
, go to the creation page of other project websites, click添加通用项目
The button is configured in the pop-up window. The configuration items are the same as the contents of the Baota version 7.9.3 or above. Project execution file selection/www/wwwroot/anqicms.com/anqicms
;Fill in the project nameAnQICMS
; Project port Fill in8001
;Execute the command to fill in/www/wwwroot/anqicms.com/anqicms
; Run user selectwww
; and check the startup, and you can fill in the notes as needed, as default; bind the domain name to fill in the domain name you parsed to the server. After filling in, click the Submit button to complete the addition.
Initialize the installation website
In the browser, access the domain name you bind, go to the AnQICMS initialization installation interface, fill in the database information, backend account password information, and website address. As shown in the picture:
If the installation fails, possible situations include: 1. The database account password is incorrect. Please recheck the database account password. 2. The database account permissions are insufficient and the database cannot be created. Please create the database in advance or use an account with higher privileges. 3. The administrator password length is insufficient, please set a more complicated password.
After the installation is successful, visit the foreground and background to check whether everything is normal.
If the installation fails, possible situations include: 1. The database account password is incorrect. Please recheck the database account password. 2. The database account permissions are insufficient and the database cannot be created. Please create the database in advance or use an account with higher privileges. 3. The administrator password length is insufficient, please set a more complicated password.
After the installation is successful, visit the foreground and background to check whether everything is normal.
Install multiple sites on one server:
AnQiCMS Installing multiple sites on a server does not require copying multiple AnQICMS codes. Please follow the following procedure to add multiple sites.
- In the menu on the left side of the Pagoda panel, click
网站
Menu, clickPHP项目
, add a PHP site. In the creation site, fill in the domain name that has been resolved to the server. Press the root directory to default. Copy the root directory address. I will use it in the next step. Choose not to create both FTP and database, and choose pure static version. Finally click Submit. As shown in the picture:
- Log in to the site background and click on the menu on the left.
多站点管理
Menu (only the default installed sites have multi-site administration permissions). In the multi-site management interface, click the Add New Site button. In the pop-up window that pops up, fill in the form according to the actual situation. Fill in the site name according to the actual situation to facilitate the distinction between different sites; please fill in a new directory for the site root directory and paste the site root directory copied in the first step, such as:/www/wwwroot/study.ykbh168.com
, the new directory needs to be created on the server in advance; fill in the new URL in the site URL, and this URL needs to be parsed on the server in advance. The administrator account and administrator password are the administrator account passwords of the new site; the database name needs to be a new database. Do not fill in the database of the existing site, otherwise it will cause data overwrite. If the default installation is installed using the root account, you can choose to reuse the database account to avoid filling in the account information. Finally, click the OK button to complete the creation of the new site. As shown in the picture:
- In the pagoda, click Settings in the newly created website operation bar, and in the pop-up interface, select
网站目录
Menu, change the run directory to/public
, click Save. As shown in the picture:
- Pseudo-static settings
- [en] Nginx 伪静态设置
选择
伪静态
Menu, fill in pseudo-static rules and click Save. You can click Save as a template for the next time:
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 pseudo-static configuration
If you use Apache software, pseudostatic rules will be inconsistent. Please leave the pseudo-static column blank, select the reverse proxy, and fill in the target URL.http://127.0.0.1:8001
, as shown in the picture:
This way, the new site is added.
Deploy and install AnQiCMS from the command line
If your server does not have visual environment management software installed, uselnmp.org
The LNMP one-click installation package environment, or a self-compiled server environment, including local Linux desktop versions, such as Ubuntu, CentOS desktop versions, etc., can be deployed using commands. By default, the following operations believe that you have installed the LNMP environment.
Download the Linux version of AnQiCMS installation package from the official website and extract the installation package to the specified location. Assume that decompression
/www/wwwroot/anqicms.com
Table of contents.Add startup task plan:
crontab -e
In the editing interface that opens, add a command
*/1 * * * * /www/wwwroot/anqicms.com/start.sh
# ws 保存并退出。
Note here that if you manually modify the anqicms executable file name, you need to manually open start.sh editing and change the anqicms inside to the corresponding new file name.
After adding the scheduled task, execute it again:
./start.sh
- Configure Nginx site
Generally speaking, you also need to configure nginx proxy to use port 80 or https port. The following is an example of the configuration of the site and directory as /www/wwwroot/anqicms.com and the domain name dev.anqicms.com:
We need to configure the website's running directory, that is, the root directory of nginx to the public directory under the site directory.
And set 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;
}
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;
}
The nginx settings are completed, restart nginx to make the configuration take effect.
- Multi-site configuration
Just repeat the third step above. The only two places that need to be changed are server_name and root. Fill in the new domain name for server_name and the new site root directory for root. Added the Nginx site, and then go to the AnQiCMS backend multi-site management to add the corresponding site.
Upgrade from AnQiCMS 2.x to 3.x
Since the AnQiCMS 2.x version of the server installation and deployment tutorial is relatively complicated, it is easy to cause some problems, and ordinary users cannot troubleshoot and solve them themselves. Moreover, the 2.x version does not support the background restart function, it is recommended to upgrade to the 3.x version here. The upgrade method is as follows:
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 scheduled task.If the background version is not updated to the new version after a restart attempt, you can use the common troubleshooting methods at the end.
First stop the project with the task plan, then delete the task plan.
according toDeployment above Baota Panel 7.9.3 versionMethod starts adding 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, website access can be restored.Will not enter the initialization step.
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, followInstall multiple websites on a single server
The above method can combine multiple sites into deployment management using one AnQiCMS. The above changes will not affect actual use.
Testing with AnQiCMS on Windows
On Windows, you can test using AnQiCMS and do local development and debugging. On Windows, it is also recommended to install the Baota Software management environment, or install the phpStudy software development environment.
Download the installation package for the Windows version from the official website, and it can be placed 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.If you need to run multiple sites locally, you need to coordinate with Baota software or Xiao Pi (phpStudy) software, add multiple sites through the website menu of its management interface, and add rewrite rules in the pseudo-static rules.Pseudo-static settingsAdd the setting method in. The local test domain name, needs to be written tohosts
.
How to Stop or Turn Off AnQiCMS on Windows
To close AnQiCMS on Windows, you need to use the Windows Task Manager built-in to Windows.
Press the Win key + R, open the Run window, and entertaskmgr
Open Task Manager, or right-click on the taskbar, select Task Manager. In Task Manager, findanqicms.exe
Then click the End Task button, and end it.
Testing with AnQiCMS on MacOS
AnQiCMS can be tested on MacOS and used for local development and debugging. On MacOS, you need to install MySQL and Nginx environments first.
Download the MacOS installation package from the official website, extract it to any directory, double-click the anqicms file in the directory to test its use. For testing multiple sites, you can follow the method.Deploy and install AnQiCMS from the command lineMethod to be performed, the domain name needs to be written first./etc/hosts
.
Common errors during installation
- Port is occupied.
When repeatedly installing on the server or installing multiple anqicms, there may be situations where the port is occupied.If set but the website cannot be accessed, 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, throughkill -9 {PID}
to end it.
kill -9 7621
- The pseudo-static rule setting is incorrect.