Article directory
-
-
-
- foreword
- 1. Install the basic environment
- 2. One-click deployment of Discuz
- 3. Install the cpolar tool
- 4. Configure domain name to access Discuz
- 5. Fixed domain name public network address
- 6. Configure the Discuz forum
-
-
Foreword
Crossday Discuz! Board (hereinafter referred to as Discuz!) is a general-purpose community forum software system. Users can build a fully functional and powerful load forum on the Internet through simple settings and installations without any programming. Capable and highly customizable forum services.
Next, we use the pagoda panel + Discuz + cpolar intranet penetration tools on Linux to build a set of forum services published to the Internet environment, without the need for a public network IP server or router.
1. Install the basic environment
Install the PHP version, because Discuz supports the highest PHP7.4 version environment, we install PHP7.0 version in the panel, search for PHP, you can see it, and then click Install
Install a database, if it is already installed, you can skip it, click the database on the panel, click Install
Then modify the database password and change it to a password that you can remember. The user name is root
2. One-click deployment of Discuz
Search for the keyword Discuz in the panel, and then click one-click deployment
Set parameters, domain name set the local domain name 127.0.0.1, the port number can be customized, then set the database account password, database user name and password set by yourself, click submit, and then wait for the download to complete
Then we click on the website in the panel to see the site we just deployed,
Next open a port in the panel: 8089
Open the browser, use the Linux LAN ip + :8090 (the port number set above) to access, and the installation wizard interface will appear to indicate success
3. Install the cpolar tool
cpolar official website: https://www.cpolar.com/
Open the pagoda terminal command window and use cpolar to install the script:
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
token authentication
Log in to the cpolar official website, click Verify
on the left to view your authentication token, and then paste the token in the command line
cpolar authtoken xxxxxxx
Add a service to the system
sudo systemctl enable cpolar
Start the cpolar service
sudo systemctl start cpolar
Select security in the pagoda panel. Then open port 9200
Then the data Linux LAN ip +: 9200 port will appear cpolar management interface
Enter the account registered on the official website to log in to operate the tunnel.
4. Configure domain name to access Discuz
We create a random 8089 tunnel in the cpolar management interface:
- Tunnel name: customizable, be careful not to repeat
- protocol: http
- Local address: 8089
- Port type: random domain name
- Region: China VIP
click create
Then open the online tunnel list, view the public address of the created tunnel, and copy the address
Open the browser and use the above public network address to visit. Since the welcome page appears, it means success
5. Fixed domain name public network address
You need to upgrade to the basic package or above to support the configuration of fixed domain names
Log in to the background of the cpolar official website, click Reserved
on the left dashboard, find Reserve the second-level subdomain name
, and reserve a second-level subdomain name for the http tunnel.
- Region: select server region
- Name: Fill in the second-level subdomain name you want to reserve (customizable)
- Description: Remarks, which can be customized
In this example, a second-level subdomain named DiscuzTest
is reserved. After the subdomain name is successfully reserved, we copy the subdomain name, and then we need to bind its configuration to the tunnel.
Log in to the cpolar web ui management interface. Click Tunnel Management
on the left dashboard–Tunnel List
, find the tunnel that needs to be configured with a second-level subdomain name (in this case, the Discuz tunnel), and click < on the right code>Edit
Modify the tunnel information and configure the second-level subdomain name into the tunnel:
- Domain name type: choose
secondary subdomain name
instead - Sub Domain: Fill in the second-level subdomain we just reserved (in this case
typechoTest
)
After modification, click Update
After the tunnel is successfully updated, click Status
on the left dashboard–Online Tunnel List
, and you can see that the public network address of the DiscuzTest tunnel has been updated to a second-level subdomain , copy the public network address.
Open the browser, let’s test the access to the successfully configured second-level sub-domain name, the installation wizard interface appears to indicate success, and can be accessed normally. Now, our only private second-level subdomain name in the entire network has been created.
6. Configure Discuz Forum
After clicking I agree, a prompt message appears saying that the version is too old, cancel to continue the installation
click next
Choose clean install
Then you need to configure the database, we fill in the database root user name and root password, then set the administrator password, click Next
Then the installation is complete, click to visit
Then we have built the Discuz forum, and combined with the public network domain name address mapped by cpolar, it can be accessed remotely without being restricted by the local area network
Then the installation is complete, click to visit
Then we have built the Discuz forum, and combined with the public network domain name address mapped by cpolar, it can be accessed remotely without being restricted by the local area network