{"id":105,"date":"2023-05-04T02:06:49","date_gmt":"2023-02-24T11:16:07","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/"},"modified":"2025-07-31T14:05:02","modified_gmt":"2025-07-31T05:05:02","slug":"ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/","title":{"rendered":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<h3>\u5c0e\u5165<\/h3>\n<p>Django\u306f\u8fc5\u901f\u306bPython\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u67d4\u8edf\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001Django\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u8efd\u91cf\u306aSQLite\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u4e00\u90e8\u306e\u8ca0\u8377\u306e\u4e0b\u3067\u306f\u3046\u307e\u304f\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u672c\u756a\u74b0\u5883\u3067\u306f\u3088\u308a\u4f1d\u7d71\u7684\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001Django\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u4e00\u7dd2\u306bPostgreSQL\uff08\u901a\u5e38\u306fPostgres\u3068\u547c\u3070\u308c\u308b\uff09\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u3044\u304f\u3064\u304b\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u7528\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8a8d\u8a3c\u60c5\u5831\u3092\u4f5c\u6210\u3057\u3001\u3053\u306e\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067\u65b0\u3057\u3044Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u958b\u59cb\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<p>\u59cb\u3081\u308b\u305f\u3081\u306b\u306f\u3001sudo\u6a29\u9650\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u975e\u30eb\u30fc\u30c8\u30e6\u30fc\u30b6\u30fc\u3092\u6301\u3064Ubuntu 22.04\u30b5\u30fc\u30d0\u30fc\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u306e\u521d\u671f\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u30ac\u30a4\u30c9\u306b\u5f93\u3063\u3066\u3001\u305d\u308c\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u7d9a\u884c\u3059\u308b\u6e96\u5099\u304c\u3067\u304d\u305f\u3089\u3001sudo\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d71 &#8211; Ubuntu\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h2>\n<p>\u6700\u521d\u306b\u3001apt\u3092\u4f7f\u3063\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> update<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5fc5\u8981\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u306f\u3001Python\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u3067\u3042\u308bpip\u3082\u542b\u307e\u308c\u3066\u304a\u308a\u3001Python\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u7ba1\u7406\u3092\u884c\u3044\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306bPostgres\u3068\u8ffd\u52a0\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> python3-pip python3-dev libpq-dev postgresql postgresql-contrib<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Python\u3001Postgres\u3001\u305d\u306e\u4ed6\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4f5c\u6210\u306b\u9032\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d72 &#8211; \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210<\/h2>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001Postgres\u306f\u30ed\u30fc\u30ab\u30eb\u63a5\u7d9a\u306e\u8a8d\u8a3c\u65b9\u5f0f\u3068\u3057\u3066\u30d4\u30a2\u8a8d\u8a3c\u3068\u547c\u3070\u308c\u308b\u65b9\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u304c\u6709\u52b9\u306aPostgres\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u4e00\u81f4\u3059\u308b\u5834\u5408\u3001\u8ffd\u52a0\u306e\u8a8d\u8a3c\u306a\u3057\u3067\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>Postgres\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d\u306b\u3001postgres\u3068\u3044\u3046\u540d\u524d\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u30e6\u30fc\u30b6\u30fc\u304c\u4f5c\u6210\u3055\u308c\u3001postgres PostgreSQL\u7ba1\u7406\u30e6\u30fc\u30b6\u30fc\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002\u7ba1\u7406\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u3053\u306e\u30e6\u30fc\u30b6\u30fcpostgres\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u3067\u3042\u308broot\u306e\u4ee3\u308f\u308a\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u540dpostgres\u3092sudo\u3068\u3068\u3082\u306b-u\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u6e21\u3057\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3067\u3001\u5bfe\u8a71\u578b\u306ePostgres\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token parameter variable\">-u<\/span> postgres psql<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u73fe\u5728\u3001postgres\u30e6\u30fc\u30b6\u30fc\u306e\u30b7\u30a7\u30eb\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u304b\u3089\u3001\u305d\u308c\u305e\u308c\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306f\u72ec\u81ea\u306e\u9694\u96e2\u3055\u308c\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3092myproject\u3068\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3088\u308a\u5177\u4f53\u7684\u306a\u540d\u524d\u3092\u4ed8\u3051\u308b\u3053\u3068\u304c\u826f\u3044\u7fd2\u6163\u3067\u3059\u3002\u3055\u3089\u306b\u3001Postgres\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u969b\u306b\u306f\u3001SQL\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u30b3\u30de\u30f3\u30c9\u3092\u30bb\u30df\u30b3\u30ed\u30f3(;\uff09\u3067\u7d42\u4e86\u3059\u308b\u3053\u3068\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"postgres=#\">CREATE DATABASE <mark>myproject<\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3057\u3066\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u5f37\u529b\u304b\u3064\u5b89\u5168\u306a\u3082\u306e\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"postgres=#\">CREATE <span class=\"token environment constant\">USER<\/span> <mark>myproject_user<\/mark> WITH PASSWORD <span class=\"token string\">&#8216;<mark>myproject_database_password<\/mark>&#8216;<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u3044\u304f\u3064\u304b\u306e\u63a5\u7d9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u63a5\u7d9a\u304c\u78ba\u7acb\u3055\u308c\u308b\u305f\u3073\u306b\u30af\u30a8\u30ea\u3092\u884c\u3063\u3066\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u64cd\u4f5c\u304c\u30b9\u30d4\u30fc\u30c7\u30a3\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092UTF-8\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"postgres=#\">ALTER ROLE <mark>myproject_user<\/mark> SET client_encoding TO <span class=\"token string\">&#8216;utf8&#8217;<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u5206\u96e2\u30b9\u30ad\u30fc\u30e0\u3092\u8aad\u307f\u8fbc\u307e\u308c\u305f\u30b3\u30df\u30c3\u30c8\u306b\u8a2d\u5b9a\u3057\u3001\u672a\u30b3\u30df\u30c3\u30c8\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304b\u3089\u306e\u8aad\u307f\u8fbc\u307f\u3092\u30d6\u30ed\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"postgres=#\">ALTER ROLE <mark>myproject_user<\/mark> SET default_transaction_isolation TO <span class=\"token string\">&#8216;read committed&#8217;<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6700\u5f8c\u306b\u3001\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306fUTC\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306fDjango\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u306e\u63a8\u5968\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"postgres=#\">ALTER ROLE <mark>myproject_user<\/mark> SET timezone TO <span class=\"token string\">&#8216;UTC&#8217;<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u3001\u4f5c\u6210\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e6\u30fc\u30b6\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u4ed8\u4e0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"postgres=#\">GRANT ALL PRIVILEGES ON DATABASE <mark>myproject<\/mark> TO <mark>myproject_user<\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>SQL\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u7d42\u4e86\u3057\u3001Postgres\u30e6\u30fc\u30b6\u30fc\u306e\u30b7\u30a7\u30eb\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u623b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"postgres=#\"><span class=\"token punctuation\">\\<\/span>q<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u306e\u3067\u3001Django\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d73-\u4eee\u60f3\u74b0\u5883\u5185\u306bDjango\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/h2>\n<p>\u3088\u308a\u67d4\u8edf\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u306b\u3001Python\u306e\u4eee\u60f3\u74b0\u5883\u5185\u306bDjango\u3068\u305d\u306e\u4f9d\u5b58\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308bvirtualenv\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5165\u624b\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> pip <span class=\"token function\">install<\/span> virtualenv<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u3001Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">mkdir<\/span> ~\/<mark>myproject<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> ~\/<mark>myproject<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u3001Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306ePython\u306e\u8981\u4ef6\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306e\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">python3 <span class=\"token parameter variable\">-m<\/span> virtualenv <mark>myprojectenv<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u81ea\u7136\u306a\u8868\u73fe\u306b\u8a00\u3044\u63db\u3048\u307e\u3059\u3002\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u69cb\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u306e\u624b\u9806\u3067\u306f\u3001Python\u304a\u3088\u3073pip\u306e\u30ed\u30fc\u30ab\u30eb\u30b3\u30d4\u30fc\u304c\u3001\u3042\u306a\u305f\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u300cmyprojectenv\u300d\u3068\u547c\u3070\u308c\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4eee\u60f3\u74b0\u5883\u5185\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b\u3001\u307e\u305a\u305d\u308c\u3092\u6709\u52b9\u5316\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u6709\u52b9\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">source<\/span> <mark>myprojectenv<\/mark>\/bin\/activate<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4f8b\u3048\u3070\uff1a\uff08myprojectenv\uff09user@host:~\/myproject$\u3068\u3044\u3046\u3088\u3046\u306b\u3001\u3042\u306a\u305f\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u306f\u4eee\u60f3\u74b0\u5883\u5185\u3067\u4f5c\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u793a\u3059\u3088\u3046\u306b\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eee\u60f3\u74b0\u5883\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u306a\u3063\u305f\u3089\u3001pip\u3092\u4f7f\u3063\u3066Django\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u8a2d\u5b9a\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u3001psycopg2\u30d1\u30c3\u30b1\u30fc\u30b8\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\">pip <span class=\"token function\">install<\/span> Django psycopg2<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u95a2\u4fc2\u306a\u304f\u3001\u4eee\u60f3\u74b0\u5883\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u5316\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001pip3\u306e\u4ee3\u308f\u308a\u306bpip\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u3042\u306a\u305f\u306f\u4eca\u3001myproject\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u3067Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u958b\u59cb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u540c\u3058\u540d\u524d\u306e\u5b50\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30b3\u30fc\u30c9\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306b\u4f5c\u6210\u3055\u308c\u3001\u73fe\u5728\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u7ba1\u7406\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3092\u6b63\u3057\u304f\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306b\u3001\u30b3\u30de\u30f3\u30c9\u306e\u672b\u5c3e\u306b\u30c9\u30c3\u30c8.\u3092\u542b\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\">django-admin startproject <mark>myproject<\/mark> <span class=\"token builtin class-name\">.<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Django\u3068\u4eee\u60f3\u74b0\u5883\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u3089\u3001\u6b21\u306fDjango\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8a2d\u5b9a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d74 &#8211; Django\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8a2d\u5b9a\u306e\u69cb\u6210<\/h2>\n<p>\u3042\u306a\u305f\u304c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u6301\u3063\u3066\u3044\u308b\u4eca\u3001\u4f5c\u6210\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u304a\u597d\u304d\u306a\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3001\u5b50\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u3042\u308b\u30e1\u30a4\u30f3\u306eDjango\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001nano\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\"><span class=\"token function\">nano<\/span> ~\/<mark>myproject<\/mark>\/<mark>myproject<\/mark>\/settings.py<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u4e0b\u90e8\u306b\u306f\u3001SQLite\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u73fe\u5728\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308bDATABASES\u30bb\u30af\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div>~\/myproject\/myproject\/settings.py\u3092\u65e5\u672c\u8a9e\u306b\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<pre class=\"post-pre\"><code>. . .\r\n\r\n# Database\r\n# https:\/\/docs.djangoproject.com\/en\/4.1\/ref\/settings\/#databases\r\n\r\nDATABASES = {\r\n    'default': {\r\n        'ENGINE': 'django.db.backends.sqlite3',\r\n        'NAME': BASE_DIR \/ 'db.sqlite3',\r\n    }\r\n}\r\n\r\n. . .\r\n<\/code><\/pre>\n<p>Postgres\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306b\u3001sqlite3\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u4ee3\u308f\u308a\u306bpostgresql\u30a2\u30c0\u30d7\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u30a8\u30f3\u30b8\u30f3\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002NAME\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001myproject\u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059\u3002\u6b21\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3001\u63a5\u7d9a\u3059\u308b\u30db\u30b9\u30c8\u3092\u542b\u3080\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u60c5\u5831\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u5f8c\u306b\u3001\u30dd\u30fc\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u7a7a\u767d\u306b\u3057\u3066\u30c7\u30d5\u30a9\u30eb\u30c8\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div>\u4ee5\u4e0b\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u8868\u73fe\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\u306f1\u3064\u3060\u3051\u5fc5\u8981\u3067\u3059\uff09\uff1a<br \/>\n~\/myproject\/myproject\/settings.py\u79c1\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u306f\u3001~\/myproject\/myproject\/settings.py\u3067\u3059\u3002<\/p>\n<\/div>\n<pre class=\"post-pre\"><code>. . .\r\n# Database\r\n# https:\/\/docs.djangoproject.com\/en\/4.1\/ref\/settings\/#databases\r\n\r\nDATABASES = {\r\n    'default': {\r\n        'ENGINE': 'django.db.backends.<mark>postgresql<\/mark>',\r\n        <mark>'NAME': 'myproject',<\/mark>\r\n        <mark>'USER': 'myproject_user',<\/mark>\r\n        <mark>'PASSWORD': 'myproject_database_password',<\/mark>\r\n        <mark>'HOST': 'localhost',<\/mark>\r\n        <mark>'PORT': '',<\/mark>\r\n    }\r\n}\r\n\r\n. . .\r\n<\/code><\/pre>\n<p>\u307e\u305f\u3001ALLOWED_HOSTS\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u8abf\u6574\u3059\u308b\u5fc5\u8981\u3082\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001Django\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u63a5\u7d9a\u3092\u8a31\u53ef\u3059\u308b\u30a2\u30c9\u30ec\u30b9\u3084\u30c9\u30e1\u30a4\u30f3\u540d\u306e\u30db\u30ef\u30a4\u30c8\u30ea\u30b9\u30c8\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u3053\u306e\u30ea\u30b9\u30c8\u306b\u542b\u307e\u308c\u3066\u3044\u306a\u3044Host\u30d8\u30c3\u30c0\u30fc\u3092\u6301\u3064\u53d7\u4fe1\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u4f8b\u5916\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002Django\u306f\u3001\u7279\u5b9a\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8106\u5f31\u6027\u3092\u9632\u3050\u305f\u3081\u306b\u3053\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001Django\u30b5\u30fc\u30d0\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3066\u3044\u308bIP\u30a2\u30c9\u30ec\u30b9\u307e\u305f\u306f\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u89d2\u62ec\u5f27\u5185\u306b\u30ea\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5404\u9805\u76ee\u306f\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u3001\u30a8\u30f3\u30c8\u30ea\u30fc\u306f\u30ab\u30f3\u30de\u3067\u533a\u5207\u3089\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u5b9a\u306e\u30c9\u30e1\u30a4\u30f3\u3068\u305d\u306e\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u5168\u4f53\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u5834\u5408\u306f\u3001\u30a8\u30f3\u30c8\u30ea\u30fc\u306e\u5148\u982d\u306b\u30d4\u30ea\u30aa\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Django\u30b5\u30fc\u30d0\u30fc\u306e\u30c9\u30e1\u30a4\u30f3\u540d\u3068IP\u30a2\u30c9\u30ec\u30b9\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059: ALLOWED_HOSTS = [&#8216;your_domain&#8217;, &#8216;203.0.113.5&#8217;]\u3002\u3082\u3057your_domain\u3068\u305d\u306e\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u306b\u5fdc\u7b54\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u30c9\u30c3\u30c8\uff08.\uff09\u3067\u30c9\u30e1\u30a4\u30f3\u3092\u958b\u59cb\u3057\u3066\u304f\u3060\u3055\u3044: ALLOWED_HOSTS = [&#8216;.your_domain&#8217;, &#8216;203.0.113.5&#8217;]\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30c9\u30e1\u30a4\u30f3\u307e\u305f\u306fIP\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<p>\u4ee5\u4e0b\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u81ea\u7136\u306a\u8a00\u3044\u65b9\u306b\u8a00\u3044\u63db\u3048\u307e\u3059\u3002<\/p>\n<p>\u300c~\/myproject\/myproject\/settings.py\u300d<\/p>\n<\/div>\n<pre class=\"post-pre\"><code>. . .\r\n\r\nALLOWED_HOSTS = ['<mark>your_server_domain_or_IP<\/mark>']\r\n. . .\r\n<\/code><\/pre>\n<p>\u4f5c\u696d\u304c\u7d42\u4e86\u3057\u305f\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u9589\u3058\u3066\u304f\u3060\u3055\u3044\u3002\u3082\u3057nano\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001CTRL+X\u3001y\u3001Enter\u306e\u9806\u306b\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30b9\u30c6\u30c3\u30d75 &#8211; \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u79fb\u884c\u3068\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c6\u30b9\u30c8<\/h2>\n<p>Django\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u306e\u3067\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u30c6\u30b9\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3066\u9069\u7528\u3057\u307e\u3059\u3002\u307e\u3060\u30c7\u30fc\u30bf\u304c\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u306b\u3088\u308a\u521d\u671f\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u69cb\u9020\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002\u307e\u305a\u3001myproject\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\"><span class=\"token builtin class-name\">cd<\/span> ~\/<mark>myproject<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u308c\u304b\u3089\u79fb\u884c\u3092\u4f5c\u6210\u3057\u3066\u9069\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\">python manage.py makemigrations<\/li>\n<li data-prefix=\"(myprojectenv) $\">python manage.py migrate<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u69cb\u9020\u3092\u4f5c\u6210\u3057\u305f\u5f8c\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u5165\u529b\u3057\u3066\u7ba1\u7406\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\">python manage.py createsuperuser<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u9078\u629e\u3059\u308b\u3088\u3046\u306b\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u6b04\u3092\u7a7a\u767d\u306e\u307e\u307e\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u63d0\u4f9b\u3057\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Django\u306e\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u524d\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u63a5\u7d9a\u3092\u30c6\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5916\u90e8\u304b\u3089\u306e\u63a5\u7d9a\u3092\u8a31\u53ef\u3059\u308b\u305f\u3081\u306b\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3067\u30dd\u30fc\u30c8\u3092\u958b\u653e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\"><span class=\"token function\">sudo<\/span> ufw allow <span class=\"token number\">8000<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30dd\u30fc\u30c8\u304c\u958b\u3044\u305f\u3089\u3001Django\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"(myprojectenv) $\">python manage.py runserver <span class=\"token number\">0.0<\/span>.0.0:8000<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30c9\u30e1\u30a4\u30f3\u540d\u307e\u305f\u306fIP\u30a2\u30c9\u30ec\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001:8000\u3092\u4ed8\u3051\u308b\u3068\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306eDjango\u306e\u30e9\u30f3\u30c7\u30a3\u30f3\u30b0\u30da\u30fc\u30b8\u306b\u5230\u9054\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>http:\/\/<mark>server_domain_or_IP<\/mark>:8000\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/656454e2daa94e2bdf7b0816\/85-0.png\" alt=\"Django index\" \/><\/div>\n<p>URL\u306e\u672b\u5c3e\u306b\u300c\/admin\u300d\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u7ba1\u7406\u8005\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/656454e2daa94e2bdf7b0816\/87-0.png\" alt=\"Django admin login\" \/><\/div>\n<p>\u300ccreatesuperuser\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u308c\u304b\u3089\u3001\u7ba1\u7406\u8005\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/656454e2daa94e2bdf7b0816\/89-0.png\" alt=\"Django admin interface\" \/><\/div>\n<p>You can stop the development server by pressing CTRL+C in your terminal window after you finish exploring.<\/p>\n<p>\u7ba1\u7406\u8005\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u3092\u4fdd\u5b58\u3057\u3066\u304a\u308a\u3001\u9069\u5207\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001Django\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3057\u3066PostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304a\u3088\u3073\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\u3002SQLite\u306f\u958b\u767a\u304a\u3088\u3073\u8efd\u91cf\u306a\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u4f7f\u7528\u4e2d\u306b\u8ca0\u8377\u3092\u51e6\u7406\u3067\u304d\u307e\u3059\u304c\u3001\u307b\u3068\u3093\u3069\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u3088\u308a\u5145\u5b9f\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306e\u5c0e\u5165\u306b\u3088\u308a\u6069\u6075\u3092\u53d7\u3051\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u3055\u3089\u306b\u9032\u3081\u308b\u305f\u3081\u306b\u306f\u3001Ubuntu 22.04\u3067Django\u3068Postgres\u3001Nginx\u3001Gunicorn\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u30ac\u30a4\u30c9\u3092\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0e\u5165 Django\u306f\u8fc5\u901f\u306bPython\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u67d4\u8edf\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001Django\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u8efd\u91cf\u306aSQLite\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[72,58,16,14],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-django","tag-linux","tag-16","tag-14"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04\u3067\u306edjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068postgresql\u306e\u4f7f\u7528\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\" \/>\n<meta property=\"og:description\" content=\"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04\u3067\u306edjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068postgresql\u306e\u4f7f\u7528\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-24T11:16:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T05:05:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/656454e2daa94e2bdf7b0816\/85-0.png\" \/>\n<meta name=\"author\" content=\"\u7d50\u8863, \u6625\u82b1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u7d50\u8863, \u6625\u82b1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"18\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/\",\"name\":\"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-02-24T11:16:07+00:00\",\"dateModified\":\"2025-07-31T05:05:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac\"},\"description\":\"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac\",\"name\":\"\u7d50\u8863, \u6625\u82b1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g\",\"caption\":\"\u7d50\u8863, \u6625\u82b1\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/yuiharuka\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud","description":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04\u3067\u306edjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068postgresql\u306e\u4f7f\u7528\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9","og_description":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04\u3067\u306edjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068postgresql\u306e\u4f7f\u7528\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-02-24T11:16:07+00:00","article_modified_time":"2025-07-31T05:05:02+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/656454e2daa94e2bdf7b0816\/85-0.png"}],"author":"\u7d50\u8863, \u6625\u82b1","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u7d50\u8863, \u6625\u82b1","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"18\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/","name":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-02-24T11:16:07+00:00","dateModified":"2025-07-31T05:05:02+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac"},"description":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Ubuntu 22.04\u3067\u306eDjango\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068PostgreSQL\u306e\u4f7f\u3044\u65b9"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac","name":"\u7d50\u8863, \u6625\u82b1","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g","caption":"\u7d50\u8863, \u6625\u82b1"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/yuiharuka\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/ubuntu-22-04%e3%81%a7%e3%81%aedjango%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%a8postgresql%e3%81%ae%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=105"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":325696,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/105\/revisions\/325696"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}