{"id":1931,"date":"2023-07-08T05:23:16","date_gmt":"2023-07-07T20:23:16","guid":{"rendered":"https:\/\/bacura.jp\/?page_id=1931"},"modified":"2026-01-29T23:52:29","modified_gmt":"2026-01-29T14:52:29","slug":"%e6%a0%84%e9%a4%8a%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e6%96%b9%e6%b3%95","status":"publish","type":"page","link":"https:\/\/bacura.jp\/?page_id=1931","title":{"rendered":"\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u3000\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u306e\u8457\u4f5c\u6a29\u306f\u6cd5\u5f8b\u7684\u306b\u653e\u68c4\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u5168\u30bd\u30fc\u30b9\u306f<a href=\"https:\/\/github.com\/bacura\/nb2020\">Github<\/a>\u3067\u516c\u958b\u3055\u308c\u3066\u304a\u308a\u3001Web\u306e\u77e5\u8b58\u304c\u3042\u308c\u3070\u7528\u9014\u3092\u554f\u308f\u305a\u81ea\u7531\u306b\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002\u307e\u305f\u3001web\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u30ed\u30fc\u30ab\u30eb\u3067web\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u3066\u304a\u3051\u3070\u3001\u30af\u30ed\u30fc\u30ba\u74b0\u5883\u3084\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30fc\u30f3PC\u3067\u3082\u3054\u5229\u7528\u3044\u305f\u3060\u3051\u307e\u3059\uff08\u305f\u3060\u3057\u3001\u516c\u958b\u30ec\u30b7\u30d4\u306a\u3069\u306f\u3054\u5229\u7528\u3044\u305f\u3060\u3051\u307e\u305b\u3093\uff09\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.\u30b5\u30fc\u30d0\u30fc\u306e\u6e96\u5099<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u3092\u52d5\u4f5c\u3055\u305b\u308b\u6700\u4f4e\u69cb\u6210\u306fCGI\u306e\u4f7f\u7528\u53ef\u80fd\u306aWeb\u30b5\u30fc\u30d0\u30fc\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210\u6a29\u9650\u3042\u308a\u306eMariaDB\uff08Mysql\u3067\u3082ok\uff09\u3001Ruby\u3068\u5404\u7a2egem\u3001<s>ImageMagic<\/s>\u3001vips-tools\u3001mecab\u306e\uff15\u3064\u3067\u3059\u3002\u3053\u308c\u3067\u304a\u304a\u3088\u305d\u306e\u6a5f\u80fd\u304c\u50cd\u304d\u307e\u3059\u3002\u7279\u6b8a\u306a\u3082\u306e\u306f\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u306e\u3067Unix\u30e9\u30a4\u30af\u30b5\u30fc\u30d0\u30fc\u3067\u5927\u62b5\u52d5\u304f\u3068\u601d\u3044\u307e\u3059\u3002\u9006\u306b\u3053\u308c\u3089\u306e\u74b0\u5883\u3092\u6e96\u5099\u3067\u304d\u306a\u3044\u65b9\u304c\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u3092\u72ec\u81ea\u904b\u7528\u3059\u308b\u306e\u306f\u56f0\u96e3\u3067\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u69cb\u6210\u4f8b\uff11\uff08\u516c\u958b\u30b5\u30fc\u30d0\u30fc\uff09<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">OS: OpenBSD<br>Web\u30b5\u30fc\u30d0\u30fc: \u6a19\u6e96\u306ehttpd + slowcgi<br>DB: Mariadb<br>Ruby: ruby3\uff08gems: exifr, mysql2, <s>rmagick<\/s>, clockwork, rqrcode, natto)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8a2d\u5b9a\u4f8b\uff08httpd.conf\u629c\u7c8b\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server \"default\"{\n root \"\/var\/www\/htdocs\"\n connection{max request body 10485760}\n\n location \".cgi\"{ fastcgi socket \"\/var\/www\/run\/slowcgi.sock\"}\n location \"\/nb\/\"{directory index index.cgi}\n}<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u69cb\u6210\u4f8b\uff12\uff08\u958b\u767a\u74b0\u5883\uff09<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">OS: ubuntu(WLS2)<br>Web\u30b5\u30fc\u30d0\u30fc: lighttpd<br>DB: Mariadb<br>Ruby: ruby3\uff08gems: exifr, mysql2, rmagick, clockwork, rqrcode, natto)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8a2d\u5b9a\u4f8b\uff08lighttpd.conf\u629c\u7c8b\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server.modules = (<br>\"mod_indexfile\",<br>\"mod_access\",<br>\"mod_alias\",<br>\"mod_redirect\",<br>)<br><br>server.document-root = \"\/var\/www\/htdocs\"<br>index-file.names = ( \"index.php\", \"index.html\", \"index.cgi\" )<br>static-file.exclude-extensions = ( \".php\", \".pl\", \".cgi\" )<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u3068\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u53d6\u5f97<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u306f\u6a19\u6e96\u3067\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u30fb\u5236\u5fa1\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u30b5\u30fc\u30d0\u30fcroot\u3001\u672c\u4f53\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8root\/nb\/\u306b\u7f6e\u304d\u307e\u3059\u3002\u9069\u5f53\u306a\u5834\u6240\u306bGithub\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fcroot\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\u74b0\u5883\u306b\u3088\u3063\u3066\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8root\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u304c\u7570\u306a\u308a\u307e\u3059\u306e\u3067\u3001web\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u304b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3092\u5909\u66f4\u3057\u3066\u4e0b\u3055\u3044\u3002\u3042\u3068\u5404\u30d5\u30a1\u30a4\u30eb\u306e\u30aa\u30fc\u30ca\u30fc\u3068\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u3044\u3044\u611f\u3058\u306b\u5909\u66f4\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u3068\u308a\u3042\u3048\u305acgi\u30d5\u30a1\u30a4\u30eb\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5b9f\u884c\u5c5e\u6027\u306f\u5fc5\u9808\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># git clone https:\/\/github.com\/bacura\/nb2020.git\n# cp -r nb2020\/* \u30b5\u30fc\u30d0\u30fcroot<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u306e\u57fa\u672c\u8a2d\u5b9a<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u306e\u57fa\u672c\u8a2d\u5b9a\u306fnb2020-soul.rb\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u7d76\u5bfe\u306b\u5916\u90e8\u304b\u3089\u898b\u3048\u308b\u5834\u6240\u306b\u7f6e\u3044\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u7684\u306b\u6700\u4f4e\u9650\u3001\u7ba1\u7406\u8005ID\u3001DB\u30e6\u30fc\u30b6\u30fc\u540d\u3001DBR\u30e6\u30fc\u30b6\u30fc\u540d\u3001DB\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$GM = 'gm'\u3000#\u7ba1\u7406\u8005ID\n\n$SERVER_PATH = '\/var\/www'\n$HTDOCS_PATH = \"#{$SERVER_PATH}\/htdocs\/nb\"\n$TMP_PATH = '\/tmp'\n$NBURL = 'http:\/\/localhost\/nb\/'\n$MYURL = 'http:\/\/localhost\/nb\/'\n\n$COOKIE_UID = 'UID2020'\n\n$MYSQL_HOST = 'localhost'\n$MYSQL_DB = 'nb2020'\n$MYSQL_DBR = 'rr2020'\n$MYSQL_USER = 'user' #DB\u30e6\u30fc\u30b6\u30fc\u540d\n$MYSQL_USERR = 'userr' #DBR\u30e6\u30fc\u30b6\u540d\n$MYSQL_PW = 'password' #DB\u30d1\u30b9\u30ef\u30fc\u30c9<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4.\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u521d\u671f\u5316<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># ruby nb2020-dbi.rb\nDB Administrator name\uff1f\n# \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u8005\u6a29\u9650\u306e\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u5165\u529b\u3057\u3066Enter\nDB Administrator password\uff1f\n# \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u8005\u6a29\u9650\u306e\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529bEnter<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">5.\u78ba\u8a8d<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u304c\u52d5\u3044\u3066\u3044\u308b\u304b\u78ba\u304b\u3081\u307e\u3059\u3002\u4e0b\u8a18\u306f\u6a19\u6e96\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u306e\u4f8b\u3067\u3059\u3002\u30cd\u30c3\u30c8\u74b0\u5883\u3084\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u306b\u5408\u308f\u305b\u3066\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002<br><strong>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u516c\u958b\u306e\u5834\u5408<\/strong><br>http(s):\/\/\u30c9\u30e1\u30a4\u30f3\u540d\/nb\/<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30fc\u30f3\u306e\u5834\u5408<\/strong><br>http:\/\/localhost\/nb\/<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">6.GM\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5909\u66f4<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u521d\u671f\u72b6\u614b\u3067\u306f\u7ba1\u7406\u8005ID\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u672a\u8a2d\u5b9a\u306a\u306e\u3067\u3059\u3002\u7ba1\u7406\u8005ID\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u2699\u30de\u30fc\u30af\u306e\u5404\u7a2e\u8a2d\u5b9a\u304b\u3089\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u306b\u884c\u304d\u3001\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1167\" height=\"706\" src=\"https:\/\/bacura.jp\/wp-content\/uploads\/2023\/07\/SnapCrab_NoName_2023-7-8_4-31-6_No-00.png\" alt=\"\" class=\"wp-image-1935\" srcset=\"https:\/\/bacura.jp\/wp-content\/uploads\/2023\/07\/SnapCrab_NoName_2023-7-8_4-31-6_No-00.png 1167w, https:\/\/bacura.jp\/wp-content\/uploads\/2023\/07\/SnapCrab_NoName_2023-7-8_4-31-6_No-00-512x310.png 512w, https:\/\/bacura.jp\/wp-content\/uploads\/2023\/07\/SnapCrab_NoName_2023-7-8_4-31-6_No-00-192x116.png 192w, https:\/\/bacura.jp\/wp-content\/uploads\/2023\/07\/SnapCrab_NoName_2023-7-8_4-31-6_No-00-768x465.png 768w\" sizes=\"auto, (max-width: 1167px) 100vw, 1167px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u6804\u990a\u30d6\u30e9\u30a6\u30b6\u306e\u8457\u4f5c\u6a29\u306f\u6cd5\u5f8b\u7684\u306b\u653e\u68c4\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u5168\u30bd\u30fc\u30b9\u306fGithub\u3067\u516c\u958b\u3055\u308c\u3066\u304a\u308a\u3001Web\u306e\u77e5\u8b58\u304c\u3042\u308c\u3070\u7528\u9014\u3092\u554f\u308f\u305a\u81ea\u7531\u306b\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002\u307e\u305f\u3001web\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u30ed\u30fc\u30ab\u30eb\u3067web\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u3066\u304a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1864,"parent":1154,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","footnotes":""},"class_list":["post-1931","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/pages\/1931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bacura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1931"}],"version-history":[{"count":7,"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/pages\/1931\/revisions"}],"predecessor-version":[{"id":2080,"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/pages\/1931\/revisions\/2080"}],"up":[{"embeddable":true,"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/pages\/1154"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bacura.jp\/index.php?rest_route=\/wp\/v2\/media\/1864"}],"wp:attachment":[{"href":"https:\/\/bacura.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}