{"id":253,"date":"2018-05-14T22:51:51","date_gmt":"2018-05-14T14:51:51","guid":{"rendered":"https:\/\/wp.yaanren.win\/?p=253"},"modified":"2018-05-14T22:51:51","modified_gmt":"2018-05-14T14:51:51","slug":"ubuntu-16-04%e6%90%ad%e5%bb%baphp5-6-web%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/wp.625300.xyz\/?p=253","title":{"rendered":"Ubuntu 16.04\u642d\u5efaphp5.6 Web\u670d\u52a1\u5668\u73af\u5883"},"content":{"rendered":"<div>\n<p class=\"aTitle\">Ubuntu\u00a016.04\u9ed8\u8ba4\u5b89\u88c5php7.0\u73af\u5883\uff0c\u4f46\u662fphp7\u76ee\u524d\u517c\u5bb9\u6027\u5e76\u4e0d\u662f\u5f88\u597d\uff0c\u5982\u679c\u81ea\u884c\u5b89\u88c5php5\u9700\u8981\u6e05\u9664php7\u7684\u5df2\u5b89\u88c5\u5305\uff0c\u5426\u5219\u4f1a\u62a5\u9519\u3002<\/p>\n<\/div>\n<div id=\"li_all\">\n<div id=\"li_2\"><\/div>\n<\/div>\n<div id=\"content\">\n<p>\u79fb\u9664\u9ed8\u8ba4\u53ca\u5df2\u5b89\u88c5\u7684PHP\u5305<\/p>\n<p>sudo dpkg -l | grep php| awk &#8216;{print $2}&#8217; |tr &#8220;\\n&#8221; &#8221; &#8221;<br \/>\nsudo apt-get install aptitude<br \/>\nsudo aptitude purge `dpkg -l | grep php| awk &#8216;{print $2}&#8217; |tr &#8220;\\n&#8221; &#8221; &#8220;`<\/p>\n<p>\u6dfb\u52a0 PPA<br \/>\nsudo add-apt-repository ppa:ondrej\/php<\/p>\n<p>\u5b89\u88c5php5.6<br \/>\nsudo apt-get update<br \/>\nsudo apt-get install php5.6<\/p>\n<p>\u5b89\u88c5\u6269\u5c55<br \/>\nsudo apt-get install php5.6-gd<br \/>\nsudo apt-get install php5.6-mysql<\/p>\n<p>\u5b89\u88c5Apache2<br \/>\nsudo apt install apache2<br \/>\nsudo apt-get install libapache2-mod-php5.6<\/p>\n<p>\u5b89\u88c5MySQL<br \/>\nsudo apt install mysql-server php5.6-mysql<br \/>\nsudo apt-get install mysql-client<br \/>\nmysql_secure_installation<\/p>\n<p>\u5b89 phpmyadmin<br \/>\nsudo apt-get install phpmyadmin<br \/>\nsudo apt-get install php5.6-mbstring<br \/>\nsudo apt-get install php5.6-gettext<br \/>\nsudo ln -s \/usr\/share\/phpmyadmin \/var\/www\/html\/phpmyadmin<\/p>\n<p>\u914d\u7f6ephpmyadmin<br \/>\nnano \/etc\/php\/5.6\/apache2\/php.ini<br \/>\ndisplay_errors = On(\u663e\u793a\u9519\u8bef\u65e5\u5fd7\uff0c\u51fa\u73b0\u4e24\u6b21\uff0c\u90fd\u8981\u6539\uff0c\u4e0d\u7136\u65e0\u6548)<br \/>\nextension=php_mbstring.dll (\u5f00\u542fmbstring)<br \/>\nsudo dpkg-reconfigure phpmyadmin (\u91cd\u65b0\u914d\u7f6ephpmyadmin)<\/p>\n<p>___________________________________________________<\/p>\n<p>apt-get install php5.6-zip<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu\u00a016.04\u9ed8\u8ba4\u5b89\u88c5php7.0\u73af\u5883\uff0c\u4f46\u662fphp7\u76ee\u524d\u517c\u5bb9\u6027\u5e76\u4e0d\u662f\u5f88\u597d\uff0c\u5982\u679c\u81ea\u884c\u5b89\u88c5php5\u9700\u8981\u6e05&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-30"],"_links":{"self":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=253"}],"version-history":[{"count":0,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/253\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}