LAMP Four Discuz Forum Construction (example)

Source: Internet
Author: User
Tags hosting fully qualified domain name

Create a root directory that holds dizcuz

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

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

[Email protected] www]# wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip

[Email protected] www]# Unzip Discuz_x3.2_sc_gbk.zip

Generate three directories after extracting

[[email protected] www]# ls

Discuz_x3.2_sc_gbk.zip Readme Upload Utility

But the program directory is under upload, so the upload files are all moved out

[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

Delete all files in directory

[Email protected] www]# RM-RF readme/utility/upload/discuz_x3.2_sc_gbk.zip


The configuration file for the virtual machine is

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


Turn on the virtual host switch

#Include conf/extra/httpd-vhosts.conf (Remove the previous #)

After opening the virtual host, enter the configuration file

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

See the following configuration file. Delete the bottom-most example.

# use name-based virtual hosting.

#

Namevirtualhost *:80


#

# VirtualHost Example:

# Almost any Apache directive could go into a VirtualHost container.

# The first VirtualHost section was used for all requests and that does not

# match a ServerName or Serveralias in any <VirtualHost> block.

#

<virtualhost *:80>

ServerAdmin [email protected] #管理员的邮箱

DocumentRoot "/usr/local/apache2/docs/dummy-host.example.com #创建的/data/www directory"

ServerName dummy-host.example.com #可以自已写

Serveralias www.dummy-host.example.com # site Aliases

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

Customlog "Logs/dummy-host.example.com-access_log" Common # Access log

</VirtualHost>


<virtualhost *:80>

ServerAdmin [email protected]

DocumentRoot "/usr/local/apache2/docs/dummy-host2.example.com"

ServerName dummy-host2.example.com

Errorlog "Logs/dummy-host2.example.com-error_log"

Customlog "Logs/dummy-host2.example.com-access_log" common

</VirtualHost>


Configure the virtual host. Delete the following example. Configured as follows

# use name-based virtual hosting.

#

Namevirtualhost *:80


#

# VirtualHost Example:

# Almost any Apache directive could go into a VirtualHost container.

# The first VirtualHost section was used for all requests and that does not

# match a ServerName or Serveralias in any <VirtualHost> block.

#

<virtualhost *:80>

documentroot "/data/www"

ServerName www.test.com

Serveralias www.aaa.com

# errorlog "Logs/dummy-host.example.com-error_log" #注释掉

# customlog "Logs/dummy-host.example.com-access_log" Common #注释掉

</VirtualHost>


After configuration is complete, the detection configuration has no errors

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

Httpd:apr_sockaddr_info_get () failed for Obird

Httpd:could not reliably determine the server ' s fully qualified domain name, using 127.0.0.1 for ServerName

Syntax OK

The error here is because there is no definition of ServerName

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

Edit Profile Definition ServerName

#ServerName www.example.com:80 Remove the previous #.

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

Syntax OK

Re-testing will not be an error.


The Discuz is now accessible and you need to configure the hosts before accessing

Write in the local host C:\WINDOWS\SYSTEM32\DRIVERS\ETC directory

192.168.31.xxx www.test.com

At this point, the Web page is accessed and cannot be accessed because port 80 is not yet started. cannot be accessed after startup

Discovery is a problem with the configuration file

[Email protected] www]# cat/etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

#192.168.1.1 www.qq.com

192.168.31.170 www.test.com #在 write in/etc/hosts file

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

<directory/>

Options FollowSymLinks

AllowOverride None

Order Deny,allow

Allow from all # joins this line, allowing all access

# Deny from all #注释或是删除此行

Here are some questions you should look for in another blog post

###########################################################################################

Enter the IP address in IE to access, there will be a Discuz installation interface.

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/88/12/wKiom1fo2Gbi3JG7AAIXpC6CJ_Q431.jpg-wh_500x0-wm_3 -wmp_4-s_246299501.jpg "style=" Float:none; "title=" dis1.jpg "alt=" Wkiom1fo2gbi3jg7aaixpc6cj_q431.jpg-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/88/12/wKiom1fo2Gex9HggAADlE119c8M453.jpg-wh_500x0-wm_3 -wmp_4-s_105606881.jpg "style=" Float:none; "title=" dis2.jpg "alt=" Wkiom1fo2gex9hggaadle119c8m453.jpg-wh_50 "/>

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/88/0F/wKioL1fo2GvjDeUyAAD7M-BYL8E984.jpg-wh_500x0-wm_3 -wmp_4-s_2599038724.jpg "style=" Float:none; "title=" dis3.jpg "alt=" Wkiol1fo2gvjdeuyaad7m-byl8e984.jpg-wh_50 "/>

Resolve errors that are not writable by the directory

First, we want to see which httpd process is running as the user.

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/88/0F/wKioL1fo2aKRfXlCAAHWzK3vQRE503.jpg-wh_500x0-wm_3 -wmp_4-s_309015698.jpg "title=" daemon.jpg "alt=" Wkiol1fo2akrfxlcaahwzk3vqre503.jpg-wh_50 "/>

HTTPD is currently running as a daemon user

[Email protected] www]# ls-l

Total 116

-rw-r--r--1 root root 2739 may 11:08 admin.php

