CentOS 7.4 Yum installs the lamp environment and deploys WordPress to optimize performance with XCache

Source: Internet
Author: User
Tags install php

First, installation LAMP Environment:

# yum-y Install httpd mariadb-server php-mysql php

Package version:

httpd:2.4.6

mariadb-server:5.5.56

php-mysql( The driver to use when php connects to MySQL ): 5.4.16

php:5.4.16

Note:

CentOS 7.4 is no longer available Mysql-server the package

httpd configuration file:

1. Main configuration file:/etc/httpd/conf/httpd.conf

2. Auxiliary configuration file:/etc/httpd/conf.d/*.conf

3. Module configuration file:/etc/httpd/conf.modules.d/*.conf

MARIADB configuration file:/etc/my.cnf

PHP configuration file: /etc/php.ini

httpd with the PHP the configuration file to use when combining: /etc/httpd/conf.d/php.conf

httpd with the PHP module files to use when combining: /usr/lib64/httpd/modules/libphp5.so

650) this.width=650; "src=" https://s3.51cto.com/oss/201711/13/1e19f8b77e28e111c0c92c973838616f.jpg "title=" 1.jpg " Width= "650" height= "107" border= "0" hspace= "0" vspace= "0" style= "WIDTH:650PX;HEIGHT:107PX;" alt= " 1e19f8b77e28e111c0c92c973838616f.jpg "/>


second, the test LAMP Environment:

# Systemctl Start Httpd.service

# Systemctl Start Mariadb.service

# mysql_secure_installation

# mysql-uroot-p

650) this.width=650; "src=" https://s4.51cto.com/oss/201711/13/cf0185d0fe808b8bd68f588b467fd4e7.jpg "title=" 2.jpg " alt= "Cf0185d0fe808b8bd68f588b467fd4e7.jpg"/>


# vim/var/www/html/index.php

650) this.width=650; "src=" https://s3.51cto.com/oss/201711/13/7590d263045e44474c9c7dea0429f789.jpg "title=" 3.jpg " Width= "height=" 143 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:450px;height:143px; "alt=" 7590d263045e44474c9c7dea0429f789.jpg "/>


Input in Browser 192.168.1.146 :

650) this.width=650; "src=" https://s5.51cto.com/oss/201711/13/43b47b5d571e5ef2424f6c71bd6b9f15.jpg "title=" 4.jpg " Width= "1100" height= "582" border= "0" hspace= "0" vspace= "0" style= "width:1100px;height:582px;" alt= " 43b47b5d571e5ef2424f6c71bd6b9f15.jpg "/>


Three, installation configuration WordPress :

WordPressis a usePHPLanguage andMariaDBOpen Source for database development, freeBlogengine, the user can support thePHPand theMariaDBdatabase on the server to build your ownBlog. WordPressis a very powerful blog system, many plug-ins, easy to expand, installation and use are very convenient. CurrentlyWordPresshas become the mainstreamBlogbuild a platform. https://cn.wordpress.org/, here toWordpress-4.8.1-zh_cn.zipas an example.

# yum-y Install Unzip

# unzip-q Wordpress-4.8.1-zh_cn.zip

# cp-a wordpress//var/www/html/

# cd/var/www/html/wordpress

# CP wp-config-sample.php wp-config.php

# vim wp-config.php , modify database related information:

650) this.width=650; "src=" https://s2.51cto.com/oss/201711/13/32ba205bb85de533be8aca7cdd3e073d.jpg "title=" 5.jpg " Width= "height=" border= "0" hspace= "0" vspace= "0" style= "width:400px;height:190px;" alt= " 32ba205bb85de533be8aca7cdd3e073d.jpg "/>


# mysql-uRoot -P

MariaDB [(None)]> CREATE Database wordpressdb;

MariaDB [(None)]> grant all on wordpressdb.* to ' wpuser ' @ ' percent ' identified by "123456";

MariaDB [(None)]> flush privileges;

MariaDB [(None)]> exit

# mysql-uwpuser -P

MariaDB [(None)]> show databases;

650) this.width=650; "src=" https://s4.51cto.com/oss/201711/13/dfb53c6041eb8dd5aa4b523a9cef9942.jpg "title=" 6.jpg " Width= "height=" 136 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:270px;height:136px; "alt=" Dfb53c6041eb8dd5aa4b523a9cef9942.jpg "/>


Input in Browser 192.168.1.146/wordpress :

650) this.width=650; "src=" https://s4.51cto.com/oss/201711/13/3acb234905abfdec052e5b4c88ff91f8.jpg "title=" 7.jpg " Width= "height=" 521 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:1000px;height:521px; "alt=" 3acb234905abfdec052e5b4c88ff91f8.jpg "/>


Click "Install WordPress ":

650) this.width=650; "src=" https://s3.51cto.com/oss/201711/13/733431dcc35941e8417903e7a0e5d5f8.jpg "title=" 8.jpg " Width= "height=" 392 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:1000px;height:392px; "alt=" 733431dcc35941e8417903e7a0e5d5f8.jpg "/>


Click "Sign In":

650) this.width=650; "src=" https://s3.51cto.com/oss/201711/13/6e2ff4c8d1cbf183cbc3a96ae987e5a0.jpg "title=" 9.jpg " Width= "height=" 472 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:1000px;height:472px; "alt=" 6e2ff4c8d1cbf183cbc3a96ae987e5a0.jpg "/>


Enter your username and password and click "Sign In":



650) this.width=650; "src=" Https://s3.51cto.com/oss/201711/13/e437b47b21bf7cdc05d442890c6dc073.jpg "style=" width : 1200px;height:600px; "title=" 10.jpg "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" E437b47b21bf7cdc05d442890c6dc073.jpg "/>


650) this.width=650; "src=" Https://s3.51cto.com/oss/201711/13/42ebf2b6fc4df93bfe061bd98b8d4239.jpg "style=" width : 1200px;height:600px; "title=" 11.jpg "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" 42ebf2b6fc4df93bfe061bd98b8d4239.jpg "/>


650) this.width=650; "src=" Https://s1.51cto.com/oss/201711/13/274fe808ae826e41c924c0981b4ceae9.jpg "style=" width : 1200px;height:600px; "title=" 12.jpg "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" 274fe808ae826e41c924c0981b4ceae9.jpg "/>


To Delete an installation file: # rm-rf/var/www/html/wordpress/wp-admin/install.php


Iv. Use of XCache Optimize performance:

not loaded XCache test performance when module: # ab-c 20-n http://192.168.1.146/wordpress/index.php

Configuration Epel Source: # yum-y Install Php-xcache

# RPM-QL Php-xcache --/etc/php.d/xcache.ini , /usr/lib64/php/modules/xcache.so

# Systemctl Reload Httpd.service

Refresh page, Loaded XCache Related modules:

650) this.width=650; "src=" https://s4.51cto.com/oss/201711/13/ab700905edeed9e04c41cdbdb1eaeae9.jpg "title=" 13.jpg "Width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" height:700px; "alt=" Ab700905edeed9e04c41cdbdb1eaeae9.jpg "/>

Loading XCache test performance when module: # ab-c 20-n http://192.168.1.146/wordpress/index.php

Significantly improved performance


This article is from the "Tiandaochouqin" blog, make sure to keep this source http://qiuyue.blog.51cto.com/1246073/1981163

CentOS 7.4 Yum installs the lamp environment and deploys WordPress to optimize performance with XCache

Related Article

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.