{"id":6852,"date":"2017-07-06T07:35:28","date_gmt":"2017-07-05T23:35:28","guid":{"rendered":"http:\/\/rmohan.com\/?p=6852"},"modified":"2017-07-06T07:35:28","modified_gmt":"2017-07-05T23:35:28","slug":"yum-deployment-of-high-level-lnmp-environment","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6852","title":{"rendered":"YUM deployment of high-level LNMP environment"},"content":{"rendered":"<p><strong>YUM deployment of high-level LNMP environment<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Status:<br \/>\nyum epel comes with a low version of php mysql nginx can not meet the test and production environment in the program performance and security requirements<\/p>\n<p>LNMP -&gt; Web environment for rapid deployment<\/p>\n<p>Demand:<br \/>\nyum source version of the php is 5.4, when we need to use 5.6 or 7.0 version of PHP, it can only compile and install. But sometimes we do not want to deal with some dependencies, hoping to be able to quickly deploy through yum, this time You need to introduce a third party yum source<br \/>\nWEBTATIC foreign third party EPEL<\/p>\n<p>Https:\/\/webtatic.com\/packages\/<\/p>\n<p>PHP third party EPEL source<\/p>\n<p>CentOS 6.x source<\/p>\n<p>Rpm -Uvh https: \/\/ dl. Fedora project.org\/pub\/epel\/epel-release-latest-6.noarch.rpm<br \/>\nrpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el6\/latest.rpm<\/p>\n<p>CentOS 7.x source<\/p>\n<p>Rpm -Uvh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<br \/>\nrpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm<\/p>\n<p>You can view the installation package for the source by command<\/p>\n<p>Yum list &#8211;enablerepo = webtatic | grep php<\/p>\n<p>Deploy LNMP environment steps &#8212;&#8211;&gt; install Mysql &#8212;-&gt; install PHP &#8212;&gt;<br \/>\nNGINX to install php7.1 version of the example<br \/>\nyum install php71w php71w-fpm php71w-common php71w-gd php71w-mbstring php71w-mcrypt php71w -mysqlnd php71w-pdo php71w-bcmath -y<\/p>\n<p>Install php5.6 version example:<br \/>\nyum install php56w php56w-fpm php56w-mysql php56w-mcrypt php56w-bcmath php56w-gd php56w-mbstring php56w-pdo -y<\/p>\n<p>Simple description of the various PHP components function<br \/>\n# basic<br \/>\nphp71w<br \/>\n# nginx connection using<br \/>\nphp71w-fpm<br \/>\n# wide byte<br \/>\nphp71w-mbstring<br \/>\n# connect mysql related<br \/>\nphp71w-mysqlnd<br \/>\n# redis extended<br \/>\nphp71w-pecl-redis<br \/>\n# encryption using<br \/>\nphp71w-mcrypt<br \/>\n# performance acceleration php5. 5 more than the use of<br \/>\nphp71w-opcache<br \/>\ninstallation of these basic can meet a large number of needs, as some expansion, will be installed in the installation of these libraries<\/p>\n<p>&nbsp;<\/p>\n<p>Mysql official yum EPEL<br \/>\nintroduced CentOS 6.x Platform, comes with the version are 5.1, of course, the MySQL website naturally have to provide the appropriate yum method, most people may not care.<br \/>\nCentOS 7.x series are carrying MariaDB<\/p>\n<p>Official description link: https:\/\/dev.mysql.com\/doc\/mysql-repo-excerpt\/5.6\/en\/linux-installation-yum-repo.html<\/p>\n<p># Update yum source<br \/>\nyum update<br \/>\n# add mysql5.6 yum source<br \/>\n# Centos6<br \/>\nrpm -Uvh http:\/\/dev.mysql.com\/get\/mysql-community-release-el6-5.noarch.rpm<br \/>\n# Centos7<br \/>\nrpm -Uvh http: \/\/dev.mysql.com\/get\/mysql-community-release-el7-5.noarch.rpm<br \/>\nyum install mysql-server<\/p>\n<p>The installation is complete, start the Mysql service<\/p>\n<p>123456 # start<br \/>\nservice mysqld start<br \/>\n# restart<br \/>\nservice mysqld restart<br \/>\n# close<br \/>\nservice mysqld stop<\/p>\n<p>If the start fails, first check whether the port number is temporary, followed by check the permissions, in addition to the need to check the mysql process<\/p>\n<p>Set the mysql password<\/p>\n<p>Mysqladmin -u root password 123456<br \/>\nAllow remote access<br \/>\nmysql -u root<br \/>\nmysql&gt; use mysql;<br \/>\n# Allow external connection database<br \/>\nmysql&gt; update user set host = &#8216;%&#8217; where host = &#8216;127.0.0.1&#8217;;<br \/>\n# View the results of the change<br \/>\nmysql&gt; select host, the User, the User password from;<br \/>\n# refresh authority table (this operation must be performed, or the need to restart MySQL)<br \/>\nMySQL&gt; flush privileges;<br \/>\nremember, after a successful connection through the client, be sure to set a password, if a firewall is turned on, you need to let go Database external port, generally 3306<\/p>\n<p>Reset the root password (this operation in two cases)<br \/>\n1, remember the root user password<br \/>\n# 123456 which is the original password, can not be separated from the -p, abcdefg for the new password<br \/>\nmysqladmin -u root -p 123456 password abcdef<\/p>\n<p>2, forget the root user password<br \/>\n# If MySQL is running, first turn off<br \/>\nkillall -TERM mysqld<br \/>\n# start MySQL<br \/>\nmysqld_safe &#8211; skip-grant-tables &amp;<br \/>\n# this time is to go to MySQL<br \/>\n&gt; use mysql<br \/>\n&gt; update user set password = password (&#8221; New_pass &#8220;) where user =&#8221; root &#8220;;<br \/>\n&gt; flush privileges<br \/>\n# Exit, start mysql<\/p>\n<p>Nginx Deployment<br \/>\nWebsite provides different OS Platform Version Download<\/p>\n<p>Http:\/\/nginx.org\/en\/linux_packages.html#stable<\/p>\n","protected":false},"excerpt":{"rendered":"<p>YUM deployment of high-level LNMP environment<\/p>\n<p>&nbsp;<\/p>\n<p>Status: yum epel comes with a low version of php mysql nginx can not meet the test and production environment in the program performance and security requirements<\/p>\n<p>LNMP -&gt; Web environment for rapid deployment<\/p>\n<p>Demand: yum source version of the php is 5.4, when we need to use [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6852"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6852"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6852\/revisions"}],"predecessor-version":[{"id":6853,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6852\/revisions\/6853"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}