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

Source: Internet
Author: User
Tags install wordpress wordpress blog fully qualified domain name

Check the environment before configuring:

[[email protected] ~]# IPTABLES-VNL//Check the firewall configuration to prevent the server from being accessed
Chain INPUT (Policy ACCEPT 6 packets, 3 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 6 packets, 312 bytes)
PK TS bytes Target prot opt in out source destination

[[email protected] ~]# getenforce//view selinux status
Enforc ing
[[email protected] ~]# setenforce 0//change SELinux to allowed status

[[email protected] conf.d]# service httpd Start//Start httpd service
starting Httpd:httpd:apr_sockaddr_info_get () failed for Chenliang
Httpd:could not reliably Determine the server ' s fully qualified domain name, using 127.0.0.1 for ServerName
[OK]

[[email protected] conf.d]# service mysqld Start//starts MySQL services, mysqld is the server side of MySQL
is starting mysqld: [OK]

Fast architecture with lamp combination This service: Linux+apache (httpd) +mysql+php

1. Install the required packages:
[email protected] ~]# yum install httpd php php-mysql mysql-server

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
manual.conf mod_dnssd.conf php.conf README ssl.conf welcome.conf
[Email protected] conf.d]# vim vhost1.conf
<virtualhost 172.16.68.1:80>
Documentroot/var/www/vhost1
ServerName www.clvhost1.com
<directory "/VAR/WWW/VHSOT1" >
Options None
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>
[Email protected] conf.d]# Mkdir-pv/var/www/vhost1
mkdir: The directory "/var/www/vhost1" has been created
[Email protected] conf.d]# echo "This is Vhost ' s homepage~" >>/var/www/vhost1/index.html
[Email protected] conf.d]# vim. /conf/httpd.conf
Namevirtualhost 172.16.68.1:80//Add this line in the httpd.conf configuration file

Under the local host system C drive \windows\system32\drivers\etc\hosts file added: 172.16.68.1 www.clvhost1.com

Start testing the results of virtual machine creation such as successfully creating a virtual machine and displaying the test interface:

3. Create and authorize user accounts for testing in MySQL to test the PHP connection database:
PHP Connection Database test:

[Email protected] conf.d]# cd/var/www/vhost1/
[[email protected] vhost1]# ls
Index.html
[Email protected] vhost1]# mv index.html index.php
[Email protected] vhost1]# vim index.php
This is Vhost ' s homepage~</br>
<?php
$conn = mysql_connect (' 172.16.68.1 ', ' Chenliang ', ' 123456 ');
if ($conn)
echo "Connect successful.";
Else
echo "Connect failed.";
?>
Test results:

4. Deploy the application:
Place WordPress Blog system, discuz! forum system and phpMyAdmin application under/etc/httpd/conf.d/vhost1/:

[[email protected] vhost1]# ls
index.php phpmyadmin-3.5.4-all-languages.tar.gz upload wordpress-4.2-zh_cn.tar.gz//phpmyadmin and WordPress for the compressed package, need to decompress, and the deployment installation discuz! forum system only need to compress the upload directory in the package, here is already placed
Extract two compressed packages:
[[email protected] vhost1]# tar XF phpmyadmin-3.5.4-all-languages.tar.gz//unzip phpMyAdmin
[email  protected] vhost1]# tar XF wordpress-4.2-zh_cn.tar.gz//unzip WordPress
View directory:

(1) BBS Forum (discuz! Forum System)
WordPress directory name to BBS (BBS forum)://renamed only to facilitate in the browser address box to enter the address

Comment out the default character format in the httpd.conf file and change it to BBS forum GB2312 (remember to restart the httpd service):
#AddDefaultCharset UTF-8
Adddefaultcharset GB2312

Test Create BBS Forum (discuz! Forum System) Results:

Click Agree:

In the BBS directory, give these directory permissions:
[Email protected] bbs]# chmod 777 config Data/data/{cache,avatar,plugindata,download,addonmd5,template,threadcache} Data/attachment Data/attachment/{album,forum,group} data/log uc_client/data/cache uc_server/data/uc_server/data/{ Cache,avatar,backup,logs,tmp,view}
The following permissions are granted:


Click Next:

On demand, then next, install the database:

Wait for the installation process:

Successfully installed BBS Forum:

Click to register a user name:

On the server side will display the BBS forum database Ultrax:

Thus, BBS Forum (discuz! Forum System) was created successfully.

(2) Build WordPress blog system (need to manually set up the database and user authorization)
Renamed the WordPress directory after unpacking the compressed package to WP:
[Email protected] vhost1]# MV wordpress/wp/
Local browser-side test home page:

Switch to the WP directory:
[Email protected] vhost1]# CD wp/
Modify the configuration file, add the name of the setting database, database user name, database password, host IP: (other need to edit)
[Email protected] wp]# vim wp-config-sample.php

The WPDB database needs to be manually authorized on our server side:

To grant access to user wpuser:

Mysql> Grant all on wpdb.* to ' wpuser ' @ ' percent ' identified by ' 123456 '; Access authorization to the user Wpuser to access the WPDB database
Query OK, 0 rows affected (0.02 sec)

After the client (here is the local) browser-side test Home login installation, the user name and password as configured above the host IP and other logins:

Add the appropriate files in the WP directory as required:

Fill in the basic information after installing the WordPress blog system:

As shown, install WordPress blog system successfully:

Go to WordPress Blog system Administrator Main interface:

At this point, WordPress Blog system to build success.

(3) Configuring the phpMyAdmin Application
Rename the phpMyAdmin directory after unpacking the package to PMA:
[Email protected] vhost1]# MV Phpmyadmin-3.5.4-all-languages PMA
Type the address directly in the browser:

On the home page you can see the database that exists on the server side (including the Ultrax and wpdb databases for the two forums above):

Here you can create additional tables, such as creating a student score table in MyDB:


The server-side display has just created the Student score table:


At this point, the phpMyAdmin application is configured successfully.

The above is to use httpd-2.2 (in CentOS6) to configure the Deployment discuz! forum system, wordpress blog system, and phpMyAdmin application.

httpd-2.2 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.