{"id":10236,"date":"2023-04-19T06:17:42","date_gmt":"2023-04-18T21:17:42","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=10236"},"modified":"2024-09-08T10:41:32","modified_gmt":"2024-09-08T01:41:32","slug":"postgresql%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b%ef%bc%81%ef%bc%88rocky-linux-9%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/10236","title":{"rendered":"PostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01\uff08Rocky Linux 9\uff09"},"content":{"rendered":"<p>Rocky Linux 9\u306bPostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u74b0\u5883\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u524d\u306b\u3001\u74b0\u5883\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# hostnamectl\r\n Static hostname: vmsrdb11\r\n       Icon name: computer-vm\r\n         Chassis: vm\r\n      Machine ID: c5cfb03d2529409da1a18560f71e844a\r\n         Boot ID: b51565b278f343a086aa64b61290a770\r\n  Virtualization: oracle\r\nOperating System: Rocky Linux 9.1 (Blue Onyx)      \r\n     CPE OS Name: cpe:\/o:rocky:rocky:9::baseos\r\n          Kernel: Linux 5.14.0-162.6.1.el9_1.x86_64\r\n    Architecture: x86-64\r\n Hardware Vendor: innotek GmbH\r\n  Hardware Model: VirtualBox\r\n<\/pre>\n<h2>PostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<p>PostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# dnf install postgresql-server\r\nRocky Linux 9 - BaseOS                                                                  4.0 kB\/s | 4.1 kB     00:01    \r\nRocky Linux 9 - BaseOS                                                                  1.1 MB\/s | 1.8 MB     00:01    \r\nRocky Linux 9 - AppStream                                                               5.4 kB\/s | 4.5 kB     00:00    \r\nRocky Linux 9 - AppStream                                                               2.9 MB\/s | 6.8 MB     00:02    \r\nRocky Linux 9 - Extras                                                                  2.7 kB\/s | 2.9 kB     00:01    \r\nDependencies resolved.\r\n========================================================================================================================\r\n Package                               Architecture         Version                       Repository               Size\r\n========================================================================================================================\r\nInstalling:\r\n postgresql-server                     x86_64               13.10-1.el9_1                 appstream               5.7 M\r\nInstalling dependencies:\r\n postgresql                            x86_64               13.10-1.el9_1                 appstream               1.5 M\r\n postgresql-private-libs               x86_64               13.10-1.el9_1                 appstream               134 k\r\n\r\nTransaction Summary\r\n========================================================================================================================\r\nInstall  3 Packages\r\n\r\nTotal download size: 7.4 M\r\nInstalled size: 29 M\r\nIs this ok &#x5B;y\/N]: y\r\nDownloading Packages:\r\n...\r\nComplete!\r\n<\/pre>\n<h2>PostgreSQL\u3092\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>PostgreSQL\u3092\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,4]; title: ; notranslate\" title=\"\">\r\n# postgresql-setup --initdb\r\n* Initializing database in '\/var\/lib\/pgsql\/data'\r\n* Initialized, logs are in \/var\/lib\/pgsql\/initdb_postgresql.log\r\n# systemctl enable --now postgresql.service\r\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/postgresql.service \u2192 \/usr\/lib\/systemd\/system\/postgresql.service.\r\n<\/pre>\n<h2>PostgreSQL\u306e\u8d77\u52d5\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>PostgreSQL\u306e\u8d77\u52d5\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3]; title: ; notranslate\" title=\"\">\r\n# systemctl is-enabled postgresql.service\r\nenabled\r\n# systemctl status postgresql.service\r\n\u25cf postgresql.service - PostgreSQL database server\r\n     Loaded: loaded (\/usr\/lib\/systemd\/system\/postgresql.service; enabled; vendor preset: disabled)\r\n     Active: active (running) since Wed 2023-04-19 06:20:04 JST; 2min 5s ago\r\n    Process: 2710 ExecStartPre=\/usr\/libexec\/postgresql-check-db-dir postgresql (code=exited, status=0\/SUCCESS)\r\n   Main PID: 2713 (postmaster)\r\n      Tasks: 8 (limit: 11062)\r\n     Memory: 17.0M\r\n        CPU: 90ms\r\n     CGroup: \/system.slice\/postgresql.service\r\n             \u251c\u25002713 \/usr\/bin\/postmaster -D \/var\/lib\/pgsql\/data\r\n             \u251c\u25002714 &quot;postgres: logger &quot;\r\n             \u251c\u25002716 &quot;postgres: checkpointer &quot;\r\n             \u251c\u25002717 &quot;postgres: background writer &quot;\r\n             \u251c\u25002718 &quot;postgres: walwriter &quot;\r\n             \u251c\u25002719 &quot;postgres: autovacuum launcher &quot;\r\n             \u251c\u25002720 &quot;postgres: stats collector &quot;\r\n             \u2514\u25002721 &quot;postgres: logical replication launcher &quot;\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>Rocky Linux 9\u3067\u306f\u3001PostgreSQL 13\u3092\u6a19\u6e96\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.postgresql.org\/\" target=\"_blank\" rel=\"noopener\">PostgreSQL: The World's Most Advanced Open Source Relational Database<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/10238\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011PostgreSQL\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2023\/05\/eyecatch_postgresql_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011PostgreSQL\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">PostgreSQL\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rocky Linux 9\u306bPostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":11332,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[221],"tags":[289],"class_list":["post-10236","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql","tag-postgresql"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=10236"}],"version-history":[{"count":12,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10236\/revisions"}],"predecessor-version":[{"id":15962,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10236\/revisions\/15962"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/11332"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=10236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=10236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=10236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}