﻿{"id":2069,"date":"2020-03-17T16:39:17","date_gmt":"2020-03-17T08:39:17","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=2069"},"modified":"2020-04-15T10:47:00","modified_gmt":"2020-04-15T02:47:00","slug":"ubuntu%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85php7","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/linux\/2069","title":{"rendered":"ubuntu\u7f16\u8bd1\u5b89\u88c5php7"},"content":{"rendered":"<p><a href=\"https:\/\/www.php.net\/downloads.php\">https:\/\/www.php.net\/downloads.php<\/a><\/p>\n<p>\u4e0b\u8f7dphp7\u6e90\u7801\u89e3\u538b<\/p>\n<p>\u4e0b\u8f7d <a href=\"https:\/\/github.com\/kkos\/oniguruma\">https:\/\/github.com\/kkos\/oniguruma<\/a> \u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u6216\u8005\u4e0d\u4f7f\u7528mbstring\u7684\u6b63\u5219\u529f\u80fd\uff0c\u5373\u5728\u201c&#8211;enable-mbstring\u201d\u540e\u518d\u6dfb\u52a0\u201c&#8211;disable-mbregex\u201d\u53c2\u6570\u3002\u8fd9\u6837\u7684\u914d\u7f6e\u5c06\u4e0d\u518d\u9700\u8981oniguruma\u5e93<\/p>\n<p>.\/configure \\\n&#8211;prefix=\/usr\/local\/php7 \\\n&#8211;exec-prefix=\/usr\/local\/php7 \\\n&#8211;bindir=\/usr\/local\/php7\/bin \\\n&#8211;sbindir=\/usr\/local\/php7\/sbin \\\n&#8211;includedir=\/usr\/local\/php7\/include \\\n&#8211;libdir=\/usr\/local\/php7\/lib\/php \\\n&#8211;mandir=\/usr\/local\/php7\/php\/man \\\n&#8211;with-zip \\\n&#8211;enable-pdo \\\n&#8211;enable-inline-optimization \\\n&#8211;enable-shared \\\n&#8211;enable-xml \\\n&#8211;enable-bcmath \\\n&#8211;enable-shmop \\\n&#8211;enable-sysvsem \\\n&#8211;enable-mbregex \\\n&#8211;enable-mbstring \\\n&#8211;enable-ftp \\\n&#8211;enable-pcntl \\\n&#8211;enable-sockets \\\n&#8211;enable-fileinfo \\\n&#8211;enable-filter \\\n&#8211;enable-soap \\\n&#8211;enable-session \\\n&#8211;enable-opcache \\\n&#8211;enable-fpm \\\n&#8211;disable-debug \\\n&#8211;disable-rpath \\\n&#8211;with-config-file-path=\/usr\/local\/php7\/etc \\\n&#8211;with-mysql-sock=\/var\/run\/mysql\/mysql.sock \\\n&#8211;with-mhash \\\n&#8211;with-openssl \\\n&#8211;with-mysqli=mysqlnd \\\n&#8211;with-pdo-mysql=mysqlnd \\\n&#8211;enable-gd \\\n&#8211;with-iconv \\\n&#8211;with-zlib \\\n&#8211;with-xmlrpc \\\n&#8211;with-gettext \\\n&#8211;with-curl \\\n&#8211;with-fpm-user=php \\\n&#8211;with-fpm-group=php \\\n&#8211;with-pear=\/usr\/local\/php7\/bin<\/p>\n<pre class=\"line-numbers language-bash\"><code class=\" language-bash\">&lt;span class=&quot;token function&quot;&gt;sudo&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;make&lt;\/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;&amp;&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;make&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;install\n\n&lt;\/span&gt;<\/code><\/pre>\n<pre class=\"line-numbers\"><code>\u5c06\/usr\/local\/php7\u52a0\u5165\u73af\u5883\u53d8\u91cf\n\n    \u589e\u52a0php-fpm\u547d\u4ee4\uff1a\n    sudo cp sapi\/fpm\/init.d.php-fpm \/usr\/local\/php7\/bin\/php-fpm\n    sudo chmod +x \/usr\/local\/php7\/bin\/php-fpm\n\n    \u521d\u59cb\u5316 PHP \u548c PHP-FPM \u7684\u914d\u7f6e\n    sudo cp php.ini-production \/usr\/local\/php7\/etc\/php.ini\n    sudo cp \/usr\/local\/php7\/etc\/php-fpm.conf.default \/usr\/local\/php7\/etc\/php-fpm.conf\n\n    \u5c06PHP-FPM\u52a0\u5165\u7cfb\u7edf\u670d\u52a1\n    cp sapi\/fpm\/php-fpm.service   \/etc\/systemd\/system\/\n    chmod +x \/etc\/systemd\/system\/php-fpm.service\n\n    \u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u4ee5\u53ca\u5f00\u542f\u670d\u52a1\uff1a\n    systemctl enable php-fpm.service\n    systemctl start php-fpm.service<\/code><\/pre>\n<pre class=\"line-numbers language-bash\"><code class=\" language-bash\"><\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/www.php.net\/downloads.php\">https:\/\/www.php.net\/downloads.php<\/a> \u4e0b\u8f7dphp7\u6e90\u7801\u89e3\u538b \u4e0b\u8f7d <a href=\"https:\/\/github.com\/kkos\/oniguruma\">https:\/\/github.com\/kkos\/oniguruma<\/a> \u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u6216\u8005\u4e0d\u4f7f\u7528mbstrin&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,15],"tags":[],"class_list":["post-2069","post","type-post","status-publish","format-standard","hentry","category-linux","category-php"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=2069"}],"version-history":[{"count":3,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2069\/revisions"}],"predecessor-version":[{"id":2082,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2069\/revisions\/2082"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=2069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=2069"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=2069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}