{"id":46,"date":"2018-08-29T01:33:34","date_gmt":"2018-08-28T17:33:34","guid":{"rendered":"https:\/\/twmis.com\/?p=46"},"modified":"2024-10-10T15:03:55","modified_gmt":"2024-10-10T07:03:55","slug":"centos-7%e5%ae%89%e8%a3%9dnginxphp7mariadb","status":"publish","type":"post","link":"https:\/\/twmis.com\/?p=46","title":{"rendered":"CentOS 7\u5b89\u88ddNGINX,PHP7,Mariadb"},"content":{"rendered":"<p>CentOS 7\u5b89\u88ddNGINX,PHP7,Mariadb<\/p>\n<p><!--more--><\/p>\n<p>1.add repo<\/p>\n<p>vi \/etc\/yum.repos.d\/nginx.repo<\/p>\n<p>[nginx]<br \/>\nname=nginx repo<br \/>\nbaseurl=http:\/\/nginx.org\/packages\/centos\/$releasever\/$basearch\/<br \/>\ngpgcheck=0<br \/>\nenabled=1<\/p>\n<p>2.<\/p>\n<p>rpm -Uvh http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/Packages\/e\/epel-release-7-11.noarch.rpm<br \/>\nrpm -Uvh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm<\/p>\n<p>3. Update &amp;&amp; Upgrade<\/p>\n<p>yum -y update &amp;&amp; yum -y upgrade<\/p>\n<p>4.install<\/p>\n<p>yum -y install nginx mariadb mariadb-server php-cli php-fpm php-gd php-curl php-mbstring php-mcrypt php-odbc php-mysqlnd php-xmlrpc php-xml php-pdo php-opcache tar bzip2<\/p>\n<p>5.systemctrl enable<\/p>\n<p>systemctl enable nginx &amp;&amp; systemctl enable php-fpm &amp;&amp; systemctl enable mariadb<\/p>\n<p>6.systemctrl start<\/p>\n<p>systemctl start nginx &amp;&amp; systemctl start php-fpm &amp;&amp; systemctl start mariadb<\/p>\n<p>7.setup mariadb<\/p>\n<p>\/usr\/bin\/mysql_secure_installation<\/p>\n<p>8.modify \/etc\/php-fpm.d\/www.conf<\/p>\n<p>vi \/etc\/php-fpm.d\/www.conf<br \/>\nlisten = 127.0.0.1:9000<br \/>\nuser = nginx<br \/>\ngroup = nginx<br \/>\nlisten.owner = nginx<br \/>\nlisten.group = nginx<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7\u5b89\u88ddNGINX,PHP7,Mariadb<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-centos"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/twmis.com\/index.php?rest_route=\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twmis.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/twmis.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/twmis.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/twmis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46"}],"version-history":[{"count":0,"href":"https:\/\/twmis.com\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions"}],"wp:attachment":[{"href":"https:\/\/twmis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/twmis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/twmis.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}