{"id":55,"date":"2014-12-17T21:22:29","date_gmt":"2014-12-17T12:22:29","guid":{"rendered":"http:\/\/vicsfactory.com\/?p=55"},"modified":"2019-10-28T19:43:26","modified_gmt":"2019-10-28T10:43:26","slug":"centos-%e3%80%8chttpd%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%83%bb%e8%a8%ad%e5%ae%9a%e3%80%8d","status":"publish","type":"post","link":"https:\/\/vicsfactory.com\/?p=55","title":{"rendered":"CentOS7 \u300chttpd+php\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u300d"},"content":{"rendered":"<p>httpd+php\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a<\/p>\n<p>\u203bCentOS7\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u300c<a href=\"http:\/\/centossrv.com\" target=\"_blank\" rel=\"noopener\">CentOS\u3067\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u69d8<\/a>\u300d\u3092\u53c2\u8003\u306b\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u25cfhttpd\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y install httpd<br \/>\n# yum -y install php php-mbstring php-mysql php-gd<\/p>\n<p>\u30fbWordPress\u7b49\u306ePHP\u4e0a\u3067jpg,png\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u5834\u5408<br \/>\nGD\u30e9\u30a4\u30d6\u30e9\u30ea\u7fa4\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u78ba\u8a8d\uff08\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308c\u3070\u8868\u793a\u3055\u308c\u308b\uff09<br \/>\n# rpm -qa gd<br \/>\n# rpm -qa | grep -e freetype -e freetype-devel<br \/>\n# rpm -qa | grep -e libjpeg -e libjpeg-devel<br \/>\n# rpm -qa | grep -e libpng -e libpng-devel<\/p>\n<p>\u30fb\u4e0a\u8a18\u3067\u672a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u3082\u306e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y install gd<br \/>\n# yum -y install freetype<br \/>\n# yum -y install freetype-devel<br \/>\n# yum -y install libjpeg<br \/>\n# yum -y install libjpeg-devel<br \/>\n# yum -y install libpng<br \/>\n# yum -y install libpng-devel<\/p>\n<p>\u30fb\u753b\u50cfUP\u63b2\u793a\u677f\u7b49\u3001cgi\u4e0a\u3067\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u8868\u793a\u3055\u305b\u308b\u5834\u5408<br \/>\nImage::Magick\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y install ImageMagick<br \/>\n# yum -y install ImageMagick-devel<br \/>\n# yum -y install ImageMagick-perl<\/p>\n<p>\u30fbhttpd\u8a2d\u5b9a<br \/>\n# vi \/etc\/httpd\/conf\/httpd.conf<\/p>\n<p>#ServerName www.example.com:80<br \/>\n\u2193<br \/>\nServerName vicsfactory.com:80 (\u30b5\u30fc\u30d0\u30fc\u540d)<\/p>\n<p>&lt;Directory &#8220;\/var\/www\/html&#8221;&gt;<br \/>\nOptions Indexes FollowSymLinks<br \/>\n\u2193<br \/>\nOptions Includes ExecCGI FollowSymLinks<\/p>\n<p>AllowOverride None<br \/>\n\u2193<br \/>\nAllowOverride All<\/p>\n<p>AddDefaultCharset UTF-8<br \/>\n\u2193<br \/>\n#AddDefaultCharset UTF-8<\/p>\n<p>#AddHandler cgi-script .cgi<br \/>\n\u2193<br \/>\nAddHandler cgi-script .cgi .pl<\/p>\n<p>\u6700\u4e0b\u884c\u306b\u8ffd\u52a0<br \/>\nTraceEnable off<\/p>\n<p>\u30fbperl\u306e\u8a2d\u5b9a\uff08cgi\u30b9\u30af\u30ea\u30d7\u30c8\u3067perl\u3078\u306e\u30d1\u30b9\u304c\/usr\/bin\/perl\u3067\u3082\/usr\/local\/bin\/perl\u3067\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\uff09<br \/>\n# ln -s \/usr\/bin\/perl \/usr\/local\/bin\/perl<\/p>\n<p>\u25cfphp\u8a2d\u5b9a<br \/>\n# vi \/etc\/php.ini<br \/>\n# output_handler =<br \/>\n\u2193<br \/>\noutput_handler = mb_output_handler<\/p>\n<p>memory_limit = 128M<br \/>\n\u2193<br \/>\nmemory_limit = (\u4f7f\u7528\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u5909\u66f4)<\/p>\n<p>post_max_size = 8M<br \/>\n\u2193<br \/>\npost_max_size = (\u4f7f\u7528\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u5909\u66f4)<\/p>\n<p>default_charset = UTF-8<\/p>\n<p>upload_max_filesize = 2M<br \/>\n\u2193<br \/>\nupload_max_filesize = (\u4f7f\u7528\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u5909\u66f4)<\/p>\n<p>mbstring.language = Japanese<\/p>\n<p>mbstring.internal_encoding = UTF-8<\/p>\n<p>mbstring.http_input = pass<\/p>\n<p>mbstring.http_output = pass<\/p>\n<p>mbstring.encoding_translation = Off<\/p>\n<p>mbstring.detect_order = auto<\/p>\n<p>mbstring.substitute_character = none;<\/p>\n<p>\u25cfWEB\u30b5\u30fc\u30d0\u30fc\u4f7f\u7528\u8005(\u30e6\u30fc\u30b6\uff1avic\u3001\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff1a\/var\/www\/html)\u3092\u767b\u9332(SSH\u30ed\u30b0\u30a4\u30f3\u4e0d\u53ef)<br \/>\n\u203b\u3053\u306e\u30e6\u30fc\u30b6\u3092\u30e1\u30fc\u30eb\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u3082\u4f7f\u3046\u5834\u5408\u306f\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u5f8c\u306b\u767b\u9332\u3059\u308b<br \/>\n# user add -s \/sbin\/nologin -d \/var\/www\/html vic<br \/>\n# passwd vic<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\uff08\u4f55\u3082\u8868\u793a\u3055\u308c\u307e\u305b\u3093\uff09<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u5165\u529b\uff08\u4f55\u3082\u8868\u793a\u3055\u308c\u307e\u305b\u3093\uff09<\/p>\n<p>\u25cf\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306e\u6240\u6709\u8005\u3092vic\u306b\u5909\u66f4<br \/>\n# chown -R vic. \/var\/www\/html\/<\/p>\n<p>\u25cfhttpd\u8d77\u52d5<br \/>\n# systemctl start httpd<\/p>\n<p>\u25cfhttpd\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<br \/>\n# systemctl enable httpd<\/p>\n<p>\u203b\u30eb\u30fc\u30bf\u30fc\u3067TCP80\u756a\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u901a\u3059\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>httpd+php\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a \u203bCentOS7\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u300cCentOS\u3067\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u69d8\u300d\u3092\u53c2\u8003\u306b\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 \u25cfhttpd\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb # yum -y insta &hellip; <a href=\"https:\/\/vicsfactory.com\/?p=55\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/55"}],"collection":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":17,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":292,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/292"}],"wp:attachment":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}