Build Discuz forum based on ubuntu

Prepare the LAMP environment

LAMP is the abbreviation of Linux, Apache, MySQL and PHP. It is the basic operating environment on which the Discuz forum system depends. Let's prepare the LAMP environment first:

Install Apache2

ubuntu needs to install Apache2, use apt-get to install Apache2:

sudo apt-get install apache2 -y

After installation, you can view the apache interface by visiting the laboratory IP address http://123.207.9.240, indicating that apache2 is successfully installed.

Install PHP components

There is php7.0 in apt-get, so we can install php7.0 directly:

sudo apt-get install php7.0 -y

Install php related components:

sudo apt-get install libapache2-mod-php7.0

Restart the Apache service:

sudo /etc/init.d/apache2 restart

Install PHP components

There is php7.0 in apt-get, so we can install php7.0 directly:

sudo apt-get install php7.0 -y

Install php related components:

sudo apt-get install libapache2-mod-php7.0

Restart the Apache service:

sudo /etc/init.d/apache2 restart

Install PHP components

There is php7.0 in apt-get, so we can install php7.0 directly:

sudo apt-get install php7.0 -y

Install php related components:

sudo apt-get install libapache2-mod-php7.0

Restart the Apache service:

sudo /etc/init.d/apache2 restart

Install MySQL service

Install the MySQL service. During the MySQL installation, the console will prompt you to enter the MySQL password. You need to enter the password twice and remember the password you entered, which will be used in subsequent installation steps.

sudo apt-get install mysql-server -y

Note that the password needs to be entered twice

Install php MySQL related components:

sudo apt-get install php7.0-mysql

Restart MySQL service

sudo service mysql restart

Install phpmyadmin

Use apt-get to install phpmyadmin. During the installation process, you need to select apache2 as prompted, and then enter the database name and phpmyadmin password as prompted.

sudo apt-get install phpmyadmin -y

Follow the prompts

Set the database name and phpmyadmin password

Install and configure Discuz

Install Discuz

We need to download a Discuz compressed package:

wget 'http://download.comsenz.com/DiscuzX/3.3/Discuz_X3.3_SC_UTF8.zip'

In order to unzip the compressed package, you need to install an unzip:

sudo apt-get install unzip

After the download is complete, unzip the compressed package

sudo unzip Discuz_X3.3_SC_UTF8.zip

After unzipping, you can see the source code of discuz in the upload folder

Configure Discuz

Since PHP accesses the /var/www/html/ folder by default, we need to copy all the files in the upload folder to the /var/www/html/ folder

sudo mv upload/* /var/www/html/

Change the directory to the folder accessed by php,

cd /var/www/html/

Modify the directory permissions of config, data, uc_server/data/, uc_client/data/cache:

sudo chmod -R 777 config/ data/ uc_server/data/ uc_client/data/cache/

Specify apache to index.html

sudo mv /var/www/html/index.html /var/www/html/index~.html

Restart the Apache service:

sudo /etc/init.d/apache2 restart

Prepare domain name and certificate

Domain Registration

If you don’t have a domain name yet, you can buy one on Tencent Cloud. You can refer to the video below for the process.

https://v.qq.com/x/page/p05077pwelw.html

Domain Name Resolution

After the domain name is purchased, the domain name needs to be resolved to the experimental cloud host. The IP of the experimental cloud host is:

123.207.9.240

For domain names purchased on Tencent Cloud, you can add resolution records to the console. For the process, please refer to the following video:

https://v.qq.com/x/page/t0507ps9kxo.html

It takes some time for the domain name settings to take effect after being resolved. Use the ping command to check whether the domain name is valid

,Such as:

ping www.yourdomain.com

If the information returned by the ping command contains the resolved IP address you set, the resolution is successful.

This experiment is taken from the Tencent Cloud Lab and is done manually according to the contents of the lab

Nowadays, some sources may have expiration issues, which can be added in the cloud + Q&A

Recommended Posts

Build Discuz forum based on ubuntu
Build Discuz Forum based on CentOS
Cloud server builds Discuz forum based on CentOS
Build Nginx-RTMP live server on ubuntu
Build Elasticsearch 6.2.4 (centos) based on docker
Build a file server on ubuntu
Build WeChat applet service based on CentOS
Build WeChat applet service based on CentOS
Build a LAMP development environment on Ubuntu 16.04
How to build nfs service on ubuntu16.04
WordPress-Build a personal blog based on Ubuntu 16.04
Steps to build LNMP environment on ubuntu 20.04
Build arm virtual operating environment on Ubuntu
lamp on ubuntu
Ubuntu build etcd
Ubuntu build Seafile
Linux Mint 19 will be based on Ubuntu 18.04 LTS
Build Discuz Forum in LNMP Environment under CentOS7
How to use Jenkins to build automatically on Ubuntu
Install Leanote on Ubuntu18 to build cloud notes
install vscode on ubuntu18
Build k8s1.9.9 on centos7
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install docker on Ubuntu
Install OS X 10.15 virtual machine based on Ubuntu platform
Install nodejs10 on Ubuntu16
Install mysql on Ubuntu 14.04
Install Pytorch+CUDA on Ubuntu 16.04
Install Python3 on Ubuntu 14.04
How to configure a fixed IP based on Ubuntu 18.04
Jenkins build on centos
Install rJava on Ubuntu18
Install JDK10+ on Ubuntu
Install Python3 on Ubuntu 16.04
ROS learning---Install ROS on Ubuntu
Install KDE on Ubuntu16.04.2
Install Docker on Ubuntu18
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
How to set a fixed IP based on Ubuntu 16.04
Teach you how to build a Git server on Ubuntu
How to build an NFS file sharing server on Ubuntu 16.04
Docker practice (1): install Docker on Ubuntu 16.04
Github Project-OpenPose installation on Ubuntu
[Linux] Build Samba server (ubuntu16.04)
Install ubuntu on virtual machine
ubuntu16.04 build vim and pyt
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Install QQ robot on Ubuntu 16.04
ubuntu 16.04 build pptpd V** server
Install Python 3.7 on Ubuntu 18.04 LTS
Upgrade Ubuntu 18.04 on Azure to 18.10
Build MariaDB replication on CentOS
Install Android Studio on Ubuntu
Configure tomcat on ubuntu server
Install scrapy framework on ubuntu
Build Ubuntu 12.04 cross compilation server
Install Mysql offline on Ubuntu
Install Oracle Java8 on Ubuntu
ubuntu1804 build the latest Suricata