httpd-2.4 in CentOS 7 and httpd-2.2 in CentOS 6 build WordPress blog system and discuz! forum system

Source: Internet
Author: User
Tags wordpress database wordpress blog

Before building WordPress blog system and discuz! forum system, we need to prepare the lamp environment in CentOS.

Now take CentOS 6 as an example to demonstrate its process.

Lamp environment =linux+apche+mysql+php

Use Yun to install apche+mysql+php in the installed CentOS 6.7 , and enter the following command at the command line:

~]# yum-y install httpd mysql mysql-server php php-mysql postgresql postgresql-server php-postgresql php-pgsql php-devel

After installation, turn off the firewall and SELinux, then turn on the httpd and MySQL services.

and then in/var/www/html directory to create the index.php file, and write the following content:

<?phpphpinfo ();? >

After saving, in the browser access, the following situation indicates that the lamp environment is set up.

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/A4/B4/wKioL1mv0qiBoXe7AAHD7r3Z-T8495.png-wh_500x0-wm_ 3-wmp_4-s_3298096044.png "title=" Qq20170905220801.png "alt=" Wkiol1mv0qiboxe7aahd7r3z-t8495.png-wh_50 "/>


First, build WordPress

1. Download and import unzip

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/A4/B4/wKioL1mv1CexBnvfAAAa61KfiuM375.png-wh_500x0-wm_ 3-wmp_4-s_810619625.png "title=" Qq20170905221050.png "alt=" Wkiol1mv1cexbnvfaaaa61kfium375.png-wh_50 "/>

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/06/03/wKiom1mv107ixyK7AACkplXjA5g224.png-wh_500x0-wm_ 3-wmp_4-s_3720239251.png "title=" Qq20170905221148.png "alt=" Wkiom1mv107ixyk7aackplxja5g224.png-wh_50 "/>

Since I have made more than one virtual host, I moved the WordPress directory to the root directory of the document I set

MYWEB/VHOSTS/WWW1, the first word moved to the /var/www/html directory.

2. Create WordPress database and empower Kitty users

~]# mysqlmysql> CREATE DATABASE WordPress;mysql> Grant all on wordpress.* to ' kitty ' @ ' localhost ' identified by ' 123 456 ';

3. Modify some of the contents of the wp-config.php file

Go to the WordPress directory and perform the following actions

www1]# CP wp-config-sample.php wp-config.php

Then modify some of the contents of the wp-config.php file as follows:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/A4/B4/wKioL1mv1r-CmNg7AABjBsEN5kM974.png-wh_500x0-wm_ 3-wmp_4-s_3931746696.png "title=" Qq20170906190627.png "alt=" Wkiol1mv1r-cmng7aabjbsen5km974.png-wh_50 "/>

4. Open the browser input URL to access the following:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/A4/B4/wKioL1mv2IHABYDXAAGzzZrkaHA589.png-wh_500x0-wm_ 3-wmp_4-s_506182216.png "title=" Qq20170905222805.png "alt=" Wkiol1mv2ihabydxaagzzzrkaha589.png-wh_50 "/>

There was an error accessing the database before it was created:

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/A4/B4/wKioL1mv2LSytbG7AABJ8NjQxIE987.png-wh_500x0-wm_ 3-wmp_4-s_3249015249.png "title=" Qq20170905222435.png "alt=" Wkiol1mv2lsytbg7aabj8njqxie987.png-wh_50 "/>

And then we'll do it step-by-step.

As follows:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/06/03/wKiom1mv2SaxZD1QAAEL-MWPlX4849.png-wh_500x0-wm_ 3-wmp_4-s_2513122257.png "title=" Qq20170905223039.png "alt=" Wkiom1mv2saxzd1qaael-mwplx4849.png-wh_50 "/>

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/A4/B4/wKioL1mv2ROD7q9cAABV9KHEX5w285.png-wh_500x0-wm_ 3-wmp_4-s_293606438.png "title=" Qq20170905223744.png "alt=" Wkiol1mv2rod7q9caabv9khex5w285.png-wh_50 "/>

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/A4/B4/wKioL1mv2R-wF5LYAAKHCp7ODBk679.png-wh_500x0-wm_ 3-wmp_4-s_3137561966.png "title=" Qq20170905223808.png "alt=" Wkiol1mv2r-wf5lyaakhcp7odbk679.png-wh_50 "/>