Drwxr-xr-x root root 4096 11:08 API

-rw-r--r--1 root root 727 may 11:08 api.php

Drwxr-xr-x 2 root root 4096 may 11:08 archiver

Drwxr-xr-x 2 root root 4096 11:08 Config

-rw-r--r--1 root root 922 may 11:08 connect.php

-rw-r--r--1 root root 253 may 11:08 cp.php

-rw-r--r--1 root root 106 may 11:08 Crossdomain.xml

Drwxr-xr-x root root 4096 may 11:08 data

-rw-r--r--1 root Root 5558 may 11:08 Favicon.ico

-rw-r--r--1 root root 2242 may 11:08 forum.php

-rw-r--r--1 root root 821 may 11:08 group.php

-rw-r--r--1 root root 1290 may 11:08 home.php

-rw-r--r--1 root root 5669 may 11:08 index.php

Drwxr-xr-x 5 root root 4096 11:08 Install

-rw-r--r--1 root root 1025 may 11:08 member.php

-rw-r--r--1 root root 2462 may 11:08 misc.php

-rw-r--r--1 root root 1757 may 11:08 plugin.php

Set writable directory permissions before refreshing the installation interface

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


650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/88/12/wKiom1fo2s-DEy_1AADk0ltfWa8645.jpg-wh_500x0-wm_3 -wmp_4-s_1750804865.jpg "title=" dis4.jpg "alt=" Wkiom1fo2s-dey_1aadk0ltfwa8645.jpg-wh_50 "/>


Next, select the new Installation

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/88/0F/wKioL1fo21ziM8djAADIALmTmsY653.jpg-wh_500x0-wm_3 -wmp_4-s_2097826504.jpg "title=" dis5.jpg "alt=" Wkiol1fo21zim8djaadialmtmsy653.jpg-wh_50 "/>

The next step is MySQL-related data

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/88/12/wKiom1fo2-_xFmBdAADkGtWOKzY658.jpg-wh_500x0-wm_3 -wmp_4-s_2837253477.jpg "title=" dis6.jpg "alt=" Wkiom1fo2-_xfmbdaadkgtwokzy658.jpg-wh_50 "/>


The next step is to set up MySQL, each time we use our own installed Myqls

You need to enter/usr/local/mysql/bin/mysql instead of directly entering MySQL,

Then we need to change PATH

[[email protected] www]# which MySQL (MySQL is not/usr/local/mysql/bin/mysql, note distinction)

/usr/bin/mysql (the system comes with MySQL)

Use the following command to find the MySQL that comes with your system, and then uninstall. Because the landlord has been uninstalled, so there is no.

[Email protected] www]# Rpm-qf/usr/local/mysql

File/usr/local/mysql is isn't owned by any package


Write a path.sh script

[Email protected] www]# vim/etc/profile.d/path.sh

#!/bin/bash

Export path= $PATH:/usr/local/mysql/bin


[Email protected] www]# source/etc/profile.d/path.sh


Then you can use it.

First create a library

[[email protected] ~]# MySQL

Welcome to the MySQL Monitor. Commands End With; or \g.

Your MySQL Connection ID is 6

Server Version:5.1.73-log Source Distribution


Copyright (c) and/or, Oracle, its affiliates. All rights reserved.


Oracle is a registered trademark of the Oracle Corporation and/or its

Affiliates. Other names trademarks of their respective

Owners.


Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.


mysql> CREATE DATABASE Discuz;

Query OK, 1 row Affected (0.00 sec)

Mysql> Grant all on discuz.* to ' aming ' @ ' localhost ' identified by ' Aminglinux ';

Query OK, 0 rows Affected (0.00 sec


All is the permission. Discuz.* represents all the tables in the Discuz. Identified by ' aminglinux '; this is the password.

Database information: localhost, discuz, aming, Aminglinux, the remaining mo.

Administrator Information: admin/ps:123456

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/14/wKiom1fo7JCAKCfMAAESCj_jNMM128.jpg-wh_500x0-wm_3 -wmp_4-s_2189049424.jpg "title=" dis7.jpg "alt=" Wkiom1fo7jcakcfmaaescj_jnmm128.jpg-wh_50 "/>

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/88/14/wKiom1fo7TiQ1gkWAAECsIdq5v0191.jpg-wh_500x0-wm_3 -wmp_4-s_2597725702.jpg "title=" dis8.jpg "alt=" Wkiom1fo7tiq1gkwaaecsidq5v0191.jpg-wh_50 "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/88/14/wKiom1fo7aSAxV7HAAH_2OYXTl4915.jpg "title=" Dis9.jpg "alt=" Wkiom1fo7asaxv7haah_2oyxtl4915.jpg "/>


This Discuz installation is complete.

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/10/wKioL1fo7iPyyTtvAAJ6gltUY-s949.jpg-wh_500x0-wm_3 -wmp_4-s_1370591093.jpg "title=" dis10.jpg "alt=" Wkiol1fo7ipyyttvaaj6gltuy-s949.jpg-wh_50 "/>



This article is from the "Cbo#boy_linux Road" blog, make sure to keep this source http://20151213start.blog.51cto.com/9472657/1856791

LAMP Four Discuz Forum Construction (example)

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.