Configuring phpMyAdmin under CENTOS7 (HTTPS service provided)
650) this.width=650; "src=" http://pic.baike.soso.com/ugc/baikepic/34291/cut-20140312155714-709118046.jpg/0 "style = "margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "alt=" 0 "/>
phpMyAdmin can control and manipulate the MySQL database via web mode. With phpMyAdmin, you can fully manipulate the database, such as creating, copying, and deleting data, and so on.
Configuring the Environment
-
CENTOS7 2 units (ip1:192.168.70; ip2:192.168.1.71)
-
Shutting down the firewall
-
Turn off SELinux
-
Related software:
php-5.4.16php-mbstring-5.4.16 Httpd-2.4.6-45mariadb-serverphp-mysql-5.4.16phpmyadmin-4.4.14.1-all-languages.zipmod_ssl-2.4.6-45
Configuring an HTTPS environment (192.168.1.70)
#yum-y install httpd php php-mysql mariadb-server# Create a new page, test php# cat/var/www/html/index.php <?php phpinfo ();? ># Systemctl start httpd.service# systemctl start mariadb.service# View ports (service is up) #ss-tnl #在浏览器中输入192.168.70 View the generated PHP test page
Establish a private CA
CA: Visa agency; RA: Registration authority; CRL: Certificate Revocation List
certificate request and signing steps: generate a certificate request-->ra check-->CA sign-up and get a certificate
based on 192.168.1.71
# cd/etc/pki/ca/# (umask 077;openssl genrsa-out PRIVATE/CAKEY.PEM 2048) # Touch index.txt# echo > serial# from Visa Book # Opens SL Req-x509-key private/cakey.pem-days 7300-OUT/ETC/PKI/CA/CACERT.PEM-----Country Name (2 letter code) [Xx]:cnstate or province name []:beijinglocality name] [eg, city] [Default city]:beijingorganization name (eg, company) [Def Ault company Ltd]:jiajieorganizational Unit name (eg, section) []:opscommon name (eg, your name or your server ' s hostname) []:jiajiez.com Email Address []:[email protected] #后面的请求需要和这里的国家城市一致
Generate a Certificate signing request
Based on 192.168.1.70
# mkdir/etc/httpd/ssl# CD ssl# (umask 077;openssl genrsa-out/etc/httpd/ssl/httpd.key 2048) # OpenSSL req-new-key/etc/ httpd/ssl/httpd.key-out/etc/httpd/ssl/httpd.csr# the country city where the application form should be the same as above # Send the certificate to ca# SCP HTTPD.CSR [email protected]:/tmp/
Based on 192.168.1.71
#CA签署证书并将发还给请求公司 # OpenSSL ca-in/tmp/httpd.csr-out/etc/pki/ca/certs/web1.jiajie.com.crt-days 365# SCP certs/ WEB1.JIAJIE.COM.CRT [Email Protected]:/etc/httpd/ssl
Configure HTTPS to support SSL and use certificates (based on 192.168.1.70)
# yum-y Install mod_ssl# modify config file # vim/etc/httpd/conf.d/ssl.conf documentroot "/var/www/html" ServerName web1.jiajie.com : 443sslcertificatefile/etc/httpd/ssl/web1.jiajie.com.crtsslcertificatekeyfile/etc/httpd/ssl/httpd.key# Systemctl Reload httpd.service# See if Port 443 starts # SSL-TNL
This time you can put the CA's certificatecacert.pemSent to the Windows client, modifying the prefix name is called.crt, and then install the certificate in the certificate list. Will192.168.1.70 web1.jaijie.comIn the Hosts file of the Windows client. You can access the WEB1 server in your browser based on HTTPS.
Installing phpMyAdmin
At this time Open browser access https://web1.jiajie.com/phpmyadmin/found the following error:
Phpmyadmin-errorthe mbstring extension is missing. Please check your PHP configuration. No mbstring installed, yum-y install php-mbstring.
Then revisit the site to access the phpMyAdmin landing page.
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/96/3A/wKiom1keZ_aQHUxhAADQ9mt36xY581.png-wh_500x0-wm_ 3-wmp_4-s_4210503008.png "title=" Qq20170519113300.png "alt=" Wkiom1kez_aqhuxhaadq9mt36xy581.png-wh_50 "/>
Next Create login account and password:
#mysqlMariaDB [(None)]> SET PASSWORD for ' root ' @ ' localhost ' =password (' Jiajie '); MariaDB [(None)]> SET PASSWORD for ' root ' @ ' 127.0.0.1 ' =password (' Jiajie '); MariaDB [(None)]> FLUSH privileges;
Use root account and password: Jiajie will be able to log in.
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/96/3A/wKiom1keZ5mxzrFPAAEvcLdDQaQ015.png-wh_500x0-wm_ 3-wmp_4-s_3847071139.png "title=" Qq20170519113329.png "width=" "height=" border= "0" hspace= "0" vspace= "0" Style= "width:500px;height:300px;" alt= "Wkiom1kez5mxzrfpaaevclddqaq015.png-wh_50"/>
2017/5/19 11:18:47
This article is from the "Dianel Simple and simple" blog, please make sure to keep this source http://dianel.blog.51cto.com/12170393/1927475
Configuring phpMyAdmin under CENTOS7 (HTTPS service provided)