Complete. If you are interested, you can get a deeper understanding of it.


Second, build discuz! forum System

1. Download and import the extract (to extract to the document root directory)

~]# cd/myweb/vhosts/www1/www1]# Unzip/root/discuz_x3.2_sc_utf8.zip

2. Modify permissions (either wait for access error)

www1]# Chmod-r 777 upload/

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/A4/B4/wKioL1mv3NXAzas0AAB6KFcXXtg246.png-wh_500x0-wm_ 3-wmp_4-s_1820699131.png "title=" Qq20170906192103.png "alt=" Wkiol1mv3nxazas0aab6kfcxxtg246.png-wh_50 "/>

This is to facilitate the reunification of the change to such, some directories do not need to change!!

3. Set the database root password and authorize

www1]# mysqladmin-u root Password 123456www1]# mysqlmysql> grant all on * * to [e-mail protected] '% ' identified by ' 123 456 ";

4. Open Browser access

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/A4/B4/wKioL1mv20Pw1xeMAAG6vzUNBkU820.png-wh_500x0-wm_ 3-wmp_4-s_1763592549.png "title=" Qq20170906162614.png "alt=" Wkiol1mv20pw1xemaag6vzunbku820.png-wh_50 "/>

Click Agree.

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/06/03/wKiom1mv2_7z7CbrAAEb4Rj3KAA233.png-wh_500x0-wm_ 3-wmp_4-s_614982897.png "title=" Qq20170906162805.png "alt=" Wkiom1mv2_7z7cbraaeb4rj3kaa233.png-wh_50 "/>

If you did not modify the permissions, the following error will occur:

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/06/03/wKiom1mv3ArxroiUAAFe-jD8-qA390.png-wh_500x0-wm_ 3-wmp_4-s_165900545.png "title=" Qq20170906162708.png "alt=" Wkiom1mv3arxroiuaafe-jd8-qa390.png-wh_50 "/>

Continue with the operation,

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/A4/B4/wKioL1mv3BiSdWCRAAD1XnHX7ig408.png-wh_500x0-wm_ 3-wmp_4-s_1735459512.png "title=" Qq20170906162844.png "alt=" Wkiol1mv3bisdwcraad1xnhx7ig408.png-wh_50 "/>

Then modify the following option contents:

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/06/03/wKiom1mv3FzCbnskAAEMx1w0yrw190.png-wh_500x0-wm_ 3-wmp_4-s_2224617914.png "title=" Qq20170906163621.png "alt=" Wkiom1mv3fzcbnskaaemx1w0yrw190.png-wh_50 "/>

Go on:

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/06/03/wKiom1mv3HzQcSvXAAF0o5Bqn0M166.png-wh_500x0-wm_ 3-wmp_4-s_2766966389.png "title=" Qq20170906163635.png "alt=" Wkiom1mv3hzqcsvxaaf0o5bqn0m166.png-wh_50 "/>

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/A4/B4/wKioL1mv3HnzJR5gAAFzD9M_2x4921.png-wh_500x0-wm_ 3-wmp_4-s_2211859075.png "title=" Qq20170906163735.png "alt=" Wkiol1mv3hnzjr5gaafzd9m_2x4921.png-wh_50 "/>

At this point, WordPress Blog system and discuz! Forum system to complete the construction.


The steps to operate in CENTOS7 are almost identical, see below.




httpd-2.4 in CentOS 7 and httpd-2.2 in CentOS 6 build WordPress blog system and discuz! forum system

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.