{"id":1643,"date":"2018-09-29T17:51:49","date_gmt":"2018-09-29T08:51:49","guid":{"rendered":"https:\/\/takumi9942.net\/blog\/?p=1643"},"modified":"2024-09-15T14:43:12","modified_gmt":"2024-09-15T05:43:12","slug":"how-to-install-mariadb-and-wordpress","status":"publish","type":"post","link":"https:\/\/takumi9942.net\/blog\/?p=1643","title":{"rendered":"MariaDB\u3068phpMyAdmin\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066WordPress\u3092\u7acb\u3061\u4e0a\u3052\u308b"},"content":{"rendered":"<p>\u904e\u53bb\u306bMariaDB\u3068phpMyAdmin\u3092\u8a2d\u5b9a\u3059\u308b\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u4e00\u90e8\u975e\u63a8\u5968\u306a\u64cd\u4f5c\u3092\u884c\u3063\u3066\u3044\u305f\u306e\u3067\u518d\u5ea6\u66f8\u304d\u76f4\u3059\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u4eca\u56de\u306f\u3064\u3044\u3067\u306bWordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<div class=\"alert alert-info\" role=\"alert\">CentOS7\u306bNginx(\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\uff1aapache)\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u74b0\u5883\u3067\u306e\u624b\u9806\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/div>\n<h2>PHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>1.\u6700\u65b0\u7248\u306ePHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u3001Remi\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>yum install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm<\/pre>\n<p>2. \u5229\u7528\u3057\u305f\u3044PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<code>\/etc\/yum.repos.d\/remi-php72.repo<\/code>\u3092\u4efb\u610f\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304d\u3001<code>enabled=0<\/code>\u3092<code>enabled=1<\/code>\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre>vim\u00a0\/etc\/yum.repos.d\/remi-php72.repo<\/pre>\n<pre>[remi-php72]\r\nname=Remi's PHP 7.2 RPM repository for Enterprise Linux 7 - $basearch\r\n#baseurl=http:\/\/rpms.remirepo.net\/enterprise\/7\/php72\/$basearch\/\r\n#mirrorlist=https:\/\/rpms.remirepo.net\/enterprise\/7\/php72\/httpsmirror\r\nmirrorlist=http:\/\/cdn.remirepo.net\/enterprise\/7\/php72\/mirror\r\nenabled=1 \u2190\u3053\u3053\u3092\u7de8\u96c6<\/pre>\n<div class=\"alert alert-info\" role=\"alert\">\u73fe\u6642\u70b9(2018\u5e749\u670829\u65e5)\u3067\u306e\u6700\u65b0\u7248\u306f7.2\u306a\u306e\u3067<code>\/etc\/yum.repos.d\/remi-php<strong>72<\/strong>.repo<\/code>\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<br \/>\n(\u4f8b\uff1a7.3\u306a\u3089<code>remi-php<strong>73<\/strong>.repo<\/code>)<\/div>\n<p>3. PHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre>yum install php php-common php-fpm php-gd php-mbstring php-pdo php-mysqlnd php-opcache<\/pre>\n<p>4.\u00a0 PHP\u3092\u8d77\u52d5\u3057\u3001\u81ea\u52d5\u8d77\u52d5\u306b\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre>systemctl start php-fpm\r\nsystemctl enable php-fpm<\/pre>\n<h2>MariaDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>1. MariaDB\u306e<a href=\"https:\/\/downloads.mariadb.org\/mariadb\/repositories\/#mirror=yamagata-university\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001Linux\u306eOS\u3092\u9078\u629e\u3059\u308b\u3068\u51fa\u3066\u304f\u308b\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30c7\u30fc\u30bf\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1644\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-1024x635.png\" alt=\"\" width=\"1024\" height=\"635\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-1024x635.png 1024w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-300x186.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-768x476.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-530x328.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-565x350.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-710x440.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002-725x449.png 725w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/002.png 1257w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>2. <code>\/etc\/yum.repos.d\/MariaDB.repo<\/code>\u3092\u4efb\u610f\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304d\u3001\u516c\u5f0f\u30b5\u30a4\u30c8\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u30c7\u30fc\u30bf\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n<pre>vim \/etc\/yum.repos.d\/MariaDB.repo<\/pre>\n<pre># MariaDB 10.3 CentOS repository list - created 2018-09-29 03:25 UTC\r\n# http:\/\/downloads.mariadb.org\/mariadb\/repositories\/\r\n[mariadb]\r\nname = MariaDB\r\nbaseurl = http:\/\/yum.mariadb.org\/10.3\/centos7-amd64\r\ngpgkey=https:\/\/yum.mariadb.org\/RPM-GPG-KEY-MariaDB\r\ngpgcheck=1<\/pre>\n<p>3. \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067MariaDB\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre>yum install MariaDB-server MariaDB-client<\/pre>\n<p>4.<code>\/etc\/my.cnf<\/code>\u3092\u4efb\u610f\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<pre>vim \/etc\/my.cnf<\/pre>\n<pre>#\r\n# This group is read both both by the client and the server\r\n# use it for options that affect everything\r\n#\r\n[client-server]\r\n\r\n##### \u3053\u3053\u304b\u3089\u8ffd\u52a0\u3000\u2190\r\n[mysqld]\r\ncharacter-set-server=utf8\r\n\r\n[client]\r\ndefault-character-set=utf8\r\n##### \u3053\u3053\u307e\u3067\u8ffd\u52a0\u3000\u2190\r\n#\r\n# include all files from the config directory\r\n#\r\n!includedir \/etc\/my.cnf.d\r\n<\/pre>\n<p>5. MariaDB\u3092\u8d77\u52d5\u3057\u3001\u81ea\u52d5\u8d77\u52d5\u306b\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre>systemctl start mariadb\r\nsystemctl enable mariadb<\/pre>\n<p>6. <code>mysql_secure_installation<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u521d\u671f\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre>Enter current password for root (enter for none)\r\n#\u6700\u521d\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3053\u306e\u307e\u307eEnter\r\nSet root password? [Y\/n]\r\n#[Y]\u30ad\u30fc\u3092\u62bc\u3057\u3066\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\r\nRemove anonymous users? [Y\/n]\r\n#anonymous\u30e6\u30fc\u30b6\u30fc\u306f\u30c6\u30b9\u30c8\u7528\u306e\u30e6\u30fc\u30b6\u30fc\u306a\u306e\u3067\u3001[Y]\u30ad\u30fc\u3092\u62bc\u3057\u3066\u524a\u9664\u3057\u307e\u3059\u3002\r\nDisallow root login remotely? [Y\/n]\r\n#\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5916\u90e8\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u3092\u9078\u629e\u3057\u307e\u3059\u3002\r\n#\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fVPS\u5185\u3060\u3051\u3067\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f[Y]\u30ad\u30fc\u3092\u62bc\u3057\u3066\u30ea\u30e2\u30fc\u30c8\u30ed\u30b0\u30a4\u30f3\u3092\u7981\u6b62\u3057\u307e\u3059\r\nRemove test database and access to it? [Y\/n]\r\n#test\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30c6\u30b9\u30c8\u7528\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u306e\u3067\u3001[Y]\u30ad\u30fc\u3092\u62bc\u3057\u3066\u524a\u9664\u3057\u307e\u3059\u3002\r\nReload privilege tables now? [Y\/n]\r\n#\u3059\u3050\u306b\u8a2d\u5b9a\u3092\u53cd\u6620\u3059\u308b\u304b\u805e\u304b\u308c\u308b\u306e\u3067\u3001[Y]\u30ad\u30fc\u3092\u53cd\u6620\u3057\u307e\u3059\u3002<\/pre>\n<h2>phpMyAdmin\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>1.phpMyAdmin\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre>yum install phpmyadmin --enablerepo=remi<\/pre>\n<p>2. phpMyAdmin\u3078\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre>ln -s \/usr\/share\/phpMyAdmin \/usr\/share\/nginx\/html\/\u4efb\u610f\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d<\/pre>\n<div class=\"alert alert-info\" role=\"alert\">\u3053\u306e\u6642\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u304cphpMyAdmin\u306eURL\u306b\u306a\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eroot\u30e6\u30fc\u30b6\u30fc\u3067\u30ed\u30b0\u30a4\u30f3\u51fa\u6765\u307e\u3059<br \/>\n(\u4f8b\uff1a<code>\/usr\/share\/nginx\/html\/testMyAdmin<\/code>\u306b\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u305f\u5834\u5408\u3001<code>https:\/\/example.com\/testMyAdmin\/<\/code>)<\/div>\n<div class=\"alert alert-warning\" role=\"alert\">\u308f\u304b\u308a\u3084\u3059\u3044\u540d\u524d\u306b\u3059\u308b\u3053\u3068<strong>\u67d0\u56fd\u304b\u3089\u653b\u6483\u3092\u98df\u3089\u3046\u306e\u3067<\/strong>\u3001\u63a8\u6e2c\u3055\u308c\u306b\u304f\u3044\u540d\u524d\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/div>\n<h2>phpMyAdmin\u306e\u74b0\u5883\u4fdd\u7ba1\u9818\u57df(\u4efb\u610f)<\/h2>\n<p>\u4e0a\u8a18\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u305f\u6bb5\u968e\u3067\u3001phpMyAdmin\u306e\u307b\u3068\u3093\u3069\u306e\u6a5f\u80fd\u306f\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002(\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u300cphp MyAdmin \u74b0\u5883\u4fdd\u7ba1\u9818\u57df\u304c\u5b8c\u5168\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u3044\u304f\u3064\u304b\u306e\u62e1\u5f35\u6a5f\u80fd\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300d\u3068\u3044\u3046\u8b66\u544a\u304c\u767a\u751f\u3057\u307e\u3059\u3002)<\/p>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1645\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003.png\" alt=\"\" width=\"932\" height=\"72\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003.png 932w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003-300x23.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003-768x59.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003-530x41.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003-565x44.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003-710x55.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/003-725x56.png 725w\" sizes=\"auto, (max-width: 932px) 100vw, 932px\" \/><\/a><\/p>\n<p>phpMyAdmin\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u305f\u308a\u3001\u62e1\u5f35\u6a5f\u80fd\u3092\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u306b\u5f93\u3063\u3066\u74b0\u5883\u4fdd\u7ba1\u9818\u57df\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>1.MariaDB\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n<pre>mysql -u root -p<\/pre>\n<p>2. phpMyAdmin\u7528\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre>MariaDB [(none)]&gt; create user 'pma'@'localhost' identified by '\u30d1\u30b9\u30ef\u30fc\u30c9';<\/pre>\n<div class=\"alert alert-warning\" role=\"alert\">pma\u30e6\u30fc\u30b6\u30fc\u306f<strong>\u72d9\u308f\u308c\u3084\u3059\u3044\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u305f\u3081\u3001\u5f37\u529b\u306a\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong>\u3053\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306fphpMyAdmin\u306e<code>config.inc.php<\/code>\u4ee5\u5916\u306b\u306f\u4f7f\u7528\u3057\u306a\u3044\u305f\u3081\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u306a\u3069\u3067\u975e\u5e38\u306b\u9577\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/div>\n<p>3.<code>create_tables.sql<\/code>\u3092\u5b9f\u884c\u3057\u3066\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre>MariaDB [(none)]&gt; source \/usr\/share\/phpMyAdmin\/sql\/create_tables.sql<\/pre>\n<p>4. \u4f5c\u6210\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306bpma\u30e6\u30fc\u30b6\u30fc\u304c\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u308b\u3088\u3046\u306b\u6a29\u9650\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u8ffd\u52a0\u304c\u5b8c\u4e86\u3057\u305f\u3089<code>exit<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<pre>MariaDB [(none)]&gt; grant SELECT, INSERT, DELETE, UPDATE, ALTER on `phpmyadmin`.* to 'pma'@'localhost';\r\nQuery OK, 0 rows affected (0.000 sec)\r\n\r\nMariaDB [(none)]&gt; exit<\/pre>\n<p>5.<code>\/etc\/phpMyAdmin\/config.inc.php<\/code>\u3092\u4efb\u610f\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304d\u3001\u6587\u982d\u306e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8(<code>\/\/<\/code>)\u3092\u524a\u9664\u3057\u3001<code>$cfg['Servers'][$i]['controlpass']<\/code>\u306b\u5148\u7a0b\u4f5c\u6210\u3057\u305fpma\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre>vim \/etc\/my.cnf<\/pre>\n<p>\u203b\u5909\u66f4\u524d<\/p>\n<pre>\/**\r\n * phpMyAdmin configuration storage settings.\r\n *\/\r\n\r\n\/* User used to manipulate with storage *\/\r\n\/\/ $cfg['Servers'][$i]['controlhost'] = '';\r\n\/\/ $cfg['Servers'][$i]['controlport'] = '';\r\n\/\/ $cfg['Servers'][$i]['controluser'] = 'pma';\r\n\/\/ $cfg['Servers'][$i]['controlpass'] = 'pmapass';\r\n\r\n\/* Storage database and tables *\/\r\n\/\/ $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';\r\n\/\/ $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';\r\n\/\/ $cfg['Servers'][$i]['relation'] = 'pma__relation';\r\n\/\/ $cfg['Servers'][$i]['table_info'] = 'pma__table_info';\r\n\/\/ $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';\r\n\/\/ $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';\r\n\/\/ $cfg['Servers'][$i]['column_info'] = 'pma__column_info';\r\n\/\/ $cfg['Servers'][$i]['history'] = 'pma__history';\r\n\/\/ $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';\r\n\/\/ $cfg['Servers'][$i]['tracking'] = 'pma__tracking';\r\n\/\/ $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';\r\n\/\/ $cfg['Servers'][$i]['recent'] = 'pma__recent';\r\n\/\/ $cfg['Servers'][$i]['favorite'] = 'pma__favorite';\r\n\/\/ $cfg['Servers'][$i]['users'] = 'pma__users';\r\n\/\/ $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';\r\n\/\/ $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';\r\n\/\/ $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';\r\n\/\/ $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';\r\n\/\/ $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';\r\n\/\/ $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';<\/pre>\n<p>\u203b\u5909\u66f4\u5f8c<\/p>\n<pre>\/**\r\n * phpMyAdmin configuration storage settings.\r\n *\/\r\n\r\n\/* User used to manipulate with storage *\/\r\n$cfg['Servers'][$i]['controlhost'] = '';\r\n$cfg['Servers'][$i]['controlport'] = '';\r\n$cfg['Servers'][$i]['controluser'] = 'pma';\r\n$cfg['Servers'][$i]['controlpass'] = 'pma\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9';\r\n\r\n\/* Storage database and tables *\/\r\n$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';\r\n$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';\r\n$cfg['Servers'][$i]['relation'] = 'pma__relation';\r\n$cfg['Servers'][$i]['table_info'] = 'pma__table_info';\r\n$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';\r\n$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';\r\n$cfg['Servers'][$i]['column_info'] = 'pma__column_info';\r\n$cfg['Servers'][$i]['history'] = 'pma__history';\r\n$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';\r\n$cfg['Servers'][$i]['tracking'] = 'pma__tracking';\r\n$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';\r\n$cfg['Servers'][$i]['recent'] = 'pma__recent';\r\n$cfg['Servers'][$i]['favorite'] = 'pma__favorite';\r\n$cfg['Servers'][$i]['users'] = 'pma__users';\r\n$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';\r\n$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';\r\n$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';\r\n$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';\r\n$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';\r\n$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';<\/pre>\n<p>\u4ee5\u4e0a\u3067MariaDB\u3068phpMyAdmin\u306e\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h2>WordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>1.<a href=\"https:\/\/ja.wordpress.org\/download\/\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u6700\u65b0\u306eWordPress\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre>curl -O https:\/\/ja.wordpress.org\/wordpress-4.9.8-ja.tar.gz<\/pre>\n<p>2. \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u51cd\u3057\u307e\u3059\u3002<\/p>\n<pre>tar -zxvf .\/wordpress-4.9.8-ja.tar.gz<\/pre>\n<p>3. \u4efb\u610f\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u89e3\u51cd\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre>mv .\/wordpress \/usr\/share\/nginx\/html\/\u4efb\u610f\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d<\/pre>\n<div class=\"alert alert-info\" role=\"alert\">\u3053\u306e\u6642\u306e\u5834\u6240\u304cWordPress\u306eURL\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n(\u4f8b\uff1a<code>\/usr\/share\/nginx\/html\/blog<\/code>\u306b\u79fb\u52d5\u3057\u305f\u5834\u5408\u3001<code>https:\/\/example.com\/blog\/<\/code>)<\/div>\n<p>4. <code>wp-content<\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6a29\u9650\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre>chown -R apache:apache \/usr\/share\/nginx\/html\/\u8a2d\u7f6e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\/wp-content<\/pre>\n<div class=\"alert alert-warning\" role=\"alert\">\n<p>SELinux\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u66f8\u304d\u8fbc\u307f\u6a29\u9650\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>semanage fcontext -a -t httpd_sys_rw_content_t \"\/usr\/share\/nginx\/html\/\u8a2d\u7f6e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\/wp-content(\/.*)?\"\r\nrestorecon -RFv \/usr\/share\/nginx\/html\/\u8a2d\u7f6e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\/<\/pre>\n<\/div>\n<p>5. phpMyAdmin\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u4e0a\u90e8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30bf\u30d6\u304b\u3089wordpress\u7528\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1647\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-1024x545.png\" alt=\"\" width=\"1024\" height=\"545\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-1024x545.png 1024w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-300x160.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-768x408.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-530x282.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-565x300.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-710x378.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005-725x386.png 725w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/005.png 1399w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<div class=\"alert alert-info\" role=\"alert\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3092\u5165\u529b\u3057\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u306f\u300cutf8_general_ci\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/div>\n<p>6.MariaDB\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n<pre>mysql -u root -p<\/pre>\n<p>7. WordPress\u7528\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre>MariaDB [(none)]&gt; create user '\u30e6\u30fc\u30b6\u30fc\u540d'@'localhost' identified by '\u30d1\u30b9\u30ef\u30fc\u30c9';<\/pre>\n<p>8. \u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306bwordpress\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u6a29\u9650\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u8ffd\u52a0\u304c\u5b8c\u4e86\u3057\u305f\u3089<code>exit<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<pre>MariaDB [(none)]&gt; grant all on `wordpress\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d`.* to '\u30e6\u30fc\u30b6\u30fc\u540d'@'localhost';\r\nQuery OK, 0 rows affected (0.000 sec)\r\n\r\nMariaDB [(none)]&gt; exit<\/pre>\n<p>9. WordPress\u3092\u8a2d\u7f6e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u300c\u3055\u3041\u3001\u59cb\u3081\u307e\u3057\u3087\u3046\uff01\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002(https:\/\/example.com\/\u8a2d\u7f6e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/)<\/p>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1649\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-1024x637.png\" alt=\"\" width=\"1024\" height=\"637\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-1024x637.png 1024w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-300x187.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-768x478.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-530x330.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-565x352.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-710x442.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004-725x451.png 725w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/004.png 1277w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>10. \u5fc5\u8981\u4e8b\u9805\u3092\u5165\u529b\u3057\u3001\u300c\u9001\u4fe1\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1650\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-1024x578.png\" alt=\"\" width=\"1024\" height=\"578\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-1024x578.png 1024w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-300x169.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-768x434.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-320x180.png 320w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-530x299.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-565x319.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-710x401.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006-725x409.png 725w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/006.png 1431w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>11. \u8868\u793a\u3055\u308c\u305f\u5185\u5bb9\u3092\u30b3\u30d4\u30fc\u3057\u3001<code>\/usr\/share\/nginx\/html\/\u8a2d\u7f6e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/wp-config.php<\/code>\u306b\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002\u307e\u305f\u3001<code>define('FS_METHOD', 'direct');<\/code>\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<pre>vim \/usr\/share\/nginx\/html\/\u8a2d\u7f6e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/wp-config.php<\/pre>\n<pre>&lt;?php\r\ndefine('FS_METHOD', 'direct');\u3000\u2190\u3000\u3053\u306e\u884c\u3092\u8ffd\u52a0\r\n\/**\r\n * WordPress \u306e\u57fa\u672c\u8a2d\u5b9a\r\n *\r\n * \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b wp-config.php \u4f5c\u6210\u30a6\u30a3\u30b6\u30fc\u30c9\u304c\u5229\u7528\u3057\u307e\u3059\u3002<\/pre>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1651\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-1024x564.png\" alt=\"\" width=\"1024\" height=\"564\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-1024x564.png 1024w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-300x165.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-768x423.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-530x292.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-565x311.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-710x391.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007-725x399.png 725w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/007.png 1460w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>12. \u30b5\u30a4\u30c8\u306e\u60c5\u5831\u3068\u30ed\u30b0\u30a4\u30f3\u60c5\u5831\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1652\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-1024x597.png\" alt=\"\" width=\"1024\" height=\"597\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-1024x597.png 1024w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-300x175.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-768x448.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-530x309.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-565x330.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-710x414.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008-725x423.png 725w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/008.png 1421w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>13. \u4ee5\u4e0b\u306e\u753b\u9762\u304c\u51fa\u308c\u3070\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1653\" src=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-1024x431.png\" alt=\"\" width=\"1024\" height=\"431\" srcset=\"https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-1024x431.png 1024w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-300x126.png 300w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-768x323.png 768w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-530x223.png 530w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-565x238.png 565w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-710x299.png 710w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009-725x305.png 725w, https:\/\/takumi9942.net\/blog\/wp-content\/uploads\/2018\/09\/009.png 1380w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u904e\u53bb\u306bMariaDB\u3068phpMyAdmin\u3092\u8a2d\u5b9a\u3059\u308b\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u4e00\u90e8\u975e\u63a8\u5968\u306a\u64cd\u4f5c\u3092\u884c\u3063\u3066\u3044\u305f\u306e\u3067\u518d\u5ea6\u66f8\u304d\u76f4\u3059\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u4eca\u56de\u306f\u3064\u3044\u3067\u306bWordPress\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-1643","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-1","7":"cs-entry","8":"cs-video-wrap"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1643"}],"version-history":[{"count":1,"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1643\/revisions"}],"predecessor-version":[{"id":2556,"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1643\/revisions\/2556"}],"wp:attachment":[{"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takumi9942.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}