{"id":1251,"date":"2018-03-05T06:41:29","date_gmt":"2018-03-05T09:41:29","guid":{"rendered":"http:\/\/wordpress.jpcorp.eti.br\/?p=1251"},"modified":"2021-12-26T12:29:53","modified_gmt":"2021-12-26T15:29:53","slug":"linux-php7-1-como-padrao-no-apache","status":"publish","type":"post","link":"https:\/\/wordpress.jpcorp.eti.br\/?p=1251","title":{"rendered":"Linux &#8211; PHP7.1 como padr\u00e3o no Apache"},"content":{"rendered":"<h3>1 - Instalar pacotes e iniciar servi\u00e7os<\/h3>\n<pre class=\"lang:sh decode:true \">[root@centos7]# rpm -ivh http:\/\/remi.xpg.com.br\/enterprise\/remi-release-7.rpm\r\n[root@centos7]# yum -y install httpd php71-php-pecl-mysql php71-php-mysqlnd php71 php71-build php71-php php71-php-cli php71-php-common php71-php-fpm php71-php-gd php71-php-mbstring php71-php-mcrypt php71-php-pecl-zip php71-php-xml\r\n[root@centos7]# systemctl start httpd php71-php-fpm\r\n[root@centos7]# systemctl enable httpd php71-php-fpm<\/pre>\n<p>&nbsp;<\/p>\n<h3>2 - Alterar confs<\/h3>\n<pre class=\"lang:sh decode:true \">[root@centos7]# vim \/etc\/httpd\/conf.d\/php.conf\r\n\r\n&lt;FilesMatch \\.php$&gt;\r\n#    SetHandler application\/x-httpd-php\r\n        SetHandler \"proxy:fcgi:\/\/127.0.0.1:9000\"\r\n&lt;\/FilesMatch&gt;\r\n\r\n[root@centos7]# systemctl restart php71-php-fpm\r\n[root@centos7]# mv \/etc\/httpd\/conf.modules.d\/10-php.conf \/etc\/httpd\/conf.modules.d\/10-php.conf.old\r\n[root@centos7]# systemctl restart httpd<\/pre>\n<p>&nbsp;<\/p>\n<h3>3 - Testar<\/h3>\n<pre class=\"lang:sh decode:true \">[root@centos7]# echo '&lt;?php phpinfo(); ?&gt;' &gt; \/var\/www\/html\/info.php\r\n[root@centos7]# curl http:\/\/localhost\/info.php | grep 'PHP Version' | tail -1 | sed -e 's\/&lt;[^&gt;]*&gt;\/\/g'<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 &#8211; Instalar pacotes e iniciar servi\u00e7os [root@centos7]# rpm -ivh http:\/\/remi.xpg.com.br\/enterprise\/remi-release-7.rpm [root@centos7]# yum -y install httpd php71-php-pecl-mysql php71-php-mysqlnd php71 php71-build php71-php php71-php-cli php71-php-common php71-php-fpm php71-php-gd php71-php-mbstring php71-php-mcrypt php71-php-pecl-zip php71-php-xml [root@centos7]# systemctl start httpd php71-php-fpm [root@centos7]# systemctl enable httpd php71-php-fpm &nbsp; 2 &#8211; Alterar confs [root@centos7]# vim \/etc\/httpd\/conf.d\/php.conf &lt;FilesMatch \\.php$&gt; # SetHandler application\/x-httpd-php SetHandler &#8220;proxy:fcgi:\/\/127.0.0.1:9000&#8221; &lt;\/FilesMatch&gt;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[129,9,130],"class_list":["post-1251","post","type-post","status-publish","format-standard","hentry","category-linux","tag-apache","tag-linux","tag-php71"],"_links":{"self":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts\/1251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1251"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts\/1251\/revisions"}],"predecessor-version":[{"id":1252,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=\/wp\/v2\/posts\/1251\/revisions\/1252"}],"wp:attachment":[{"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.jpcorp.eti.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}