{"id":9527,"date":"2017-03-17T14:35:20","date_gmt":"2017-03-17T05:35:20","guid":{"rendered":"https:\/\/nxpg.net\/blog\/?p=9527"},"modified":"2019-07-30T09:53:19","modified_gmt":"2019-07-30T00:53:19","slug":"%e8%b6%8a%e5%a2%83ec%e3%81%95%e3%81%8f%e3%82%89vps%ef%bc%88centos7-php7-mysql5-6%ef%bc%89%e3%81%a7magento2%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/nxpg.net\/blog\/tech\/?p=9527","title":{"rendered":"\u8d8a\u5883EC Magento2\u3092\u3055\u304f\u3089VPS\uff08CentOS7 + PHP7 + MySQL5.6\uff09\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9540\" src=\"https:\/\/nxpg.net\/blog\/tech\/wp-content\/uploads\/sites\/7\/2017\/03\/blog_thumbnail.png\" alt=\"\" width=\"720\" height=\"480\" \/><br \/>\n<a href=\"https:\/\/nxpg.net\/blog\/?p=9041\">\u524d\u56de<\/a>\u3001Magento2\u304c\u3069\u306e\u3088\u3046\u306a\u3082\u306e\u304b\u306b\u3064\u3044\u3066\u3001\u66f8\u304d\u307e\u3057\u305f\u3002<br \/>\n\u4eca\u56de\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u3001\u5b9f\u969b\u306b\u753b\u9762\u3092\u898b\u308b\u3068\u3053\u308d\u307e\u3067\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f5c\u696d\u3092\u884c\u3063\u305f\u306e\u306f2017\u5e743\u6708\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u6642\u671f\u3084\u74b0\u5883\u306e\u9055\u3044\u3067\u540c\u3058\u3088\u3046\u306b\u4f5c\u696d\u3092\u3057\u3066\u3082\u3001\u4e0a\u624b\u304f\u3044\u304b\u306a\u3044\u3053\u3068\u304c\u591a\u3005\u3042\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u74b0\u5883\u306f\u4e0b\u8a18\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30fbCentOS7 x86_64<br \/>\n\u30fbPHP 7.0.17<br \/>\n\u30fbMySQL 5.7.17<br \/>\n\u30fbMagento 2.1.5<\/p>\n<h2>CentOS7\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u4eca\u56de\u3001\u30b5\u30fc\u30d0\u306f\u3055\u304f\u3089VPS\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n\u304a\u8a66\u3057\u30672\u9031\u9593\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u5951\u7d04\u3067\u304d\u307e\u3059\u306d\uff01<br \/>\n\u5951\u7d04\u3057\u305f\u3089\u7ba1\u7406\u753b\u9762\u306e\u60c5\u5831\u304c\u9001\u3089\u308c\u3066\u304d\u307e\u3059\u306e\u3067\u3001\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bOS\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u300cCentOS7 x86_64\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9529\" src=\"https:\/\/nxpg.net\/blog\/wp-content\/uploads\/2017\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2017-03-17-10.31.43.png\" alt=\"\" width=\"583\" height=\"232\" \/><br \/>\n\u6570\u5206\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u304c\u3001\u30b5\u30fc\u30d0\u306e\u72b6\u614b\u304c\u300c\u7a3c\u50cd\u4e2d\u300d\u306b\u306a\u3063\u305f\u3089OK\u3067\u3059\u3002<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3089\u30b5\u30fc\u30d0\u306b\u63a5\u7d9a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<code>ssh root@xxx.xx.xxx.xxx<\/code><\/p>\n<p><code><\/code><br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u969b\u306b\u8a2d\u5b9a\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u63a5\u7d9a\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<br \/>\n\u6b21\u306b\u30e6\u30fc\u30b6\u3092\u65b0\u305f\u306b\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u306f\u521d\u671f\u8a2d\u5b9a\u306eroot\u30a2\u30ab\u30a6\u30f3\u30c8\u3060\u3068\u653b\u6483\u3092\u53d7\u3051\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\u3001root\u3067\u306f\u63a5\u7d9a\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002<br \/>\n<code>useradd xxxxxx<br \/>\npasswd xxxxxx<\/code><\/p>\n<p><code><\/code><br \/>\n\u65b0\u305f\u306b\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u304c\u7ba1\u7406\u8005\u306b\u306a\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br \/>\n<code>usermod -G wheel xxxxxx<br \/>\nvi \/etc\/pam.d\/su<br \/>\n#auth sufficient pam_wheel.so trust use_uid<br \/>\n\u2193<br \/>\nauth sufficient pam_wheel.so trust use_uid<\/code><\/p>\n<p><code><\/code><br \/>\n\u7ba1\u7406\u8005\u6a29\u9650\u3092\u6301\u3063\u305f\u30e6\u30fc\u30b6\u3092\u4f5c\u6210\u3057\u305f\u306e\u3067\u3001root\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u3092\u7981\u6b62\u3057\u307e\u3059\u3002<br \/>\n\u3064\u3044\u3067\u306bSSH port\u3092\u9069\u5f53\u306a\u3082\u306e\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<code>vi \/etc\/ssh\/sshd_config<br \/>\n#Port 22<br \/>\n\u2193<br \/>\nPort 10014\uff08\u9069\u5f53\u306a\u5024\u306b\uff09<\/code><br \/>\n<code>#PermitRootLogin yes<br \/>\n\u2193<br \/>\nPermitRootLogin no<\/code><\/p>\n<p><code><\/code><br \/>\n\u6b21\u306b\u8a2d\u5b9a\u3057\u305fport\u3092\u958b\u304f\u3088\u3046\u306b\u3057\u3064\u3064\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306eSSH port\u3092\u9589\u3058\u307e\u3059\u3002<br \/>\n<code>firewall-cmd --add-service=http<br \/>\nfirewall-cmd --permanent --add-service=http<br \/>\nfirewall-cmd --add-port=10014\/tcp<br \/>\nfirewall-cmd --permanent --add-port=10014\/tcp<br \/>\nfirewall-cmd --remove-service=ssh<br \/>\nfirewall-cmd --permanent --remove-service=ssh<\/code><\/p>\n<p><code><\/code><br \/>\n\u8a2d\u5b9a\u3092\u53cd\u6620\u3059\u308b\u305f\u3081\u306b\u3001sshd\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\n<code>systemctl restart sshd.service<\/code><\/p>\n<p><code><\/code><br \/>\n\u3053\u308c\u3067root\u3067\u63a5\u7d9a\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001exit\u3057\u3066\u5b9f\u969b\u306b\u518d\u63a5\u7d9a\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n<code>ssh root@xxx.xx.xxx.xxx<\/code><\/p>\n<p><code><\/code><br \/>\n\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u3001\u63a5\u7d9a\u306b\u5931\u6557\u3059\u308c\u3070\u6210\u529f\u3067\u3059\u3002<br \/>\n<code>ssh: connect to host xxx.xx.xxx.xxx port 22: Connection refused<\/code><\/p>\n<p><code><\/code><br \/>\n\u3067\u306f\u65b0\u305f\u306b\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u3068\u8a2d\u5b9a\u3057\u305fport\u3067\u63a5\u7d9a\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n<code>ssh -p 10014 xxxxx@xxx.xxx.xxx.xxx<\/code><\/p>\n<p><code><\/code><br \/>\n\u63a5\u7d9a\u3067\u304d\u305f\u3089\u6210\u529f\u3067\u3059\u3002<br \/>\n\u30b5\u30fc\u30d0\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a2d\u5b9a\u306f\u4ed6\u306b\u3082\u3067\u304d\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3092\u30aa\u30b9\u30b9\u30e1\u3057\u307e\u3059\u3002<br \/>\n\u7279\u306bMagento2\u306e\u3088\u3046\u306aEC\u30b5\u30a4\u30c8\u306e\u5834\u5408\u306f\u3001\u500b\u4eba\u60c5\u5831\u3092\u6271\u3046\u3053\u3068\u3082\u591a\u3044\u306e\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u306f\u5341\u5206\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>Apache\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u305d\u308c\u3067\u306f\u6b21\u306bMagento2\u306b\u5fc5\u8981\u306a\u3082\u306e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305a\u6700\u521d\u306b\u6a29\u9650\u304c\u306a\u3044\u3068\u304a\u3082\u3044\u307e\u3059\u306e\u3067\u3001root\u306b\u306a\u3063\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<code>sudo su -<\/code><\/p>\n<p><code><\/code><br \/>\n\u6b21\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6700\u65b0\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<code>yum -y update<br \/>\nyum -y install yum-plugin-priorities<br \/>\nyum -y groupinstall \"Base\" \"Development tools\" \"Japanese Support\"<br \/>\nyum -y install epel-release<br \/>\nrpm -ivh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm<br \/>\nrpm -Uvh http:\/\/mirror.fairway.ne.jp\/dag\/redhat\/el7\/en\/x86_64\/rpmforge\/RPMS\/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm<\/code><\/p>\n<p><code><\/code><br \/>\n\u6e96\u5099\u304c\u51fa\u6765\u305f\u3089\u3001Apache\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<code>yum install httpd<br \/>\nsystemctl enable httpd<br \/>\nsystemctl start httpd<\/code><\/p>\n<p><code><\/code><br \/>\n\u3053\u306e\u6642\u70b9\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u306bIP\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3059\u308b\u3068\u8d77\u52d5\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>\n<code>http:\/\/xxx.xxx.xxx.xxx<\/code><\/p>\n<p><code><\/code><br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9531\" src=\"https:\/\/nxpg.net\/blog\/tech\/wp-content\/uploads\/sites\/7\/2017\/03\/Apache-HTTP-Server-Test-Page-powered-by-CentOS.png\" alt=\"\" width=\"1102\" height=\"890\" \/><br \/>\n\u521d\u671f\u8a2d\u5b9a\u306e\u307e\u307e\u3067\u306f.htaccess\u30d5\u30a1\u30a4\u30eb\u304c\u6709\u52b9\u3067\u306a\u3044\u8a2d\u5b9a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4e0b\u8a18\u306e\u5909\u66f4\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n<code>vi \/etc\/httpd\/conf\/httpd.conf<\/code><br \/>\n<code>&lt;Directory \"\/var\/www\/html\"&gt;<br \/>\nAllowOverride All \uff08None\u3092All\u306b\u5909\u66f4\uff09<\/code><\/p>\n<h2>PHP7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u6b21\u306bPHP7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<code>yum install --enablerepo=remi,remi-php70 php php-devel php-mbstring php-pdo php-gd php-fpm php-mysqlnd  php-mcrypt php-intl php-bcmath php-pecl-imagick php-soap php-xmlrpc php-pecl-zip php-opcache php-pecl-xdebug<\/code><\/p>\n<p><code><\/code><br \/>\n\u3061\u306a\u307f\u306bMagento2\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u82f1\u8a9e\u8868\u793a\u306e\u70ba\u3001\u65e5\u672c\u8a9e\u306b\u5909\u3048\u305f\u3044\u3068\u3044\u3046\u5834\u5408\u306bPHP7\u3067\u306f\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\uff082017\u5e742\u6708\u73fe\u5728\uff09<br \/>\nPHP7\u306e\u65b9\u304c\u51e6\u7406\u306f\u65e9\u304f\u306a\u308b\u306e\u3067\u305d\u3061\u3089\u306b\u3059\u308b\u3079\u304d\u3067\u3059\u304c\u3001\u3069\u3046\u3057\u3066\u3082\u65e5\u672c\u8a9e\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306fPHP5.6\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u304c\u826f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001PHP\u306e\u8a2d\u5b9a\u3092\u5c11\u3057\u5909\u66f4\u3057\u307e\u3059\u3002<br \/>\nMagento2\u306f\u304b\u306a\u308a\u30e1\u30e2\u30ea\u3092\u5fc5\u8981\u3068\u3059\u308b\u305f\u3081\u3001\u6700\u4f4e\u3067\u30821G\u4ee5\u4e0a\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<code>vi \/etc\/php.ini<br \/>\nmemory_limit = 64M<br \/>\n\u2193<br \/>\nmemory_limit = 1024M<\/code><\/p>\n<p><code><\/code><br \/>\n\u6e96\u5099\u304c\u3067\u304d\u305f\u3089Apache\u3092\u518d\u8d77\u52d5\u3057\u3066\u3001php\u304c\u52d5\u3044\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n<code>systemctl restart httpd<br \/>\nvi \/var\/www\/html\/info.php<\/code><\/p>\n<p><code><\/code><br \/>\n\u4e0b\u8a18\u3092\u8a18\u8ff0\u3057\u3066\u3001<br \/>\n<code>&lt;?php phpinfo();<\/code><br \/>\n\u30d6\u30e9\u30a6\u30b6\u304b\u3089\/info.php\u3092\u78ba\u8a8d\u3057\u3066\u4e0b\u8a18\u306e\u3088\u3046\u306a\u753b\u50cf\u304c\u51fa\u305f\u3089\u6210\u529f\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9533\" src=\"https:\/\/nxpg.net\/blog\/tech\/wp-content\/uploads\/sites\/7\/2017\/03\/phpinfo-.png\" alt=\"\" width=\"989\" height=\"890\" \/><\/p>\n<h2>MySQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>PHP\u306e\u6b21\u306fMySQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\nMariaDB\u306fMagento\u3067\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u3001\u4eca\u56de\u306fMySQL\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<code>sudo rpm -ivh http:\/\/dev.mysql.com\/get\/mysql57-community-release-el7-7.noarch.rpm<br \/>\nsudo yum install -y mysql-community-server<\/code><\/p>\n<p><code><\/code><br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\n<code>systemctl start mysqld.service<\/code><\/p>\n<p><code><\/code><br \/>\n\u307e\u305f\u81ea\u52d5\u3067\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u767b\u9332\u3057\u307e\u3059\u3002<br \/>\n<code>systemctl enable mysqld.service<\/code><br \/>\nMySQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3067\u304d\u307e\u3057\u305f\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u7b49\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3068\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>MySQL5.7.6\u4ee5\u964d\u304b\u3089\u3001\u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u4e0b\u8a18\u304b\u3089\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>\n<code>cat \/var\/log\/mysqld.log | grep 'password is generated'<\/code><br \/>\n\u4e00\u756a\u6700\u5f8c\u306e\u6587\u5b57\u5217\u304c\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u3092\u5165\u529b\u3059\u308b\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<br \/>\n<code>mysql_secure_installation<\/code><\/p>\n<p><code><\/code><br \/>\n\u6700\u521d\u306broot\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u805e\u304b\u308c\u307e\u3059\u304c\u3001\u5148\u307b\u3069\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066Enter\u3092\u62bc\u3057\u307e\u3059\u3002<br \/>\n<code>Enter password for user root<\/code><\/p>\n<p><code><\/code><br \/>\n\u3059\u308b\u3068\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\u3092\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<br \/>\n\u305d\u306e\u4ed6\u306b\u3082\u8272\u3005\u805e\u304b\u308c\u307e\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8a2d\u5b9a\u306e\u307e\u307e\u3067\u554f\u984c\u306a\u3044\u306e\u3067\u3001Enter\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>Magento2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u3053\u3053\u307e\u3067\u9577\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3042\u304f\u307e\u3067\u3082Magento\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u4e0b\u6e96\u5099\u3067\u3059\u3002<\/p>\n<p>\u3088\u3046\u3084\u304fMagento\u672c\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u5165\u3063\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306fComposer\u3092\u5229\u7528\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>Magento\u30b5\u30a4\u30c8\u304b\u3089\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u30c4\u30fc\u30eb\u304b\u3089\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u8ee2\u9001\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u4e0a\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u767a\u751f\u3057\u305f\u6642\u306b\u5bfe\u5fdc\u304c\u9762\u5012\u306b\u306a\u308b\u306e\u3067\u4eca\u56de\u306f\u5229\u7528\u3057\u307e\u305b\u3093\u3002<br \/>\n\u307e\u305a\u3001Composer\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<code>curl -sS https:\/\/getcomposer.org\/installer | php<br \/>\nyum install -y curl<br \/>\nmv composer.phar \/usr\/local\/bin\/composer<\/code><\/p>\n<p><code><\/code><br \/>\n\u6b21\u306bMagento Marketplace\u306b\u767b\u9332\u3057\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u53d7\u3051\u53d6\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br \/>\n\u30b5\u30a4\u30c8\u306f\u82f1\u8a9e\u3067\u3059\u304c\u3001\u767b\u9332\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u96e3\u3057\u3044\u7b87\u6240\u306f\u7121\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/marketplace.magento.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/marketplace.magento.com\/<\/a><br \/>\n\u767b\u9332\u3092\u5b8c\u4e86\u3057\u3066SignIn\u3059\u308b\u3068\u3001\u300cMy Account\u300d\u306e\u753b\u9762\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001<br \/>\n\u300cMy Access Keys\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9534\" src=\"https:\/\/nxpg.net\/blog\/tech\/wp-content\/uploads\/sites\/7\/2017\/03\/Magento-Marketplace-My-account.png\" alt=\"\" width=\"1088\" height=\"890\" \/><br \/>\n\u300cMagento2\u300d\u30bf\u30d6\u306e\u300cCreate A New Access Key\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001<br \/>\n\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u3001Access Key\u304c\u767a\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9535\" src=\"https:\/\/nxpg.net\/blog\/tech\/wp-content\/uploads\/sites\/7\/2017\/03\/My-Access-Keys.png\" alt=\"\" width=\"1088\" height=\"890\" \/><br \/>\nAccess Key\u304c\u767a\u884c\u3055\u308c\u305f\u306e\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u30b5\u30fc\u30d0\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\n\u4e0b\u8a18\u306e\u6700\u5f8c\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u30d1\u30b9\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5909\u3048\u305f\u3044\u5834\u5408\u306f\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<code>composer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition \/var\/www\/html\/<\/code><br \/>\nUsername\u304c\u5148\u307b\u3069\u767a\u884c\u3057\u305fAccess Key\u306e\u300cPublic Key\u300d\u3067\u3001Password\u304c\u300cPrivate Key\u300d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Password\u3092\u5165\u529b\u3059\u308b\u3068\u3001Access Key\u306e\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u304b\u805e\u304b\u308c\u307e\u3059\u3002<br \/>\n<code>Do you want to store credentials for repo.magento.com in \/root\/.config\/composer\/auth.json ?<\/code><br \/>\n\u307e\u305f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u7a7a\u3067\u306a\u3044\u5834\u5408\u306b\u3001\u300cProject directory \/var\/www\/html\/ is not empty.\u300d\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u3001\u3042\u3089\u304b\u3058\u3081\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306bMagento2\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n<code>mysql -u root -p<br \/>\ncreate database \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d default character set utf8;<br \/>\ngrant all on \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d.* to \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e6\u30fc\u30b6\u540d@localhost identified by '\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d1\u30b9\u30ef\u30fc\u30c9';<\/code><br \/>\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u3067\u304d\u305f\u3089\u3001Magento\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u305d\u308c\u305e\u308c\u306e\u9805\u76ee\u3092\u81ea\u5206\u306e\u5185\u5bb9\u306b\u5dee\u3057\u66ff\u3048\u3066\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<code>php bin\/magento setup:install \\<br \/>\n--backend-frontname=admin_xxxxx \\ \uff08\u7ba1\u7406\u753b\u9762\uff09<br \/>\n--db-host=localhost \\<br \/>\n--db-name=xxxxx \\ \uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\uff09<br \/>\n--db-user=xxxxx \\\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e6\u30fc\u30b6\u540d\uff09<br \/>\n--db-password=xxxxx\/ \\\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d1\u30b9\u30ef\u30fc\u30c9\uff09<br \/>\n--base-url=http:\/\/xxxxxxx.vs.sakura.ne.jp\/ \\\uff08URL\uff09<br \/>\n--language=en_US \\<br \/>\n--timezone=Asia\/Tokyo \\<br \/>\n--currency=JPY \\<br \/>\n--admin-user=xxxxx \\\uff08\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\uff09<br \/>\n--admin-password=xxxxx \\\uff08\u7ba1\u7406\u8005\u30d1\u30b9\u30ef\u30fc\u30c9\uff09<br \/>\n--admin-email=xxxxx@xxx.com \\\uff08\u7ba1\u7406\u8005\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\uff09<br \/>\n--admin-firstname=xxxx --admin-lastname=xxxx\uff08\u7ba1\u7406\u8005\u59d3\u540d\uff09<\/code><\/p>\n<p><code><\/code><br \/>\n\u4e00\u70b9\u3001\u6c17\u3092\u3064\u3051\u305f\u3044\u306e\u304c\u300c\uff4canguage\u300d\u3092\u300cJapanese\u300d\u306b\u3059\u308b\u3068\u3001\u7ba1\u7406\u753b\u9762\u304c\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br \/>\n\u3067\u3059\u306e\u3067\u300cEnglish\u300d\u306b\u3057\u3066\u304a\u3044\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u65e5\u672c\u8a9e\u3078\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3092\u30aa\u30b9\u30b9\u30e1\u3057\u307e\u3059\u3002<\/p>\n<h2>\u6700\u5f8c\u306b<\/h2>\n<p>\u4ee5\u4e0a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u304c\u5b8c\u4e86\u306a\u306e\u3067\u3059\u304c\u3001\u79c1\u306e\u5834\u5408\u306b\u3053\u308c\u3067\u30d6\u30e9\u30a6\u30b6\u306b\u63a5\u7d9a\u3057\u3066\u3082500\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>log\u304b\u3089\u30a8\u30e9\u30fc\u5185\u5bb9\u3092\u898b\u308b\u3068\u3001\u4e0b\u8a18\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306b\u66f8\u304d\u8fbc\u307f\u6a29\u9650\u3092\u4e0e\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n<code>- \/app\/etc\/<br \/>\n- \/var\/<br \/>\n- \/pub\/media\/<br \/>\n- \/pub\/static\/<\/code><\/p>\n<p><code><\/code><br \/>\n\u3053\u306e\u3088\u3046\u306b\u624b\u9806\u901a\u308a\u306b\u884c\u3063\u3066\u3082\u4e0a\u624b\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u305d\u306e\u969b\u306flog\u3092\u78ba\u8a8d\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u304c\u7121\u3044\u305f\u3081\u306b\u30b3\u30f3\u30c6\u30f3\u30c4\u90e8\u5206\u306f\u771f\u3063\u767d\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9541\" src=\"https:\/\/nxpg.net\/blog\/wp-content\/uploads\/2017\/03\/Home-page.png\" alt=\"\" width=\"1001\" height=\"890\" \/><br \/>\n\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3084\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u306b\u306f\u4e0b\u8a18\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<code>php bin\/magento setup:static-content:deploy<\/code><\/p>\n<p><code><br \/>\nphp bin\/magento sampledata:deploy<\/code><\/p>\n<p><code><\/code><br \/>\n\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\u3001\u4ee5\u4e0a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u6b21\u56de\u306fMagento2\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u3001Magento2\u304c\u3069\u306e\u3088\u3046\u306a\u3082\u306e\u304b\u306b\u3064\u3044\u3066\u3001\u66f8\u304d\u307e\u3057\u305f\u3002 \u4eca\u56de\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u3001\u5b9f\u969b\u306b\u753b\u9762\u3092\u898b\u308b\u3068\u3053\u308d\u307e\u3067\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u4f5c\u696d\u3092\u884c\u3063\u305f\u306e\u306f2017\u5e743\u6708\u306b\u306a\u308a\u307e\u3059\u3002 \u6642\u671f\u3084\u74b0\u5883\u306e\u9055\u3044\u3067\u540c\u3058\u3088\u3046\u306b\u4f5c\u696d\u3092\u3057\u3066 [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":9540,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts\/9527"}],"collection":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9527"}],"version-history":[{"count":3,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts\/9527\/revisions"}],"predecessor-version":[{"id":13556,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts\/9527\/revisions\/13556"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/media\/9540"}],"wp:attachment":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}