{"id":1661,"date":"2016-03-03T00:15:38","date_gmt":"2016-03-02T15:15:38","guid":{"rendered":"http:\/\/blog.4star.link\/?p=1661"},"modified":"2016-08-07T12:05:36","modified_gmt":"2016-08-07T03:05:36","slug":"cakephp3%e3%82%92centos7-php7-php-fpm-nginx-mysql-%e3%81%ab%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%9f%e9%9a%9b%e3%81%ae%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"https:\/\/blog.4star.link\/?p=1661","title":{"rendered":"Cakephp3\u3092CentOS7( php7 + php-fpm + nginx + MySQL )\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306e\u30e1\u30e2"},"content":{"rendered":"<p>\u5927\u5206\u51fa\u9045\u308c\u305f\u611f\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u6700\u8fd1<em>cakephp3<\/em>\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u69cb\u7bc9\u3057\u305f\u306e\u3067\u3001<br \/>\n\u305d\u308c\u3092\u517c\u306d\u3066\u30e1\u30e2\u3002<\/p>\n<p>\u65e9\u901f\u3001cakephp3\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u3092\u78ba\u8a8d\u3002<\/p>\n<p><a href=\"http:\/\/book.cakephp.org\/3.0\/ja\/installation.html\">http:\/\/book.cakephp.org\/3.0\/ja\/installation.html<\/a><\/p>\n<p>\u30b7\u30b9\u30c6\u30e0\u8981\u4ef6\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3002\u3002\u3002<\/p>\n<pre><code>\u30b7\u30b9\u30c6\u30e0\u8981\u4ef6\nHTTP\u30b5\u30fc\u30d0\u30fc\u3002\u4f8b: Apache\u3002mod_rewrite \u304c\u63a8\u5968\u3055\u308c\u307e\u3059\u304c\u3001\u5fc5\u9808\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\nPHP 5.5.9 \u4ee5\u4e0a (PHP 7 \u3082\u542b\u3080)\nPHP mbstring \u62e1\u5f35\nPHP intl \u62e1\u5f35\n<\/code><\/pre>\n<p>&#8230;(PHP 7\u3082\u542b\u3080)\uff01<\/p>\n<p>\u305b\u3063\u304b\u304f\u306a\u306e\u3067\u3001\u901f\u3044\u3068\u30a6\u30ef\u30b5\u306e<em>php7<\/em>\u306b\u3001<em>php-fpm<\/em>\u3068\u3001<em>nginx<\/em>\u306e\u69cb\u6210\u3067\u3001<br \/>\nyum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\uff01\uff01<\/p>\n<p><!--nextpage--><\/p>\n<h3>\u69cb\u7bc9\u3057\u305f\u69cb\u6210\u306f\u3053\u308c\uff01<\/h3>\n<ul>\n<li>CentOS7<\/li>\n<li>php7<\/li>\n<li>php-fpm<\/li>\n<li>nginx<\/li>\n<li>MySQL<\/li>\n<\/ul>\n<h2>1. php7\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u3053\u3061\u3089\u306e\u8a18\u4e8b\u53c2\u8003\u306b\u30b5\u30af\u30c3\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u3061\u3083\u3044\u307e\u3057\u305f\uff01<br \/>\n\u300cDQNEO\u8d77\u696d\u65e5\u8a18\u300d\u3055\u3093\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01\uff08\u697d\u6ce3\uff09<br \/>\n\u53c2\u8003\uff1a<a href=\"http:\/\/dqn.sakusakutto.jp\/2015\/12\/centos7_yum_install_php70.html\">http:\/\/dqn.sakusakutto.jp\/2015\/12\/centos7_yum_install_php70.html<\/a><\/p>\n<p>\u5143\u3005php5\u306a\u3069\u5165\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u3042\u3089\u304b\u3058\u3081\u524a\u9664\u3057\u3066\u304a\u3044\u305f\u65b9\u304c\u3044\u3044\u304b\u3082\u3002<br \/>\n\u3042\u3068\u5468\u8fba\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u3002<\/p>\n<pre><code>\u4e00\u62ec\u3067\u65e2\u5b58php\u3092yum\u3067\u524a\u9664\u3002\u3002\u6271\u3044\u6ce8\u610f\n# yum remove php-*\n<\/code><\/pre>\n<h2>2. mysql\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u300ckakiro-web\u300d\u3055\u3093\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01<br \/>\n<a href=\"http:\/\/www.kakiro-web.com\/linux\/mysql-yum-repository-install.html\">http:\/\/www.kakiro-web.com\/linux\/mysql-yum-repository-install.html<\/a><\/p>\n<h2>3. php-fpm \u3068 nginx\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>nginx\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre><code># yum install nginx\n<\/code><\/pre>\n<p>php-fpm\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre><code># yum install php70-fpm \n<\/code><\/pre>\n<p>\u203bphp7\u7528\u3092<\/p>\n<h2>4. php-mbstring\u3084php-intl\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>php7\u7528\u306e\u3082\u306e\u3092\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3092\u8abf\u3079\u308b\u5834\u5408\u306f\u3001<\/p>\n<pre><code># yum list php*intl\n<\/code><\/pre>\n<p>\u7b49<\/p>\n<p><!--nextpage--><\/p>\n<h2>5. cakephp3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u516c\u5f0f\u30b5\u30a4\u30c8\u53c2\u8003\u306b\u3002\u3002<br \/>\n<a href=\"http:\/\/book.cakephp.org\/3.0\/ja\/installation.html\">http:\/\/book.cakephp.org\/3.0\/ja\/installation.html<\/a><\/p>\n<h3>\u3042\u3068\u306f\u8a66\u3057\u306b\u3001DB\u306e\u30c6\u30fc\u30d6\u30eb\u7b49\u4f5c\u3063\u3066<\/h3>\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u7c21\u5358\u306busers\u306eMVC\u3092\u3055\u304f\u3063\u3068\u4f5c\u6210\u3057\u3066\u307f\u308b<\/p>\n<pre><code>bin\/cake bake users all\n<\/code><\/pre>\n<h1>\u4e0b\u8a18\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u3072\u3063\u304b\u304b\u3063\u305f\u90e8\u5206\u30e1\u30e2<\/h1>\n<h2>\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3000\u305d\u306e1<\/h2>\n<pre><code>Database driver Cake\\Database\\Driver\\Mysql cannot be used due to a missing PHP extension or unmet dependency\n<\/code><\/pre>\n<p>yum install php70-php-mysqlnd<\/p>\n<h2>\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u305d\u306e2<\/h2>\n<p>\u3044\u304f\u3089\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3082cakephp\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u3002<br \/>\n\u30a8\u30e9\u30fc\u3068\u304b\u307f\u3066\u3001\u305d\u308c\u3067\u3082\u305d\u3089\u3057\u3044\u30ed\u30b0\u304c\u306a\u3044\u5834\u5408\u3002<br \/>\n<em>php5.4\u3068\u304b\u3067\u4e00\u5ea6\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u3057\u307e\u3063\u305f\u5834\u5408<\/em>\u7b49\u3002<\/p>\n<pre><code>php composer.phar create-project --prefer-dist cakephp\/app my_app\n<\/code><\/pre>\n<p>\u306a\u3069\u3068\u305d\u3082\u305d\u3082create-project\u304b\u3089\u3057\u76f4\u3059\u3002<\/p>\n<h2>\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u305d\u306e3<\/h2>\n<pre><code>Controller class Index could not be found.\n<\/code><\/pre>\n<p>tmp\u3068logs\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u7591\u3046orSELinux\u3092\u7591\u3046\u3002<br \/>\n\u50d5\u306e\u5834\u5408\u306f\u3001\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5206\u51fa\u9045\u308c\u305f\u611f\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u6700\u8fd1cakephp3\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u69cb\u7bc9\u3057\u305f\u306e\u3067\u3001 \u305d\u308c\u3092\u517c\u306d\u3066\u30e1\u30e2\u3002 \u65e9\u901f\u3001cakephp3\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u3092\u78ba\u8a8d\u3002 http:\/\/book.cakephp.org\/3.0\/ja\/ &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.4star.link\/?p=1661\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Cakephp3\u3092CentOS7( php7 + php-fpm + nginx + MySQL )\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306e\u30e1\u30e2&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[223,263,224],"tags":[288,237,31,222,33,239,289],"class_list":["post-1661","post","type-post","status-publish","format-standard","hentry","category-223","category-263","category-224","tag-cakephp3","tag-centos7","tag-mysql","tag-nginx","tag-php-2","tag-php-fpm","tag-php7"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1661"}],"collection":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1661"}],"version-history":[{"count":7,"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1661\/revisions"}],"predecessor-version":[{"id":1727,"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1661\/revisions\/1727"}],"wp:attachment":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}