Home Website Building Knowledge Standard Post

Standard Post

Domestic Forum Program Discuz! Q Beta Version Application and Installation Tutorial

Discuz is believed to be a very familiar forum source code for older personal webmasters in China, along with phpwind. In the early years, when policies were not so strict, forums were very popular, and Naiba believes Discuz is the best forum program. However, after Tencent acquired it and due to policy impacts, it was essentially abandoned. Some time ago, Wu Hongsheng (Naizhao) announced the return of Discuz on the official forum, and a new version Discuz!Q will be developed, mainly to help traffic influencers, internet celebrities, knowledge payment, WeChat ecosystem, and mobile internet entrepreneurs to more easily achieve user retention and payment conversion.

Posted on March 16, 2020 About 12 minutes read
国产论坛程序Discuz! Q内测版申请和安装教程

Discuz is believed to be a very familiar forum source code for older personal webmasters in China, along with phpwind. In the early years, when policies were not so strict, forums were very popular, and Naiba believes Discuz is the best forum program. However, after Tencent acquired it and due to policy impacts, it was essentially abandoned.

Some time ago, Wu Hongsheng (Naizhao) announced the return of Discuz on the official forum, and a new version Discuz!Q will be developed, mainly to help traffic influencers, internet celebrities, knowledge payment, WeChat ecosystem, and mobile internet entrepreneurs to more easily achieve user retention and payment conversion.

Discuz! Q is a lighter, easier to monetize, more mobile-friendly, more open, and easier to secondary development community product.

Currently, the Discuz! Q beta version is open for application and experience. Interested webmasters can give it a try.

