Linux-discuz Installing lamp

Source: Internet
Author: User

1. Download, unzip Discuz

Cd/data/discuz

wget Http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip

Unzip Discuz_x3.2_sc_gbk.zip

Mobile Program Files: MV upload/*.

Delete unwanted directories: RM-RF readme/utility/upload/discuz_x3.2_sc_gbk.zip

2. Configure the virtual host

Vim/usr/local/apache/conf/httpd.conf

# Virtual Hosts
#Include conf/extra/httpd-vhosts.conf

==>

# Virtual Hosts
Include conf/extra/httpd-vhosts.conf

Vim/usr/local/apache/conf/extra/httpd-vhosts.conf

<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache/docs/dummy-host.example.com"
ServerName dummy-host.example.com
Serveralias www.dummy-host.example.com
Errorlog "Logs/dummy-host.example.com-error_log"
Customlog "Logs/dummy-host.example.com-access_log" common
</VirtualHost>

<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache/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>

==>

<virtualhost *:80>
DocumentRoot "/data/discuz"
ServerName www.test.com
Serveralias www.nyan.com
#ErrorLog "Logs/dummy-host.example.com-error_log"
#CustomLog "Logs/dummy-host.example.com-access_log" common
</VirtualHost>

Apachectl-t

3. Visit the local hosts

C:/windows/system32/drivers/etc/hosts

192.168.1.106 www.test.com www.nyan.com

4. Access, install Discuz

Www.test.com

Ls-l/data/discuz

Chown-r Daemon Config data uc_client/data uc_server/data

5. Configure MySQL

Create Database Discuz;

Grant all on discuz.* to ' Nyan ' @ ' localhost ' identified by ' Passw0rd '

6. Configure user authentication

<virtualhost *:80>
DocumentRoot "/data/discuz"
ServerName www.test.com
Serveralias www.nyan.com
# errorlog "Logs/dummy-host.example.com-error_log"
# customlog "Logs/dummy-host.example.com-access_log" common

<Directory/data/discuz/passwd>
AllowOverride authconfig
AuthName "Custom"
AuthType Basic
authuserfile/data/.htpasswd

Require Valid-user
</Directory>
</VirtualHost>

1) AuthName command: Specify the name of the authentication zone. The zone name is displayed to the user in the Prompt for authentication dialog box.
2) AuthType command: Specify the authentication type. In HTTP1.0, there is only one type of authentication: Basic. There are several types of authentication in HTTP1.1, such as: MD5.
3) AuthUserFile command: Specify a text file containing the user name and password, one pair per line.
4) AuthGroupFile Command: Specifies a text file that contains a list of user groups and the members of those groups. The members of the group are separated by spaces, such as:
Managers:user1 User2
5) Require command: Specify which users or groups are authorized to access. Such as:
Require user User1 User2 (accessible only to users User1 and User2)
Requires groups managers (only members in group managers can access)
Require Valid-user (can be accessed by any user in the AuthUserFile specified file)

cd/data/discuz/passwd

Htpasswd-c/data/.htpasswd User1

HTPASSWD/DATA/.HTPASSWD User2

Apachectl Graceful

Linux-discuz Installing lamp

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.