CENTOS6 Deploy BBS, Blog, phpMyAdmin application

Source: Internet
Author: User
Tags phpmyadmin

Target implementation:

Virtual Host one, DISCUZX (BBS)

Virtual Host two, WordPress (blog)

Virtual Host III, Https:phpmyadmin (database management tools)

Application Package Preparation:

①discuz_x3.4_sc_gbk.zip

②wordpress-4.8-zh_cn.tar.gz

③phpmyadmin-4.0.10.20-all-languages.zip

#注意: 4.4 or later requires mysql5.5 version to support, CENTOS6 default version is mysql5.1.7

1. Install lamp:

#yum install-y httpd php php-mysql mysql-server

2. Configure DISCUZX, WordPress FQDN-based virtual host

(1) Close the central host:

vim/etc/httpd/conf/httpd.conf #DocumentRoot "/var/www/html"

(2) Create a virtual host:

vim/etc/httpd/conf.d/vhost.conf namevirtualhost *:80 <virtualhost *:80> ServerName www.bbs.com Doc Umentroot "/var/bbs/html" </VirtualHost> <virtualhost *:80> ServerName www.blog.com Documentroo T "/var/blog/html" </VirtualHost>

(3) Create a directory:

mkdir-pv/var/{bbs,blog,pma}/html echo "www.bbs.com" >/var/bbs/html/index.html echo "www.blog.com" >/var/blog/ Html/index.htmlecho ">/var/pma/index.html

(4) Change the Hosts file for Windows:

Notepad Open c:\windows\System32\drivers\etc\hosts

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/08/9F/wKiom1nkwKvTVwngAAAuPTTJo9c455.png "title=" 1.png "alt=" Wkiom1nkwkvtvwngaaaupttjo9c455.png "/>

3. Configure the phpMyAdmin FQDN-based virtual host

(1) Installing the SSL module

Yum Install-y mod_ssl

(2) Build SSL:

① establishing the server private CA:

(Umask 077;openssl Genrsa-out/etc/pki/ca/private/cakey.pem 2048) cd/etc/pki/ca OpenSSL Req-new-x509-key Private/cak Ey.pem-out cacert.pem-days 7200 touch/etc/pki/ca/index.txt echo >/etc/pki/ca/serial

② Build httpd certificate file:

Mkdir/var/pma/ssl (umask 077;openssl genrsa-out/var/pma/ssl/httpd.key 2048) OpenSSL req-new-key/var/pma/ssl/h Ttpd.key-out/var/pma/ssl/httpd.csr

③ Authorized httpd Certificate:

OpenSSL ca-in/var/pma/ssl/httpd.csr-out/var/pma/ssl/httpd.crt-days 365

(3) Creating an HTTPS phpMyAdmin virtual machine

Vim/etc/httpd/conf.d/ssl.conf<virtualhost _default_:443> documentroot "/var/pma/html" ServerName www.pma.com: 443sslcertificatefile/var/pma/ssl/httpd.crtsslcertificatekeyfile/var/pma/ssl/httpd.key</virtualhost>

4. Run the MySQL security Settings command    

Mysql_secure_installtion #注意不要删掉testdb数据库, after the experiment.

5. Configure the MySQL service to create an authorized user

mysql-uroot-pmagedu #以自己创建用户名密码为准mysql > GRANT all on testdb.* to [email protected] '% ' identified by ' 123 '; #创建用户并授权 mysql> FLUSH privileges; #保存设置

6.Discuz (BBS) program Configuration

① Unpacking Package

Unzip discuz_x3.4_sc_gbk.zip-d/var/bbs/html

② Change Upload directory owner

Chown-r Apache upload/

③ installing using the browser input http://www.bbs.com/upload discuz Forum

Step: I agree---> next

④ setting the runtime environment by default

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/08/9F/wKiom1nkwZbAg-aEAADLND8Sbhk306.png "title=" 1.png "alt=" Wkiom1nkwzbag-aeaadlnd8sbhk306.png "/>

⑤ Configuration Database Information

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/08/9F/wKiom1nkwvKAv9qVAADfYe5Io5k245.png "title=" 1.png "alt=" Wkiom1nkwvkav9qvaadfye5io5k245.png "/>


⑥ Installation Success

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/A7/4F/wKioL1nkwLzhYHvBAAB_iwpR2Hw159.png "title=" 1.png "alt=" Wkiol1nkwlzhyhvbaab_iwpr2hw159.png "/>

7. Installing the Worldpress Program

① Unpacking Package

Tar xvf wordpress-4.8-zh_cn.tar.gz-c/var/blog/html

② Modifying a configuration file wordpress/wp-config-sample.php

CP wp-config-sample.php Wp-config.phpvim wp-config.php

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/08/9F/wKiom1nkxAyDq2LFAADlGJWVR5Q303.png "title=" 1.png "alt=" Wkiom1nkxaydq2lfaadlgjwvr5q303.png "/>


③ site information configuration in the browser

Http://www.blog.com/wordpress

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/08/9F/wKiom1nkxNzAbuzrAADC2-nBWgQ057.png "title=" 1.png "alt=" Wkiom1nkxnzabuzraadc2-nbwgq057.png "/>

④ Installation Complete

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/08/9F/wKiom1nkxS2xMN3CAAKYn74e8K4542.png "title=" 1.png "alt=" Wkiom1nkxs2xmn3caakyn74e8k4542.png "/>

8. Installing the phpMyAdmin Program

①. Download the phpMyAdmin package to the document root directory

Unzip phpmyadmin-4.0.10.20-all-languages.zip-d/var/pma/html

②. Creating a link

LN-SV phpMyAdmin ... pma

③.CD PMA

④.CP config.sample.inc.php config.inc.php

⑤vim config.inc.php

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/A7/4F/wKioL1nkw4KjdAWUAABJ-ebrgvk782.png "title=" 1.png "alt=" wkiol1nkw4kjdawuaabj-ebrgvk782.png "/> generates key in position for reinforcement:

Key acquisition: Another open terminal get random number # OpenSSL rand-base64 15

⑥. Installing the expansion pack required for phpMyAdmin

Yum install-y php-mbstring Php-mcrypt

⑦. Restarting the HTTPD service

Service httpd Restart

⑧. Access: HTTPS://WWW.LI3.COM/PMA configuration can be

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/A7/4F/wKioL1nkxJzANzB0AACuwaZ1PJk830.png "title=" 1.png "alt=" Wkiol1nkxjzanzb0aacuwaz1pjk830.png "/>


This article is from the Linux OPS blog, so be sure to keep this source http://arm2012.blog.51cto.com/2418467/1973053

CENTOS6 Deploy BBS, Blog, phpMyAdmin application

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.