httpd-2.4 Deploy discuz! forum system, wordpress blog system and phpMyAdmin program

Source: Internet
Author: User
Tags administrator password wordpress blog

Check the environment (turn off the firewall and change the SELinux status to ensure access to the outside world):

[[email protected] ~]# iptables-f//-f rep shuts down the firewall anyway, production environment is not recommended
[Email protected] ~]# IPTABLES-VNL
Chain INPUT (Policy ACCEPT 5 packets, 448 bytes)
Pkts bytes Target prot opt in Out source destination

Chain FORWARD (Policy ACCEPT 0 packets, 0 bytes)
Pkts bytes Target prot opt in Out source destination

Chain OUTPUT (Policy ACCEPT 4 packets, 496 bytes)
Pkts bytes Target prot opt in Out source destination
[Email protected] ~]# Getenforce
Enforcing
[Email protected] ~]# Setenforce 0
[Email protected] ~]# Getenforce
Permissive
Ensure that the MARIADB service (using MARIADB in CentOS7) is turned on

Fast architecture built with lamp combination: Linux+apache (httpd) +mariadb+php

1. Install the required package:
[[[email protected] ~]# yum install httpd php php-mysql mariadb.service
2. Create a virtual host: Create a virtual host and provide a test page for the host

[[email protected] ~]# cd/etc/httpd/conf.d
[[email protected] conf.d]# ls
autoindex.conf manual.conf php.conf README ssl.conf userdir.conf welcome.conf
[[email protected] conf.d]# vim vhost.conf
<virtualhost 172.16.72.2:80>
documentroot/var/www/vhost
ServerName www.clvhost.com
<directory "/var/www/vhost";
Options None
allowoverride None
Require all granted
</directory
</virtualhost>
[[email protected] conf.d]# mkdir-pv/var/www/vhost
mkdir: directory Created "/var/www/ Vhost "
[[email protected] conf.d]# echo" This is httpd-2.4 vhost ' s homepage. ">>/var/www/vhost/ Index.html[[email protected] conf.d]# vim vhost.conf
[[email protected] conf.d]# systemctl restart Httpd.service
\windows\system32\drivers\etc\hosts file added under Local host system C drive: 172.16.72.2 www.clvhost.com
Starts testing the results of virtual machine creation as , the virtual machine is created successfully and the test interface is displayed:

3. Create and authorize user accounts for testing in MySQL, and test the PHP connection database (to ensure that the MySQL service is open: Systemctl restart Mariadb.service):

[Email protected] conf.d]# Cd/var/www/vhost
[[email protected] vhost]# ls
Index.html
[Email protected] vhost]# mv index.html index.php
[Email protected] vhost]# vim index.php
This is httpd-2.4 vhost ' s homepage.~~~~ </br>
<?php
$conn = mysql_connect (' 172.16.72.2 ', ' Chenliang ', ' 123456 ');
if ($conn)
echo "Connect successful.";
Else
echo "Connect failed.";
?>

In the server database, first authorize a user Chenliang, which is used for database connection testing:

The test results are as follows: The connection to the database succeeds

4. Deploy the application:
First, the WordPress blog system, discuz! forum System (only need to place a directory named upload) and phpMyAdmin application placed under the/etc/httpd/conf.d/vhost/:
Unzip and rename (renamed to make it easy to type an address in the Address box):

Dropped a BBS directory, fill up: [[email protected] vhost]# MV upload/bbs/
(1) Building discuz! Forum System

Solve garbled problem:
[Email protected] vhost]# vim/etc/httpd/conf/httpd.conf
#AddDefaultCharset UTF-8//Only commented out, convenient for later operation
Adddefaultcharset GB2312
Remember to restart the HTTPD service:
[Email protected] vhost]# systemctl restart Httpd.service
Refresh:

After agreeing to change directory read and Write permissions on the server side:

To change directory permissions operations:

Refresh, Next, type the settings as prompted, and the settings will be created in the server-side database during the installation process:

Installation succeeded:


The user and information registered in the homepage will be automatically entered into the server database;
At this point, discuz! Forum system initial layout completed.
(2) WordPress blog system
Go to the Local browser home page Open WordPress homepage:

As shown, we need to first prepare the required database name, database user name, database password, database host, and authorization permissions on the server side:
New database (MySQL command):
MariaDB [(None)]> CREATE database wpdb character Set =utf8;
Query OK, 1 row affected (0.01 sec)
wp-config-sample.php in the configuration file as configured:
[Email protected] wp]# vim wp-config-sample.php

Use the MySQL command to give the database user permissions to the database wpdb:
MariaDB [(None)]>grant all on wpdb.* to ' wpuser ' @ ' 172.16.%.% ' identified by ' 123456 ';

As prompted, create a new configuration file in the WP directory wp-config.php:

After that, set the administrator account and password as required, and finally enter the login screen:


At this point, the configuration WordPress blog system success.

(3) Install the phpMyAdmin application to graphically display and manage the server-side database:
Go to homepage:

Root Super Administrator can log in, password using the database administrator password set on the server side, you can see the previous configuration generated database wpdb and Ultrax:

At this point, the installation of the phpMyAdmin application succeeds.

At this point, httpd-2.4 deployed discuz! forum system, wordpress blog system and phpMyAdmin program, success.

httpd-2.4 Deploy discuz! forum system, wordpress blog system and phpMyAdmin program

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.