Build discuz! Forum under CentOS

Source: Internet
Author: User


Earlier in the previous article on how to build lamp http://1015489314.blog.51cto.com/8637744/1688019

After building the lamp can parse the page normally, then we now to build a discuz! forum.


1. Create a new directory to store Web pages, etc.

[Email protected] ~]# mkdir/data/www

[Email protected] www]# wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip Download the latest version of discuz!
[[email protected] www]# Unzip Discuz_x3.2_sc_gbk.zip//Unzip
[[email protected] www]# ls
Discuz_x3.2_sc_gbk.zip Readme Upload Utility

2, the program files will be placed under the upload, so all moved to the WWW directory, and delete the redundant files.

[Email protected] www]# mv upload/*.
[[email protected] www]# ls
admin.php connect.php Favicon.ico Install Readme Template Utility
API cp.php forum.php member.php robots.txt uc_client
api.php crossdomain.xml group.php misc.php search.php uc_server
Archiver data home.php plugin.php source upload
Config discuz_x3.2_sc_gbk.zip index.php portal.php static userapp.php
[Email protected] www]# RM-RF readme/utility/upload/discuz_x3.2_sc_gbk.zip

3. Configure a virtual host

[Email protected] www]# vim/usr/local/apache2/conf/httpd.conf

#Include conf/extra/httpd-vhosts.conf//Open this virtual host configuration file as follows

Include conf/extra/httpd-vhosts.conf

[Root[email protected] www]# vim/usr/local/apache2/conf/extra/httpd-vhosts.conf//Edit the virtual host profile, at the end we can see two cases, delete one, Then modify the other to:

<virtualhost *:80>

# ServerAdmin [email protected]//admin mailbox, we can remove

DocumentRoot "/data/www"//Change to the previously created directory

ServerName www.tpp.com//Set domain name

Serveralias www.ppt.com//can set up multiple domain names

# errorlog "Logs/dummy-host.example.com-error_log"//error log

# customlog "Logs/dummy-host.example.com-access_log" common//Access log

</VirtualHost>

Then open port 80.

[Email protected] www]# vim/usr/local/apache2/conf/httpd.conf

<directory/>

Options FollowSymLinks

AllowOverride None

Order Deny,allow

Deny from all

</Directory>

Switch

<directory/>

Options FollowSymLinks

AllowOverride None

Order Deny,allow

allow from all

</Directory>


Save exit, detect the configuration is correct, and restart

[Email protected] www]#/usr/local/apache2/bin/apachectl-t

Syntax OK

[Email protected] www]#/usr/local/apache2/bin/apachectl restart

4. Configuring the Hosts File

Locate the Hosts file under native C:\Windows\System32\drivers\etc, and add the following:

192.168.0.104 www.tpp.com www.ppt.com

Save exit.

5, we enter the URL on the browser www.tpp.com this is going to jump to discuz! Installation interface.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/5D/wKiom1XhuJewsMjyAARxsVt_G-M767.jpg "title=" 1.png " alt= "Wkiom1xhujewsmjyaarxsvt_g-m767.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/5A/wKioL1XhuuvD3cw5AALVqO2NsZ8971.jpg "title=" 2.png " alt= "Wkiol1xhuuvd3cw5aalvqo2nsz8971.jpg"/>

Agree to install after we see how much more is not writable, this is we have to give them permission

First look at which identity the Apache process runs

[[Email protected] www]# PS aux |grep http

Daemon 4566 0.0 1.0 30140 11028? S 04:42 0:00/usr/local/apache2/bin/httpd-k Start

Daemon 4567 0.0 0.9 28724 9480? S 04:42 0:00

We can see that it's daemon, and we're assigning all the files that don't have permissions to the daemon group.

[Email protected] www]# chown-r daemon config data uc_client/data uc_server/data

After the page has been refreshed, it's all turned green.

The next step is a new installation

6, Next is the configuration database

[Email protected] www]#/usr/local/mysql/bin/mysql

mysql> CREATE DATABASE Discuz; Create a database name

Mysql> Grant all on discuz.* to ' the TPP ' @ ' localhost ' identified by ' tpplinux ';

All permissions, user TPP, password tpplinux

7, then we go back to the original page to fill in the database name: discuz, database user name: TPP, Database password: tpplinux, the other default; Admin admin password 123456, next; after installation, click on "Your forum has been installed in the bottom right corner", tap this access.









Build discuz! Forum under CentOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.