{"id":516,"date":"2013-11-24T13:09:23","date_gmt":"2013-11-24T04:09:23","guid":{"rendered":"http:\/\/kurosuke.org\/diary\/?p=516"},"modified":"2013-11-24T13:09:23","modified_gmt":"2013-11-24T04:09:23","slug":"centos%e3%81%ab%e3%81%84%e3%82%8f%e3%82%86%e3%82%8bapm%e3%82%92%e6%8f%83%e3%81%88%e3%82%8b","status":"publish","type":"post","link":"https:\/\/kurosuke.org\/diary\/516","title":{"rendered":"CentOS\u306b\u3044\u308f\u3086\u308bAPM\u3092\u63c3\u3048\u308b"},"content":{"rendered":"<p>\u3068\u3044\u3046\u308f\u3051\u3067\u307e\u305f\u307e\u305f\u7d9a\u304d\u3067\u3059\u3002<br \/>\n\u3044\u308f\u3086\u308bAPM\uff08Apahce+PHP+MySQL\uff09\u3092\u5165\u308c\u307e\u3059\u3002<\/p>\n<p>&#8230;\u3068\u3044\u3063\u3066\u3082\u3084\u3080\u3084\u3080\u3059\u308b\u3060\u3051\u3067\u3059\u3002<br \/>\n\u9069\u5f53\u306b\u5fc5\u8981\u305d\u3046\u306a\u3084\u3064\u3092\u9078\u3093\u3067\u3084\u3080\u3084\u3080\u3057\u307e\u3057\u305f\u3002\uff08\u591a\u5206\u3044\u3089\u306a\u3044\u3082\u306e\u3082\u6df7\u3056\u3063\u3066\u308b\u3057\u3001\u8db3\u308a\u306a\u3044\u3082\u306e\u306f\u52dd\u624b\u306b\u9078\u3093\u3067\u304f\u308c\u308b\u3002\uff09<br \/>\n<!--more--><br \/>\n\u4eca\u56de\u9078\u3093\u3060\u306e\u306f\u3053\u3084\u3064\u3089\u3002<\/p>\n<ul>\n<li>httpd.i686 : Apache HTTP Server\n<li>php.i686 : PHP scripting language for creating dynamic web sites\n<li>php-cli.i686 : Command-line interface for PHP\n<li>php-common.i686 : Common files for PHP\n<li>php-devel.i686 : Files needed for building PHP extensions\n<li>php-mbstring.i686 : A module for PHP applications which need multi-byte string handling\n<li>php-mysql.i686 : A module for PHP applications that use MySQL databases\n<li>php-pear.noarch : PHP Extension and Application Repository framework\n<li>php-pecl-apc.i686 : APC caches and optimizes PHP intermediate code\n<li>php-xml.i686 : A module for PHP applications which use XML\n<li>php-xmlrpc.i686 : A module for PHP applications which use the XML-RPC protocol\n<li>mysql.i686 : MySQL client programs and shared libraries\n<li>mysql-server.i686 : The MySQL server and related files\n<\/ul>\n<p>[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# yum install httpd php php-cli php-common php-devel php-mbstring php-mysql php-pear php-pecl-apc php-xml php-xmlrpc mysql mysql-server<br \/>\nLoaded plugins: fastestmirror<br \/>\nLoading mirror speeds from cached hostfile<br \/>\n * base: ftp.iij.ad.jp<br \/>\n * extras: ftp.iij.ad.jp<br \/>\n * updates: ftp.iij.ad.jp<br \/>\nSetting up Install Process<br \/>\nResolving Dependencies<br \/>\n&#8211;> Running transaction check<br \/>\n&#8212;> Package httpd.i686 0:2.2.15-29.el6.centos will be installed<br \/>\n&#8211;> Processing Dependency: httpd-tools = 2.2.15-29.el6.centos for package: httpd-2.2.15-29.el6.centos.i686<br \/>\n&#8211;> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-29.el6.centos.i686<br \/>\n&#8212;> Package mysql.i686 0:5.1.69-1.el6_4 will be installed<br \/>\n&#8211;> Processing Dependency: mysql-libs = 5.1.69-1.el6_4 for package: mysql-5.1.69-1.el6_4.i686<br \/>\n&#8212;> Package mysql-server.i686 0:5.1.69-1.el6_4 will be installed<br \/>\n&#8211;> Processing Dependency: perl-DBI for package: mysql-server-5.1.69-1.el6_4.i686<br \/>\n&#8211;> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.69-1.el6_4.i686<br \/>\n&#8211;> Processing Dependency: perl(DBI) for package: mysql-server-5.1.69-1.el6_4.i686<br \/>\n&#8212;> Package php.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8212;> Package php-cli.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8212;> Package php-common.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8212;> Package php-devel.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8212;> Package php-mbstring.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8212;> Package php-mysql.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8211;> Processing Dependency: php-pdo(x86-32) for package: php-mysql-5.3.3-23.el6_4.i686<br \/>\n&#8212;> Package php-pear.noarch 1:1.9.4-4.el6 will be installed<br \/>\n&#8212;> Package php-pecl-apc.i686 0:3.1.9-2.el6 will be installed<br \/>\n&#8212;> Package php-xml.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8211;> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24) for package: php-xml-5.3.3-23.el6_4.i686<br \/>\n&#8211;> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22) for package: php-xml-5.3.3-23.el6_4.i686<br \/>\n&#8211;> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18) for package: php-xml-5.3.3-23.el6_4.i686<br \/>\n&#8211;> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13) for package: php-xml-5.3.3-23.el6_4.i686<br \/>\n&#8211;> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11) for package: php-xml-5.3.3-23.el6_4.i686<br \/>\n&#8211;> Processing Dependency: libxslt.so.1 for package: php-xml-5.3.3-23.el6_4.i686<br \/>\n&#8211;> Processing Dependency: libexslt.so.0 for package: php-xml-5.3.3-23.el6_4.i686<br \/>\n&#8212;> Package php-xmlrpc.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8211;> Running transaction check<br \/>\n&#8212;> Package apr-util-ldap.i686 0:1.3.9-3.el6_0.1 will be installed<br \/>\n&#8212;> Package httpd-tools.i686 0:2.2.15-29.el6.centos will be installed<br \/>\n&#8212;> Package libxslt.i686 0:1.1.26-2.el6_3.1 will be installed<br \/>\n&#8212;> Package mysql-libs.i686 0:5.1.66-2.el6_3 will be updated<br \/>\n&#8212;> Package mysql-libs.i686 0:5.1.69-1.el6_4 will be an update<br \/>\n&#8212;> Package perl-DBD-MySQL.i686 0:4.013-3.el6 will be installed<br \/>\n&#8212;> Package perl-DBI.i686 0:1.609-4.el6 will be installed<br \/>\n&#8212;> Package php-pdo.i686 0:5.3.3-23.el6_4 will be installed<br \/>\n&#8211;> Finished Dependency Resolution<\/p>\n<p>Dependencies Resolved<\/p>\n<p>================================================================================================================================================================<br \/>\n Package                                 Arch                            Version                                         Repository                        Size<br \/>\n================================================================================================================================================================<br \/>\nInstalling:<br \/>\n httpd                                   i686                            2.2.15-29.el6.centos                            updates                          828 k<br \/>\n mysql                                   i686                            5.1.69-1.el6_4                                  updates                          917 k<br \/>\n mysql-server                            i686                            5.1.69-1.el6_4                                  updates                          8.8 M<br \/>\n php                                     i686                            5.3.3-23.el6_4                                  updates                          1.1 M<br \/>\n php-cli                                 i686                            5.3.3-23.el6_4                                  updates                          2.2 M<br \/>\n php-common                              i686                            5.3.3-23.el6_4                                  updates                          525 k<br \/>\n php-devel                               i686                            5.3.3-23.el6_4                                  updates                          507 k<br \/>\n php-mbstring                            i686                            5.3.3-23.el6_4                                  updates                          454 k<br \/>\n php-mysql                               i686                            5.3.3-23.el6_4                                  updates                           78 k<br \/>\n php-pear                                noarch                          1:1.9.4-4.el6                                   base                             393 k<br \/>\n php-pecl-apc                            i686                            3.1.9-2.el6                                     base                              96 k<br \/>\n php-xml                                 i686                            5.3.3-23.el6_4                                  updates                          101 k<br \/>\n php-xmlrpc                              i686                            5.3.3-23.el6_4                                  updates                           53 k<br \/>\nInstalling for dependencies:<br \/>\n apr-util-ldap                           i686                            1.3.9-3.el6_0.1                                 base                              15 k<br \/>\n httpd-tools                             i686                            2.2.15-29.el6.centos                            updates                           73 k<br \/>\n libxslt                                 i686                            1.1.26-2.el6_3.1                                base                             451 k<br \/>\n perl-DBD-MySQL                          i686                            4.013-3.el6                                     base                             134 k<br \/>\n perl-DBI                                i686                            1.609-4.el6                                     base                             705 k<br \/>\n php-pdo                                 i686                            5.3.3-23.el6_4                                  updates                           74 k<br \/>\nUpdating for dependencies:<br \/>\n mysql-libs                              i686                            5.1.69-1.el6_4                                  updates                          1.2 M<\/p>\n<p>Transaction Summary<br \/>\n================================================================================================================================================================<br \/>\nInstall      19 Package(s)<br \/>\nUpgrade       1 Package(s)<\/p>\n<p>Total download size: 19 M<br \/>\nIs this ok [y\/N]: y<br \/>\nDownloading Packages:<br \/>\n(1\/20): apr-util-ldap-1.3.9-3.el6_0.1.i686.rpm                                                                                           |  15 kB     00:00<br \/>\n(2\/20): httpd-2.2.15-29.el6.centos.i686.rpm                                                                                              | 828 kB     00:00<br \/>\n(3\/20): httpd-tools-2.2.15-29.el6.centos.i686.rpm                                                                                        |  73 kB     00:00<br \/>\n(4\/20): libxslt-1.1.26-2.el6_3.1.i686.rpm                                                                                                | 451 kB     00:00<br \/>\n(5\/20): mysql-5.1.69-1.el6_4.i686.rpm                                                                                                    | 917 kB     00:00<br \/>\n(6\/20): mysql-libs-5.1.69-1.el6_4.i686.rpm                                                                                               | 1.2 MB     00:00<br \/>\n(7\/20): mysql-server-5.1.69-1.el6_4.i686.rpm                                                                                             | 8.8 MB     00:00<br \/>\n(8\/20): perl-DBD-MySQL-4.013-3.el6.i686.rpm                                                                                              | 134 kB     00:00<br \/>\n(9\/20): perl-DBI-1.609-4.el6.i686.rpm                                                                                                    | 705 kB     00:00<br \/>\n(10\/20): php-5.3.3-23.el6_4.i686.rpm                                                                                                     | 1.1 MB     00:00<br \/>\n(11\/20): php-cli-5.3.3-23.el6_4.i686.rpm                                                                                                 | 2.2 MB     00:00<br \/>\n(12\/20): php-common-5.3.3-23.el6_4.i686.rpm                                                                                              | 525 kB     00:00<br \/>\n(13\/20): php-devel-5.3.3-23.el6_4.i686.rpm                                                                                               | 507 kB     00:00<br \/>\n(14\/20): php-mbstring-5.3.3-23.el6_4.i686.rpm                                                                                            | 454 kB     00:00<br \/>\n(15\/20): php-mysql-5.3.3-23.el6_4.i686.rpm                                                                                               |  78 kB     00:00<br \/>\n(16\/20): php-pdo-5.3.3-23.el6_4.i686.rpm                                                                                                 |  74 kB     00:00<br \/>\n(17\/20): php-pear-1.9.4-4.el6.noarch.rpm                                                                                                 | 393 kB     00:00<br \/>\n(18\/20): php-pecl-apc-3.1.9-2.el6.i686.rpm                                                                                               |  96 kB     00:00<br \/>\n(19\/20): php-xml-5.3.3-23.el6_4.i686.rpm                                                                                                 | 101 kB     00:00<br \/>\n(20\/20): php-xmlrpc-5.3.3-23.el6_4.i686.rpm                                                                                              |  53 kB     00:00<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nTotal                                                                                                                           6.0 MB\/s |  19 MB     00:03<br \/>\nRunning rpm_check_debug<br \/>\nRunning Transaction Test<br \/>\nTransaction Test Succeeded<br \/>\nRunning Transaction<br \/>\n  Installing : php-common-5.3.3-23.el6_4.i686                                                                                                              1\/21<br \/>\n  Updating   : mysql-libs-5.1.69-1.el6_4.i686                                                                                                              2\/21<br \/>\n  Installing : php-cli-5.3.3-23.el6_4.i686                                                                                                                 3\/21<br \/>\n  Installing : perl-DBI-1.609-4.el6.i686                                                                                                                   4\/21<br \/>\n  Installing : 1:php-pear-1.9.4-4.el6.noarch                                                                                                               5\/21<br \/>\n  Installing : perl-DBD-MySQL-4.013-3.el6.i686                                                                                                             6\/21<br \/>\n  Installing : mysql-5.1.69-1.el6_4.i686                                                                                                                   7\/21<br \/>\n  Installing : php-pdo-5.3.3-23.el6_4.i686                                                                                                                 8\/21<br \/>\n  Installing : httpd-tools-2.2.15-29.el6.centos.i686                                                                                                       9\/21<br \/>\n  Installing : libxslt-1.1.26-2.el6_3.1.i686                                                                                                              10\/21<br \/>\n  Installing : apr-util-ldap-1.3.9-3.el6_0.1.i686                                                                                                         11\/21<br \/>\n  Installing : httpd-2.2.15-29.el6.centos.i686                                                                                                            12\/21<br \/>\n  Installing : php-5.3.3-23.el6_4.i686                                                                                                                    13\/21<br \/>\n  Installing : php-devel-5.3.3-23.el6_4.i686                                                                                                              14\/21<br \/>\n  Installing : php-xml-5.3.3-23.el6_4.i686                                                                                                                15\/21<br \/>\n  Installing : php-mysql-5.3.3-23.el6_4.i686                                                                                                              16\/21<br \/>\n  Installing : mysql-server-5.1.69-1.el6_4.i686                                                                                                           17\/21<br \/>\n  Installing : php-pecl-apc-3.1.9-2.el6.i686                                                                                                              18\/21<br \/>\n  Installing : php-xmlrpc-5.3.3-23.el6_4.i686                                                                                                             19\/21<br \/>\n  Installing : php-mbstring-5.3.3-23.el6_4.i686                                                                                                           20\/21<br \/>\n  Cleanup    : mysql-libs-5.1.66-2.el6_3.i686                                                                                                             21\/21<br \/>\n  Verifying  : php-mysql-5.3.3-23.el6_4.i686                                                                                                               1\/21<br \/>\n  Verifying  : php-xml-5.3.3-23.el6_4.i686                                                                                                                 2\/21<br \/>\n  Verifying  : php-common-5.3.3-23.el6_4.i686                                                                                                              3\/21<br \/>\n  Verifying  : apr-util-ldap-1.3.9-3.el6_0.1.i686                                                                                                          4\/21<br \/>\n  Verifying  : perl-DBI-1.609-4.el6.i686                                                                                                                   5\/21<br \/>\n  Verifying  : php-xmlrpc-5.3.3-23.el6_4.i686                                                                                                              6\/21<br \/>\n  Verifying  : perl-DBD-MySQL-4.013-3.el6.i686                                                                                                             7\/21<br \/>\n  Verifying  : httpd-2.2.15-29.el6.centos.i686                                                                                                             8\/21<br \/>\n  Verifying  : php-cli-5.3.3-23.el6_4.i686                                                                                                                 9\/21<br \/>\n  Verifying  : 1:php-pear-1.9.4-4.el6.noarch                                                                                                              10\/21<br \/>\n  Verifying  : mysql-5.1.69-1.el6_4.i686                                                                                                                  11\/21<br \/>\n  Verifying  : php-devel-5.3.3-23.el6_4.i686                                                                                                              12\/21<br \/>\n  Verifying  : mysql-libs-5.1.69-1.el6_4.i686                                                                                                             13\/21<br \/>\n  Verifying  : php-mbstring-5.3.3-23.el6_4.i686                                                                                                           14\/21<br \/>\n  Verifying  : mysql-server-5.1.69-1.el6_4.i686                                                                                                           15\/21<br \/>\n  Verifying  : libxslt-1.1.26-2.el6_3.1.i686                                                                                                              16\/21<br \/>\n  Verifying  : httpd-tools-2.2.15-29.el6.centos.i686                                                                                                      17\/21<br \/>\n  Verifying  : php-5.3.3-23.el6_4.i686                                                                                                                    18\/21<br \/>\n  Verifying  : php-pdo-5.3.3-23.el6_4.i686                                                                                                                19\/21<br \/>\n  Verifying  : php-pecl-apc-3.1.9-2.el6.i686                                                                                                              20\/21<br \/>\n  Verifying  : mysql-libs-5.1.66-2.el6_3.i686                                                                                                             21\/21<\/p>\n<p>Installed:<br \/>\n  httpd.i686 0:2.2.15-29.el6.centos      mysql.i686 0:5.1.69-1.el6_4           mysql-server.i686 0:5.1.69-1.el6_4      php.i686 0:5.3.3-23.el6_4<br \/>\n  php-cli.i686 0:5.3.3-23.el6_4          php-common.i686 0:5.3.3-23.el6_4      php-devel.i686 0:5.3.3-23.el6_4         php-mbstring.i686 0:5.3.3-23.el6_4<br \/>\n  php-mysql.i686 0:5.3.3-23.el6_4        php-pear.noarch 1:1.9.4-4.el6         php-pecl-apc.i686 0:3.1.9-2.el6         php-xml.i686 0:5.3.3-23.el6_4<br \/>\n  php-xmlrpc.i686 0:5.3.3-23.el6_4<\/p>\n<p>Dependency Installed:<br \/>\n  apr-util-ldap.i686 0:1.3.9-3.el6_0.1     httpd-tools.i686 0:2.2.15-29.el6.centos     libxslt.i686 0:1.1.26-2.el6_3.1     perl-DBD-MySQL.i686 0:4.013-3.el6<br \/>\n  perl-DBI.i686 0:1.609-4.el6              php-pdo.i686 0:5.3.3-23.el6_4<\/p>\n<p>Dependency Updated:<br \/>\n  mysql-libs.i686 0:5.1.69-1.el6_4<\/p>\n<p>Complete!<br \/>\n[root@centos ~]#<br \/>\n[\/cc]<\/p>\n<p>\u4eca\u56de\u306f\u3053\u306e\u3088\u3046\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# httpd -v<br \/>\nServer version: Apache\/2.2.15 (Unix)<br \/>\nServer built:   Aug 13 2013 17:27:11<br \/>\n[root@centos ~]# php -v<br \/>\nPHP 5.3.3 (cli) (built: Jul 12 2013 20:21:47)<br \/>\nCopyright (c) 1997-2010 The PHP Group<br \/>\nZend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies<br \/>\n[root@centos ~]# mysql &#8211;version<br \/>\nmysql  Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (i386) using readline 5.1<br \/>\n[root@centos ~]#<br \/>\n[\/cc]<\/p>\n<p>\u3046\u3063\u304b\u308a\u5fd8\u308c\u3066\u307e\u3057\u305f\u304c\u4eca\u56de\u306e\u76ee\u7684\u306fComposer\u3092\u4f7f\u3046\u3053\u3068\u3067\u3059\u3002<br \/>\nComposer\u306fPHP5.3.2\u4ee5\u4e0a\u304c\u5fc5\u9808\u3089\u3057\u3044\u306e\u3067\u5371\u306a\u304b\u3063\u305f\u3067\u3059\u3002<\/p>\n<p>\u3082\u308d\u3082\u308d\u3092\u8d77\u52d5\u3059\u308b\u524d\u306b\u3002<br \/>\nphp.ini\u3067\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092Asia\/Tokyo\u306b\u3057\u3001<br \/>\nmy.cnf\u3067\u6587\u5b57\u30b3\u30fc\u30c9\u3092UTF-8\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\/etc\/php.ini<br \/>\n[cc lang=&#8221;ini&#8221;]<br \/>\n[Date]<br \/>\ndata.timezone = Asia\/Tokyo<br \/>\n[\/cc]<\/p>\n<p>\/etc\/my.cnf<br \/>\n[cc lang=&#8221;ini&#8221;]<br \/>\n[mysqld]<br \/>\ncharacter-set-server = utf8<br \/>\n[mysql]<br \/>\ndefault-character-set = utf8<br \/>\n[\/cc]<\/p>\n<p>\u8d77\u52d5\u3068\u81ea\u52d5\u8d77\u52d5\u3082\u8a2d\u5b9a\u3002<\/p>\n<p>Apache<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# \/etc\/init.d\/httpd start<br \/>\nhttpd \u3092\u8d77\u52d5\u4e2d: httpd: apr_sockaddr_info_get() failed for centos.kurosuke.org<br \/>\nhttpd: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.0.1 for ServerName<br \/>\n                                                           [  OK  ]<br \/>\n[root@centos ~]#<br \/>\n[\/cc]<\/p>\n<p>MySQL<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# chkconfig httpd on<br \/>\n[root@centos ~]# \/etc\/init.d\/mysqld start<br \/>\nMySQL \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u521d\u671f\u5316\u4e2d:  WARNING: The host &#8216;centos.kurosuke.org&#8217; could not be looked up with resolveip.<br \/>\nThis probably means that your libc libraries are not 100 % compatible<br \/>\nwith this binary MySQL version. The MySQL daemon, mysqld, should work<br \/>\nnormally with the exception that host name resolving will not work.<br \/>\nThis means that you should use IP addresses instead of hostnames<br \/>\nwhen specifying MySQL privileges !<br \/>\nInstalling MySQL system tables&#8230;<br \/>\nOK<br \/>\nFilling help tables&#8230;<br \/>\nOK<\/p>\n<p>To start mysqld at boot time you have to copy<br \/>\nsupport-files\/mysql.server to the right place for your system<\/p>\n<p>PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !<br \/>\nTo do so, start the server, then issue the following commands:<\/p>\n<p>\/usr\/bin\/mysqladmin -u root password &#8216;new-password&#8217;<br \/>\n\/usr\/bin\/mysqladmin -u root -h centos.kurosuke.org password &#8216;new-password&#8217;<\/p>\n<p>Alternatively you can run:<br \/>\n\/usr\/bin\/mysql_secure_installation<\/p>\n<p>which will also give you the option of removing the test<br \/>\ndatabases and anonymous user created by default.  This is<br \/>\nstrongly recommended for production servers.<\/p>\n<p>See the manual for more instructions.<\/p>\n<p>You can start the MySQL daemon with:<br \/>\ncd \/usr ; \/usr\/bin\/mysqld_safe &#038;<\/p>\n<p>You can test the MySQL daemon with mysql-test-run.pl<br \/>\ncd \/usr\/mysql-test ; perl mysql-test-run.pl<\/p>\n<p>Please report any problems with the \/usr\/bin\/mysqlbug script!<\/p>\n<p>                                                           [  OK  ]<br \/>\nmysqld \u3092\u8d77\u52d5\u4e2d:                                           [  OK  ]<br \/>\n[root@centos ~]# chkconfig mysqld on<br \/>\n[\/cc]<\/p>\n<p>\u306a\u3093\u304bMySQL\u8d77\u52d5\u6642\u306b\u6012\u3089\u308c\u3066\u308b\u3051\u3069\u3068\u308a\u3042\u3048\u305a\u6c17\u306b\u3057\u306a&#8230;\u3057\u3066\u304a\u3053\u3046\u3002<br \/>\n\/etc\/hosts\u306b\u8ffd\u8a18\u3002<br \/>\n[cc lang=&#8221;ini&#8221;]<br \/>\n127.0.0.1 centos.kurosuke.org<br \/>\n[\/cc]<\/p>\n<p>\u5ff5\u306e\u305f\u3081\u518d\u8d77\u52d5<\/p>\n<p>Apache<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# \/etc\/init.d\/httpd restart<br \/>\nhttpd \u3092\u505c\u6b62\u4e2d:                                            [  OK  ]<br \/>\nhttpd \u3092\u8d77\u52d5\u4e2d: httpd: Could not reliably determine the server&#8217;s fully qualified domain name, using centos.kurosuke.org for ServerName<br \/>\n                                                           [  OK  ]<br \/>\n[root@centos ~]#<br \/>\n[\/cc]<\/p>\n<p>MySQL<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# \/etc\/init.d\/mysqld restart<br \/>\nmysqld \u3092\u505c\u6b62\u4e2d:                                           [  OK  ]<br \/>\nmysqld \u3092\u8d77\u52d5\u4e2d:                                           [  OK  ]<br \/>\n[root@centos ~]#<br \/>\n[\/cc]<\/p>\n<p>MySQL\u306e\u8a2d\u5b9a\u78ba\u8a8d\u3068root\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u8a2d\u5b9a<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# mysql -uroot -p<br \/>\nEnter password:<br \/>\nWelcome to the MySQL monitor.  Commands end with ; or \\g.<br \/>\nYour MySQL connection id is 2<br \/>\nServer version: 5.1.69 Source distribution<\/p>\n<p>Copyright (c) 2000, 2013, Oracle and\/or its affiliates. All rights reserved.<\/p>\n<p>Oracle is a registered trademark of Oracle Corporation and\/or its<br \/>\naffiliates. Other names may be trademarks of their respective<br \/>\nowners.<\/p>\n<p>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<\/p>\n<p>mysql> show variables like &#8216;character_set%&#8217;;<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| Variable_name            | Value                      |<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| character_set_client     | utf8                       |<br \/>\n| character_set_connection | utf8                       |<br \/>\n| character_set_database   | utf8                       |<br \/>\n| character_set_filesystem | binary                     |<br \/>\n| character_set_results    | utf8                       |<br \/>\n| character_set_server     | utf8                       |<br \/>\n| character_set_system     | utf8                       |<br \/>\n| character_sets_dir       | \/usr\/share\/mysql\/charsets\/ |<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n8 rows in set (0.00 sec)<\/p>\n<p>mysql> use mysql;<br \/>\nReading table information for completion of table and column names<br \/>\nYou can turn off this feature to get a quicker startup with -A<\/p>\n<p>Database changed<br \/>\nmysql> update user set password=password(&#8216;******&#8217;) where user = &#8216;root&#8217;;<br \/>\nQuery OK, 3 rows affected (0.00 sec)<br \/>\nRows matched: 3  Changed: 3  Warnings: 0<\/p>\n<p>mysql> flush privileges;<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>mysql> exit;<br \/>\nBye<br \/>\n[root@centos ~]#<br \/>\n[\/cc]<\/p>\n<p>Apache\u306b\u3064\u306a\u3044\u3067\u307f\u308b\u3002<br \/>\n\u30db\u30b9\u30c8\u30de\u30b7\u30f3\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089http:\/\/localhost:8080\u306b\u30a2\u30af\u30bb\u30b9\uff01<\/p>\n<p>&#8230;<br \/>\n&#8230;..<br \/>\n&#8230;&#8230;&#8230;..?<\/p>\n<p>\u3064\u306a\u304c\u3089\u306a\u3044\u3002<\/p>\n<p>iptables\u306e\u7de8\u96c6\u3002<br \/>\n\/etc\/sysconfig\/iptables<br \/>\n[cc lang=&#8221;ini&#8221;]<br \/>\n-A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 80 -j ACCEPT<br \/>\n[\/cc]<br \/>\niptables\u306e\u518d\u8d77\u52d5<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# \/etc\/init.d\/iptables restart<br \/>\niptables: \u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30eb\u30fc\u30eb\u3092\u6d88\u53bb\u4e2d:                  [  OK  ]<br \/>\niptables: \u30c1\u30a7\u30a4\u30f3\u3092\u30dd\u30ea\u30b7\u30fc ACCEPT \u3078\u8a2d\u5b9a\u4e2dfilter         [  OK  ]<br \/>\niptables: \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u53d6\u308a\u5916\u3057\u4e2d:                          [  OK  ]<br \/>\niptables: \u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30eb\u30fc\u30eb\u3092\u9069\u7528\u4e2d:                  [  OK  ]<br \/>\n[root@centos ~]#<br \/>\n[\/cc]<\/p>\n<p>\u30db\u30b9\u30c8\u30de\u30b7\u30f3\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089http:\/\/localhost:8080\u306b\u30a2\u30af\u30bb\u30b9\uff01\uff082\u56de\u76ee\uff09<\/p>\n<blockquote><p>\nApache 2 Test Page<br \/>\npowered by CentOS\n<\/p><\/blockquote>\n<p>\u304a\uff4b\uff0e<\/p>\n<p>PHP\u306e\u78ba\u8a8d\u3002<br \/>\n[cc lang=&#8221;teraterm&#8221;]<br \/>\n[root@centos ~]# cd \/var\/www\/html\/<br \/>\n[root@centos html]# echo &#8220;<?php phpinfo();\" > phpinfo.php<br \/>\n[root@centos html]#<br \/>\n[\/cc]<\/p>\n<p>\u30db\u30b9\u30c8\u30de\u30b7\u30f3\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089http:\/\/localhost:8080\/phpinfo.php\u306b\u30a2\u30af\u30bb\u30b9\uff01<\/p>\n<p>\u304a\uff4b\uff0e<\/p>\n<p>\u3068\u3001\u3053\u3093\u306a\u304b\u3093\u3058\u3067\u3002<br \/>\n\u3053\u308c\u3067\u3068\u308a\u3042\u3048\u305a\u958b\u767a\u74b0\u5883\u306e\u30d9\u30fc\u30b9\u306f\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308d\u305d\u308d\u76ee\u7684\u3092\u898b\u5931\u3044\u59cb\u3081\u3066\u3044\u307e\u3059\u304c\u3001\u3082\u3046\u3061\u3087\u3063\u3068\u7d9a\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3068\u3044\u3046\u308f\u3051\u3067\u307e\u305f\u307e\u305f\u7d9a\u304d\u3067\u3059\u3002 \u3044\u308f\u3086\u308bAPM\uff08Apahce+PHP+MySQL &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/kurosuke.org\/diary\/516\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[56],"tags":[75,12],"jetpack_publicize_connections":[],"views":510,"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p49qdv-8k","jetpack_likes_enabled":false,"jetpack-related-posts":[{"id":521,"url":"https:\/\/kurosuke.org\/diary\/521","url_meta":{"origin":516,"position":0},"title":"CentOS\u306bPHP5.5\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb","author":"xxxkurosukexxx","date":"2013\/12\/06","format":false,"excerpt":"\u5148\u4eba\u306e\u77e5\u6075\u306b\u5f93\u3046\u3060\u3051\u3067\u3059\u304c...\u3002 CentOS\u306bPHP5.5\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb - Qiita [\u30ad\u30fc\u2026","rel":"","context":"\u6280\u8853\u7cfb\u8a18\u4e8b","block_context":{"text":"\u6280\u8853\u7cfb\u8a18\u4e8b","link":"https:\/\/kurosuke.org\/diary\/category\/tech"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":377,"url":"https:\/\/kurosuke.org\/diary\/377","url_meta":{"origin":516,"position":1},"title":"jQuery.post\u3068php\u3068mySQL\u3068\u79c1\u3002","author":"xxxkurosukexxx","date":"2011\/12\/24","format":false,"excerpt":"\u30bf\u30a4\u30c8\u30eb\u9577\u3044\u3088\u81ea\u91cd\u3057\u308d\uff01 \u4ed5\u4e8b\u3067\u305d\u3093\u306a\u3053\u3068\u3092\u3059\u308b\u6a5f\u4f1a\u304c\u3042\u3063\u305f\u306e\u3067\u899a\u3048\u66f8\u304d\u3002 Ajax\u3067\u88cf\u3067\u901a\u4fe1\u3057\u3066\u30da\u2026","rel":"","context":"\u65e5\u8a18","block_context":{"text":"\u65e5\u8a18","link":"https:\/\/kurosuke.org\/diary\/category\/diary"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":513,"url":"https:\/\/kurosuke.org\/diary\/513","url_meta":{"origin":516,"position":2},"title":"XAMPP\u306bComposer\u3092\u5165\u308c\u305f\u8a71","author":"xxxkurosukexxx","date":"2013\/11\/24","format":false,"excerpt":"\u3061\u3087\u3063\u3068\u8a66\u3057\u305f\u3044\u3053\u3068\u304c\u3042\u3063\u3066Windows7\u306b\u5165\u308c\u305fXAMPP\u306ePHP\u306bComposer\u3092\u5165\u308c\u307e\u3057\u305f\u2026","rel":"","context":"\u6280\u8853\u7cfb\u8a18\u4e8b","block_context":{"text":"\u6280\u8853\u7cfb\u8a18\u4e8b","link":"https:\/\/kurosuke.org\/diary\/category\/tech"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":517,"url":"https:\/\/kurosuke.org\/diary\/517","url_meta":{"origin":516,"position":3},"title":"\u3044\u3088\u3044\u3088Composer\u3068\u304b\u3092\u5165\u308c\u3066\u74b0\u5883\u3092\u4ed5\u4e0a\u3052\u308b\u306e\u5dfb","author":"xxxkurosukexxx","date":"2013\/11\/24","format":false,"excerpt":"\u3060\u3044\u3076\u75b2\u308c\u3066\u304d\u307e\u3057\u305f\u304c\u3042\u3068\u3061\u3087\u3063\u3068\u3067\u3059\u3002 \u591a\u5206\u3053\u308c\u304c\u6700\u7d42\u56de\u3002 Composer\u3068\u4eca\u56de\u4f7f\u3044\u305f\u304b\u3063\u305fro\u2026","rel":"","context":"\u6280\u8853\u7cfb\u8a18\u4e8b","block_context":{"text":"\u6280\u8853\u7cfb\u8a18\u4e8b","link":"https:\/\/kurosuke.org\/diary\/category\/tech"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":514,"url":"https:\/\/kurosuke.org\/diary\/514","url_meta":{"origin":516,"position":4},"title":"\u7d50\u5c40\u3081\u3093\u3069\u304f\u3055\u3044\u306e\u3067CentOS\u3092\u69cb\u7bc9\u3002","author":"xxxkurosukexxx","date":"2013\/11\/24","format":false,"excerpt":"\u524d\u56de\u3044\u308d\u3044\u308d\u3068\u3081\u3093\u3069\u304f\u3055\u304f\u306a\u3063\u305f\u306e\u3067CentOS\u3092\u3044\u308c\u308b\u3053\u3068\u306b\u3057\u305f\u30dc\u30af\u3067\u3059\u3002 \u306a\u306e\u3067\u3001\u3055\u3063\u305d\u304f\u5165\u308c\u307e\u2026","rel":"","context":"\u6280\u8853\u7cfb\u8a18\u4e8b","block_context":{"text":"\u6280\u8853\u7cfb\u8a18\u4e8b","link":"https:\/\/kurosuke.org\/diary\/category\/tech"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":82,"url":"https:\/\/kurosuke.org\/diary\/82","url_meta":{"origin":516,"position":5},"title":"\u79fb\u884c\u4f5c\u696d\u4e2d\u3067\u3059\u3002","author":"xxxkurosukexxx","date":"2010\/05\/20","format":false,"excerpt":"\u30b5\u30a4\u30c8\u3092\u4e38\u3054\u3068Wordpress\u306b\u79fb\u884c\u3059\u308b\u4f5c\u696d\u3092\u88cf\u3067\u884c\u3063\u3066\u307e\u3059\u3002 \u3053\u306e\u65e5\u8a18\u306e\u4e2d\u8eab\u3092\u79fb\u52d5\u3055\u305b\u308b\u306e\u304c\u3081\u3093\u2026","rel":"","context":"\u65e5\u8a18","block_context":{"text":"\u65e5\u8a18","link":"https:\/\/kurosuke.org\/diary\/category\/diary"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/posts\/516"}],"collection":[{"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/comments?post=516"}],"version-history":[{"count":0,"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/posts\/516\/revisions"}],"wp:attachment":[{"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/media?parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/categories?post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kurosuke.org\/diary\/wp-json\/wp\/v2\/tags?post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}