RPM Package Installation lamp and HTTPD virtual machine SSL Implementation

Source: Internet
Author: User

Simply list the basic commands and share only my thoughts!

Objective: Through RPM Package installs LAMP, provides two virtual hosts, one for WordPress, one for PhpMyAdmin, and provides SSL access for the latter one .

The environment is VMware virtual machine CentOS6.6, real machine win7, the later test will use win7 above the browser, has put the virtual machine The names of the two httpd virtual machines in CentOS are added to the hosts file of the Win7 .

1, modify the Yum source, point to the CentOS system CD, you need to use the RPM package, configured as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6C/4C/wKiom1VEo_XhL3_ZAADHOjLpSL4729.jpg "title=" The Yum source specifies a 1.jpg "alt=" Wkiom1veo_xhl3_zaadhojlpsl4729.jpg "/>

Figure 1

2, install apache httpd, direct yuminstall httpd can, my version is httpd-2.2.15 version, through SS–TNL Determine if there is a port for monitoring, if there is a proof that the HTTPD service has been started.

3, install mysql, install server-side program,mysql-server(the dependency package already has the client's MySQL ), as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/4C/wKiom1VEpFjAja-pAAViKWBNQK8209.jpg "title=" Install mysql-server2.jpg "alt=" Wkiom1vepfjaja-paavikwbnqk8209.jpg "/>

Figure 2

4. Installing PHP,yum install Php–y, as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/4C/wKiom1VEpK6h2kG0AATtXNDl-mg107.jpg "title=" PHP Installation 3.jpg "alt=" Wkiom1vepk6h2kg0aattxndl-mg107.jpg "/>

Figure 3

5, install php-mysql This module, in order to let php and MySQL to build interaction, as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/4C/wKiom1VEpN7RzfIUAASUttEwQ-A695.jpg "title=" Php-mysql 4.jpg "alt=" Wkiom1vepn7rzfiuaasuttewq-a695.jpg "/>

Figure 4

6, for the httpd Master profile configuration before the additional work:

1) establish two directories as the documentroot of two virtual hosts , respectively, /wbb/www/html and /wlw/www/htm.

2) Remove the/etc/sysconfig/httpd in the #HTTPD =/usr/sbin/httpd.worker # can replace the default MPM module , the default MPM module is prefork, we use prefork

3) Install the Mod-ssl module to implement SSL access mode,yum install Mod_ssl–y , as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/48/wKioL1VEpnPg95l_AAMOuYtAlEA596.jpg "title=" Mod_ SSL module 5.jpg "alt=" Wkiol1vepnpg95l_aamouytalea596.jpg "/>

Figure 5

4) first make the private key, then the self-visa book, as follows :

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/48/wKioL1VEppjiEzLdAANXoUt90co202.jpg "title=" Since the creation of the visa book 6.jpg "alt=" Wkiol1veppjiezldaanxout90co202.jpg "/>

Figure 6

5) as the site is provided on the same virtual machine, continue to apply for the certificate as follows :

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/4C/wKiom1VEpUnzxYgbAALKHgqoJMU274.jpg "title=" Request Certificate 7.jpg "alt=" Wkiom1vepunzxygbaalkhgqojmu274.jpg "/>

Figure 7

6) approve the certificate (you need to create the Index.txt file and the Echo 01>/etc/pki/ca/serial in the/etc/pki/ca directory , Not clear can look at a blog) as follows :

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/4C/wKiom1VEpxeQS4hVAAMSwclLJPQ375.jpg "title=" Approval certificate 8. JPG "alt=" wkiom1vepxeqs4hvaamswclljpq375.jpg "/>

Figure 8

7) Unzip the WordPress into the/wbb/www/html directory and unzip the phpMyAdmin into the/wlw/www/html directory . .