Prerequisites:

  1. Have a real-name verified domain at DNSPod; domains from other registrars are currently not supported for application.
  2. A clean server (actually, adding a separate virtual host should also work, but Naiba hasn't tested it).
  3. In the API Key Management section of the Tencent Cloud account center, obtain the SecretId and SecretKey. Note: Please never leak these two items to anyone you do not trust, to avoid your Tencent Cloud account being compromised and suffering losses.
  4. It is recommended to enable SSL security certificates.

Apply for beta access:https://www.dnspod.cn/promo/discuzq

Installation Process

1. Install the server environment

The official recommendation is to install the LNMP one-click package (many webmasters from that era used this, since Baota Panel wasn't available yet). Of course, installing Baota Panel should also work.

The specific tutorial is not repeated here. Refer to the link below:

  1. #Website Building# LNMP One-Click Package Installation Illustrated Tutorial
  2. Beginner-Friendly Baota Panel Illustrated Installation Tutorial for Building Your Own Website

During installation, pay attention to selecting the following items:

  • MariaDB 10.3.15
  • PHP 7.3.6
  • Jemalloc
  • Memcached
  • Redis
  • imageMagick

For the LNMP one-click package, after installation, delete the disabled functions. The code is as follows:

sed -i 's/^disable_functions.*/disable_functions = /' /usr/local/php/etc/php.ini

2. Clone Discuz!Q Installation Code

Because the code of Discuz!Q is still a beta version and does not have a complete installation package, the code directory is not very standardized, so we need to manually create directories first.

First, create a folder on the server. Example code: (Baota Panel can create it directly)

mkdir -p /var/hosts/com/naizhao
cd /var/hosts/com/naizhao

The above code creates a folder named naizhao, then switches to the naizhao folder.

Then modify the composer source to Tencent Cloud (the official composer source is abroad and slow).

composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/

Start cloning the code into the folder.

composer create-project --prefer-dist qcloud/discuz --repository=https://cloud.discuz.chat q

During the code cloning process, you will be prompted to enter the API key for Tencent Cloud.

If everything goes smoothly, the code has been fully cloned into the q directory. We can go in and take a look.

cd q
ls -lha

You should see the following content.

total 388K
drwxr-xr-x 11 root root 4.0K Mar 16 18:23 .
drwxr-xr-x  3 root root 4.0K Mar 16 18:21 ..
drwxr-xr-x 28 root root 4.0K Mar 16 18:21 app
-rw-rw-rw-  1 root root  917 Mar 15 19:57 composer.json
-rw-r--r--  1 root root 319K Mar 16 18:23 composer.lock
drwxr-xr-x  2 root root 4.0K Mar 16 18:21 config
drwxr-xr-x  4 root root 4.0K Mar 16 18:21 database
-rw-rw-rw-  1 root root  362 Mar 15 19:57 disco
-rw-rw-rw-  1 root root  213 Mar 15 19:57 .editorconfig
drwxr-xr-x  4 root root 4.0K Mar 16 18:21 .github
-rw-rw-rw-  1 root root  108 Mar 15 19:57 .gitignore
-rw-rw-rw-  1 root root 1.4K Mar 15 19:57 .php_cs
drwxr-xr-x  5 root root 4.0K Mar 16 18:21 public
-rw-rw-rw-  1 root root 2.3K Mar 15 19:57 readme.md
drwxr-xr-x  7 root root 4.0K Mar 16 18:21 resources
drwxr-xr-x  2 root root 4.0K Mar 16 18:21 routes
drwxr-xr-x 11 root root 4.0K Mar 16 18:21 storage
drwxr-xr-x 56 root root 4.0K Mar 16 18:23 vendor

Finally, modify the directory permissions for 'storage' and 'config' to 777.

chmod -R 777 storage config

4. Add Virtual Host

For LNMP, the code used to add a virtual host is as follows. For Baota Panel, please configure accordingly.

Please enter domain(example: www.lnmp.org): 让你输入要绑定的域名
 Your domain: 你绑定的域名
Enter more domain name(example: lnmp.org *.lnmp.org): 
Please enter the directory for the domain: 为你绑定的域名设置路径
Default directory: /home/wwwroot/q.naizhao.com: /var/hosts/com/naizhao/q/public #输入网站的根目录,记得后面要加上public
Virtual Host Directory: /var/hosts/com/naizhao/q/public
Allow Rewrite rule? (y/n) y
Please enter the rewrite of programme, 
wordpress,discuzx,typecho,thinkphp,laravel,codeigniter,yii2 rewrite was exist.
(Default rewrite: other): laravel #rewrite规则选择laravel
You choose rewrite: laravel
Enable PHP Pathinfo? (y/n) y
Enable pathinfo.
Allow access log? (y/n) y
Enter access log filename(Default:q.naizhao.com.log): 
You access log filename: q.naizhao.com.log
Create database and MySQL user with same name (y/n) y #创建MySQL数据库
Enter current root password of Database (Password will not shown): #输入MySQL的root密码
OK, MySQL root password correct.
Enter database name: dzq #输入要创建的数据库名字
Your will create a database and MySQL user with same name: dzq
Please enter password for mysql user dzq: dzq #输入数据库密码
Your password: dzq 
Add SSL Certificate (y/n) y #是否打开SSL支持
1: Use your own SSL Certificate and Key
2: Use Let's Encrypt to create SSL Certificate and Key
Enter 1 or 2: 2 #SSL证书安装方式,如果前面在腾讯云申请了,选1。或者选2用Let's Encrypt提供的免费3个月证书。但一定要提前把域名指向你的服务器,否则申请不成功!!!
It will be processed automatically.
Then wait about half a minute, and both the website and database will be created.
Next, remove the open_basedir restriction, otherwise it will cause a 500 error. Run lnmp1.6/tools/remove_open_basedir_restriction.sh, enter the website root directory /var/hosts/com/naizhao/q/public, and press Enter.
Edit the nginx configuration file. In the directory /usr/local/nginx/conf/vhost/, find the corresponding file, such as q.naizhao.com.conf, and replace the entire file with the following content (do not directly paste, pay attention to modifying some corresponding parameters).
server {
listen 80;
server_name 你前面绑定的域名; #网站域名
return 301 https://$host$request_uri; # 强制把HTTP跳转到HTTPS
}


server {
listen 443 ssl http2;
server_name 你绑定的域名; #网站域名
root /var/hosts/com/naizhao/q/public; #网站目录,切记指到public


ssl_certificate /usr/local/nginx/conf/ssl/你绑定的域名/fullchain.cer; #ssl证书的证书链
ssl_certificate_key /usr/local/nginx/conf/ssl/你绑定的域名/你绑定的域名.key; #ssl证书的key


ssl_session_cache shared:SSL:10m;
ssl_session_timeout 24h;


ssl_prefer_server_ciphers on;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ecdh_curve secp521r1:secp384r1;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;
ssl_buffer_size 4k;


add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;


index index.html;


include enable-php-pathinfo.conf;


location /install {
try_files $uri $uri/ /index.php?$query_string;
}


location /api {
try_files $uri $uri/ /index.php?$query_string;
}


location / {
try_files $uri $uri/ /index.html;
}


location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }


error_page 404 /index.php;
}

After completing, restart LNMP.

lnmp restart

5. Install Discuz! Q

Open a browser and visit:

https://your-domain/install

Follow the prompts above, enter MySQL information and admin information, and click Install.

After installation, go to:

https://your-bound-domain/admin, you can manage the site.

Note: If the loading icon keeps appearing after installation, open the browser's developer mode - Application - Storage - Local Storage, right-click Clear, then refresh the browser.

2/5 - (12 votes)
Previous Tutorial for Activating Premium Theme Keys Purchased from Themeforest Continue reading content around the same timeline. Next NameSilo Registered Domain Refund Application Tutorial View the next related tutorial or experience.

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: