Install the LAMP environment and Discuz in CentOS! Forum process record

Source: Internet
Author: User
1, yum-yinstallhttpd-devel. * yum-yinstallmysql-devel. I * mysql-server. I * yum-yinstallphp-devel. I * php-mysql. * (you can change the yum source to the mounted cd. step # cd/etc/yum. repos. d/# mvCentOS-Base. 1, yum-y install httpd-devel. *

Yum-y installMysql-Devel. I *Mysql-Server. I *

Yum-y install php-devel. I * php-mysql .*

(You can change the yum source to the mounted disc. steps:

# Cd/etc/yum. repos. d/

# Mv CentOS-Base.repo CentOS-Base.repo.back

# Vim CentOS-Media.repo.

Baseurl = file: // mnt

Gpgcheck = 1

Enabled = 1

Do not change others. save and exit wq.

# Mount/dev/cdrom/mnt

Here, the yum source is loaded in the OS disk)

2. you can test index. php after installation.

1) vi/etc/httpd/conf/httpd. conf

Change DirectoryIndex to index. php.

2) # cd/var/www/html (because apache uses this directory by default)

# Vim index. php

Phpinfo ()

?>

: Wq save and exit

############# At this time, the http://x.x.x.x is the php test page.

3. create a mysql root user and a database

1) # mysqladmin-u root password xxxxxx (if an error is reported here, do not restart the mysql service)

2) log in,

# Mysql-u root-p

Enter yourpassword: xxxxxx

> Create databaseDiscuz; (InstallationDiscuzTime needed)

> Bye

4. download discuz!

. 1) # cd/usr/src

# Wget wgethttp: // download2.comsenz.com/DiscuzX/1.5/Discuz_X1.5_ SC _UTF8.zip

2) decompress

# Unzip Discuz_X1.5_ SC _UTF8.zip

3) installation

# Cd/var/www/html

# Cp-r/usr/src/readmereadme

# Cp-r/usr/src/uploadupload

# Cp-r/usr/src/utilityutilty

(Copy the three directories)

5. use port 80 for installation.

1) change the root directory of the website

Vim/etc/httpd/conf/httpd. conf

Change/www/html of DocumentRoot to/www/html/upload

: Wq save and exit

Service httpdrestart

2) client browser (character interface) or local (with graphical interface) login to the http://x.x.x.x

Then, discuz prompts the installation step by step.

OK.

Go to bed haha ~~~~~~~~~~~~~

By Mr, Xiaoan

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.