7, configure the httpd Master profile /etc/httpd/conf/httpd.conf, establish two virtual machines, the ServerName of the first virtual machine is Www.a.com, the second virtual machine name must be the name of the certificate you requested, so it is www.damihua.com.

    • Cancel MAIN SERVER, by adding # to the DocumentRoot .

    • The configuration of the virtual machine is as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/48/wKioL1VEqRDxWhWOAAN0RBkuDFw586.jpg "title=" virtual machine configuration 9.jpg "alt=" Wkiol1veqrdxwhwoaan0rbkudfw586.jpg "/>

Figure 9

8. Configure WordPress:

    • View the readme.html of WordPress, as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/48/wKioL1VEqUOyc-taAAQ-OU1rb1Q867.jpg "title=" read Me10.jpg "alt=" Wkiol1vequoyc-taaaq-ou1rb1q867.jpg "/>

Figure 10

    • according to the Readme to rename wp-config-sample.php to wp-config.php, only need to modify the database name, database user name and password on it, The configuration file is written very clearly, as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/48/wKioL1VEqXeAbUGSAAK9Oc6lF-c401.jpg "title=" Accurate wordpress11.jpg "alt=" Wkiol1veqxeabugsaak9oc6lf-c401.jpg "/>

Figure 11

    • Start the database (/etc/init.d/mysqld start) and add the wordpress database,wdp user, and 123 password as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6C/4C/wKiom1VEqD7wVi5JAAJvS5b3CYY116.jpg "title=" MySQL configuration 12.jpg "alt=" Wkiom1veqd7wvi5jaajvs5b3cyy116.jpg "/>

Figure 12

    • Refresh http://www.a.com/wordpress again, complete successfully, as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6C/4C/wKiom1VEqFjAN1sPAAMo_7VkZ-A288.jpg "title=" Refresh Wordpress13.jpg "alt=" Wkiom1veqfjan1spaamo_7vkz-a288.jpg "/>

Figure 13

9, configure SSL- based Phpadmin, the steps are as follows:

    • Configure SSL configuration file /etc/httpd/conf.d/ssl.conf, mainly sslvirtual Host Context under this chapter VirtualHost,documentroot,ServerName,sslcertificatefile(fill in the certificate you just requested /etc/ Httpd/ssl/httpd.crt), sslcertificatekeyfile(fill in the private key /etc/httpd/ssl/httd.key) The values of these fields. as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/48/wKioL1VEqeLzcexhAAC8OsGrbyM200.jpg "title=" SSL configuration 1.jpg "alt=" Wkiol1veqelzcexhaac8osgrbym200.jpg "/>

Figure 14

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/48/wKioL1VEqfzizAfGAAFuKcDhAS8238.jpg "title=" SSL configuration 2.jpg "alt=" Wkiol1veqfzizafgaafukcdhas8238.jpg "/>

Figure 15

    • Unzip The Phpmyadmin-4.0.5-all-languages.zip of this installation package, if you install phpmyadmin-3.2.5-all-languages , there is a MCrypt module needs to be installed, if the installation 4.0.5 version is not, and then through the real browser open https://www.damihua.com/phpadmin, import certificate, need to install php-mbstring, the local CD does not, I re-specify the Yum source, find the Sohu, resolve, view the display situation as shown:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/48/wKioL1VEqh2jpeiMAAByMc9yN78894.jpg "title=" Sohuyum16.jpg "alt=" Wkiol1veqh2jpeimaabymc9yn78894.jpg "/>

Figure 16

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6C/4C/wKiom1VEqNWhJv7cAATxQBNi5eE941.jpg "title=" Last. jpg "alt=" wkiom1veqnwhjv7caatxqbni5ee941.jpg "/>

Figure 17

configuration is complete.

have like-minded "comrades" can add me qq:865765761.


This article comes from "write-only feeling!" "Blog, be sure to keep this provenance http://damihua.blog.51cto.com/6537272/1641309

RPM Package Installation lamp and HTTPD virtual machine SSL Implementation

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.