{"id":1323,"date":"2013-02-12T12:43:07","date_gmt":"2013-02-12T03:43:07","guid":{"rendered":"http:\/\/blog.4star.link\/?p=1323"},"modified":"2017-01-08T22:33:31","modified_gmt":"2017-01-08T13:33:31","slug":"centos6-2%e3%81%abmysql5-5%e3%82%92%e3%82%bd%e3%83%bc%e3%82%b9%e3%81%a7%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%9f%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"https:\/\/blog.4star.link\/?p=1323","title":{"rendered":"CentOS6.2\u306byum\u306eMySQL5.5\u3068\u30bd\u30fc\u30b9\u306eMySQL5.5\u3092\uff11\u53f0\u3067\u30ec\u30d7\u30ea\u30ab\u3057\u305f\u969b\u306e\u30e1\u30e2"},"content":{"rendered":"<p>\uff11\u53f0\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u3001\uff12\u3064\u306eMySQL\u3092\u5165\u308c\u308b\u305f\u3081\u306b\u3001<br \/>\nyum\u3067\u3082\u3068\u3082\u3068\u5165\u3063\u3066\u3044\u308bMySQL5.5\u306b\u8ffd\u52a0\u3067\u3001\u30bd\u30fc\u30b9\u306eMySQL5.5\u3092\u5165\u308c\u305f\u30e1\u30e2\u3002<br \/>\n\u76ee\u7684\u306f\u30b5\u30fc\u30d0\u30fc\uff11\u53f0\u3067Master-Slave\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u691c\u8a3c\u3092\u3059\u308b\u305f\u3081\u3002<br \/>\n\uff08\u3042\u304f\u307e\u3067\u7c21\u6613\u3081\u3082\u306a\u306e\u3067\u3001\u9069\u5b9c\u81ea\u5206\u306e\u74b0\u5883\u306b\u3042\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002^^\u6c57\uff09<\/p>\n<p>\u69cb\u7bc9\u74b0\u5883<br \/>\n<strong>CentOS6.2<\/strong>\u3000CentOS release 6.2 (Final)<br \/>\n<strong>\u30de\u30b9\u30bf\u30fc\u7528\uff1aMySQL5.5<\/strong>(yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff09Server version: 5.5.23-log MySQL Community Server (GPL) by Remi<br \/>\n<strong>\u30b9\u30ec\u30fc\u30d6\u7528\uff1aMySQL5.5<\/strong>(\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff09Server version: 5.5.30-log Source distribution<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff6600;\"><strong>\uff11\uff0e\u30de\u30b9\u30bf\u30fc\u7528\u306eMySQL\u3092yum\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/span><br \/>\n\u203b\u30c7\u30d5\u30a9\u30eb\u30c8\u306eyum\u3067\u306f5.5\u306f\u306a\u304b\u3063\u305f\u306f\u305a\u306a\u306e\u3067\u3001remi\u304b\u3089<\/p>\n<pre>RPM\u306eepel,remi\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\n\r\n\u73fe\u72b6\u306eyum\u3067\u5229\u7528\u3067\u304d\u308bmysql\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\uff08\u304a\u305d\u3089\u304f5.1xxx\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\uff09\r\n# yum info mysql\r\n# rpm -ivh ftp:\/\/ftp.pbone.net\/mirror\/download.fedora.redhat.com\/pub\/fedora\/epel\/6\/x86_64\/epel-release-6-5.noarch.rpm\r\n(CentOS 6.x, x86_64\u306e\u5834\u5408)\r\nDL\u5143\u30b5\u30a4\u30c8\uff1ahttp:\/\/rpm.pbone.net\/index.php3\/stat\/4\/idpl\/15279403\/dir\/redhat_el_6\/com\/epel-release-6-5.noarch.rpm.html\r\n\r\n\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d\r\n# yum --enablerepo=epel,remi list mysql-server\u3000\r\n\r\nyum\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\n# yum --enablerepo=epel,remi install mysql mysql-server mysql-devel mysql-libs\r\n\r\n# service mysqld start\r\n# mysql<\/pre>\n<p><span style=\"color: #ff6600;\"><strong>\uff12\uff0e\u30b9\u30ec\u30fc\u30d6\u7528\u306eMySQL\u306e\u30bd\u30fc\u30b9\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/span><\/p>\n<pre>\u5b58\u5728\u3057\u306a\u3051\u308c\u3070mysql\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\r\n# groupadd mysql\r\n# useradd -m mysql -g mysql -d \/usr\/local\/mysql\/data\r\n# passwd mysql\r\n\r\n\u30b3\u30f3\u30d1\u30a4\u30e9\u7cfb\u3092\u6e96\u5099\r\n# yum install gcc gcc-c++ bison\r\n# yum install ncurses-devel\r\n# yum install cmake\r\n\r\n\u81ea\u5206\u306f\/usr\/local\/src\/\u306b\u3068\u308a\u3042\u3048\u305a\u30bd\u30fc\u30b9\u306emysql\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\r\n\u203b\u30bd\u30fc\u30b9\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u969b\u306econfigre\u304c5.5\u304b\u3089\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001cmake\u3092\u5229\u7528\u3059\u308b\u3002\u305d\u306e\u305f\u3081cmake\u30d5\u30a1\u30a4\u30eb\u304c\u5165\u3063\u3066\u3044\u308b\u3082\u306e\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff01\r\n# wget 'http:\/\/dev.mysql.com\/get\/Downloads\/MySQL-5.5\/mysql-5.5.30.tar.gz\/from\/http:\/\/cdn.mysql.com\/'\r\n\r\n# cd mysql-5.5.30xx\/\r\ncmake\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u304a\u597d\u307f\u3067\r\n# cmake -DCMAKE_INSTALL_PREFIX=\/usr\/local\/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_INNOBASE_STORAGE_ENGINE=1\r\n\r\n# make\r\n# make install\r\n\r\n# chown -R mysql:mysql \/usr\/local\/mysql\/\r\n\r\n# cp \/usr\/local\/mysql\/support-files\/my-large.cnf \/usr\/local\/mysql\/my.cnf\r\n\r\n\u203b\u9069\u5b9c\u7de8\u96c6\r\n# vi \/usr\/local\/mysql\/my.cnf\r\n\r\n# \/usr\/local\/mysql\/scripts\/mysql_install_db --basedir=\/usr\/local\/mysql --datadir=\/usr\/local\/mysql\/var --user=mysql\r\n\r\n# cp \/usr\/local\/mysql\/support-files\/mysql.server \/etc\/init.d\/mysqld_slave\r\n\r\n# chmod 755 \/etc\/init.d\/mysqld_slave\r\n\r\n\u203b\u9069\u5b9c\u7de8\u96c6\r\n# vim \/etc\/init.d\/mysqld_slave\r\nbasedir=\/usr\/local\/mysql\r\ndatadir=\/usr\/local\/mysql\/var\r\nmysqld_pid_file_path=\/var\/run\/mysqld\/mysqld_slave.pid\r\n\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fmysql\u3092\u8d77\u52d5\r\n# \/etc\/init.d\/mysqld_slave status\r\n# \/etc\/init.d\/mysqld_slave start\r\n\r\n\u30ed\u30b0\u30a4\u30f3\r\n# \/usr\/local\/mysql\/bin\/mysql\r\n\r\n\u81ea\u52d5\u8d77\u52d5\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\r\n# chkconfig --add mysqld_slave\r\n# chkconfig mysqld_slave on\r\n# chkconfig --list | grep mysql<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\u53f0\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u3001\uff12\u3064\u306eMySQL\u3092\u5165\u308c\u308b\u305f\u3081\u306b\u3001 yum\u3067\u3082\u3068\u3082\u3068\u5165\u3063\u3066\u3044\u308bMySQL5.5\u306b\u8ffd\u52a0\u3067\u3001\u30bd\u30fc\u30b9\u306eMySQL5.5\u3092\u5165\u308c\u305f\u30e1\u30e2\u3002 \u76ee\u7684\u306f\u30b5\u30fc\u30d0\u30fc\uff11\u53f0\u3067Master-Slave\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u691c\u8a3c\u3092\u3059\u308b\u305f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.4star.link\/?p=1323\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;CentOS6.2\u306byum\u306eMySQL5.5\u3068\u30bd\u30fc\u30b9\u306eMySQL5.5\u3092\uff11\u53f0\u3067\u30ec\u30d7\u30ea\u30ab\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":[1],"tags":[198,14,31,196,197],"class_list":["post-1323","post","type-post","status-publish","format-standard","hentry","category-1","tag-198","tag-centos","tag-mysql","tag-mysql5-5","tag-197"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1323"}],"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=1323"}],"version-history":[{"count":2,"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1323\/revisions"}],"predecessor-version":[{"id":1918,"href":"https:\/\/blog.4star.link\/index.php?rest_route=\/wp\/v2\/posts\/1323\/revisions\/1918"}],"wp:attachment":[{"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.4star.link\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}