{"id":961,"date":"2018-09-17T17:29:03","date_gmt":"2018-09-17T08:29:03","guid":{"rendered":"https:\/\/yuis-programming.com\/?p=961"},"modified":"2021-11-17T10:46:41","modified_gmt":"2021-11-17T01:46:41","slug":"ubuntu-16-04%e3%81%abapache%e3%81%a7php7-0%e3%81%ae%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83%e3%82%92%e6%a7%8b%e7%af%89","status":"publish","type":"post","link":"https:\/\/yuis-programming.com\/?p=961","title":{"rendered":"Ubuntu\u306bApache\u3067PHP\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9"},"content":{"rendered":"<p>Linux\u306eUbuntu\u306bApache\u3067PHP\u306e\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u30e1\u30e2\u3067\u3059\u3002<br \/>\n\u305d\u308c\u305e\u308c\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u4f8b\u3068\u3057\u3066\u3001Ubuntu 16.04\u3001PHP7.0\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3092\u9806\u756a\u306b\u5b9f\u884c\u3057\u3066\u3044\u3051\u3070\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u5b8c\u4e86\u3059\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u4e45\u3005\u306b\u3084\u3063\u305f\u3089\u5fd8\u308c\u3066\u305f\u3002<\/p>\n<pre><code># # \u5fc5\u8981\u306a\u3082\u306e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nsudo apt-get update -y\nsudo apt-get install apache2 -y\nsudo apt-get install php -y\nsudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} &amp;&amp; sudo apt-get install libapache2-mod-php  -y\n\n# # apache\u8a2d\u5b9a\nsudo nano \/etc\/apache2\/apache2.conf #=&gt; \u4efb\u610f\u306e\u5834\u6240\u306b`ServerName 0.0.0.0`\u3092\u8ffd\u8a18\u3002\n\n# # php\u30d5\u30a1\u30a4\u30eb\u3092\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u3069\u3063\u304b\u306b\u4f5c\u308b\u3002\u4ee5\u4e0b\u5185\u5bb9\u4f8b\nyuis@yuis-VirtualBox:~\/share\/php$ cat \/var\/www\/html\/php\/index.php\n&lt;?php\n    phpinfo();\n?&gt;\n\n# # \u30b5\u30fc\u30d0\u30fc\u8d77\u52d5\nsudo apache2ctl start\n\n# # \u30bf\u30a4\u30c8\u30eb\u3092\u53d6\u5f97\u3057\u3066\u307f\u308b\u3002\nyuis@yuis-VirtualBox:~\/share\/php$ gettitle 192.168.3.19\nApache2 Ubuntu Default Page: It works\nyuis@yuis-VirtualBox:~\/share\/php$ gettitle 192.168.3.19\/php\nphpinfo()\n# =&gt; \u6210\u529f\u3002PHP\u304c\u8d77\u52d5\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u30d7\u30ec\u30fc\u30f3\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u308b\u3002\n\n<\/code><\/pre>\n<p>ref:<\/p>\n<p><a href=\"https:\/\/www.vultr.com\/docs\/how-to-install-apache-mysql-and-php-on-ubuntu-16-04\">How to Install Apache, MySQL and PHP on Ubuntu 16.04 &#8211; Vultr.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u306eUbuntu\u306bApache\u3067PHP\u306e\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u30e1\u30e2\u3067\u3059\u3002 \u305d\u308c\u305e\u308c\u30d0\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"acf":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8Rxwo-fv","_links":{"self":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/961"}],"collection":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=961"}],"version-history":[{"count":2,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/961\/revisions"}],"predecessor-version":[{"id":3416,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/961\/revisions\/3416"}],"wp:attachment":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}