{"id":2035,"date":"2015-05-09T23:50:19","date_gmt":"2015-05-09T14:50:19","guid":{"rendered":"http:\/\/wp.kaz.bz\/tech\/?p=2035"},"modified":"2015-05-09T23:56:45","modified_gmt":"2015-05-09T14:56:45","slug":"centos-7-%e3%81%a7-niltalk-httpd-%e3%80%82","status":"publish","type":"post","link":"https:\/\/wp.kaz.bz\/tech\/2015\/05\/09\/2035.html","title":{"rendered":"CentOS 7 \u3067 niltalk + httpd \u3002"},"content":{"rendered":"<p>\u30e1\u30e2\u3002<\/p>\n<p><a href=\"http:\/\/moongift.jp\/2015\/05\/niltalk-%e3%81%a8%e3%81%a6%e3%82%82%e7%b0%a1%e5%8d%98%e3%81%ab%e4%bd%bf%e3%81%88%e3%82%8b%e3%83%97%e3%83%a9%e3%82%a4%e3%83%99%e3%83%bc%e3%83%88%e3%83%81%e3%83%a3%e3%83%83%e3%83%88\/\" class=\"ext-link\" rel=\"external nofollow\" target=\"_blank\">MOONGIFT\u3055\u3093\u306e\u8a18\u4e8b http:\/\/moongift.jp\/2015\/05\/niltalk-\u3068\u3066\u3082\u7c21\u5358\u306b\u4f7f\u3048\u308b\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30c1\u30e3\u30c3\u30c8\/<\/a> \u3067\u51fa\u3066\u3044\u305f\u306e\u3092\u8a66\u3057\u3066\u307f\u305f\u3002<\/p>\n<p>redis\u3092\u4f7f\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067redis\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u3002<\/p>\n<p>yum install golang<br \/>\nuseradd -d \/var\/golang golang<\/p>\n<p>su - golang<\/p>\n<p>mkdir ~\/gocode<\/p>\n<p>vi .bash_profile<\/p>\n<pre class=\"brush:bash\">\nexport GOPATH=\/var\/golang\/gocode\n<\/pre>\n<p>export GOPATH=\/var\/golang\/gocode<\/p>\n<p>cd ~\/gocode<br \/>\ngo get github.com\/goniltalk\/niltalk<\/p>\n<p>cd src\/github.com\/goniltalk\/niltalk<\/p>\n<p>vi config.json<\/p>\n<p>\u6700\u4f4e\u9650\u4e0b\u8a18\u3092\u8a2d\u5b9a<\/p>\n<pre class=\"brush:plain\">\n        \"address\": \"127.0.0.1:9000\",\n        \"url\": \"https:\/\/*******\", \/\/ no trailing slash < \u4f7f\u3044\u305f\u3044URL\u306b\u5408\u308f\u305b\u308b\n<\/pre>\n<p>.\/run<\/p>\n<p>\u3053\u3053\u307e\u3067\u3067 127.0.0.1:9000 \u3067 LISTEN \u3067\u304d\u308b\u306e\u3067\u30019000\u3092\u305d\u306e\u307e\u307e\u4f7f\u3046\u306e\u3067\u3042\u308c\u3070\u3053\u308c\u3067\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3002<\/p>\n<p>httpd 2.4 \u7cfb\u4ee5\u964d\u306e proxy_wstunnel_module ( mod_proxy_wstunnel.so ) \u3092\u5229\u7528\u3059\u308b\u3068 WebSocket \u306e\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u3068\u306e\u3053\u3068\u3067\u8a66\u3057\u3066\u307f\u308b\u3002<br \/>\nconfig.json \u5185\u306e  \"websocket_route\" \u306e\u8a2d\u5b9a\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f \"\/w\/\" \uff09\u304c\u95a2\u4fc2\u3059\u308b\u3002<\/p>\n<pre class=\"brush:plain\">\nProxyPass        \/w\/ ws:\/\/127.0.0.1:9000\/w\/\nProxyPassReverse \/w\/ ws:\/\/127.0.0.1:9000\/w\/\n\nProxyPass        \/ http:\/\/127.0.0.1:9000\/\nProxyPassReverse \/ http:\/\/127.0.0.1:9000\/\n<\/pre>\n<p>\u9806\u5e8f\u304c\u91cd\u8981\u3067\u3001\u9006\u306b\u3059\u308b\u3068WebSocket\u3078\u306e\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u304c\u6a5f\u80fd\u3057\u306a\u3044\u307f\u305f\u3044\u3002<\/p>\n<p>go \u306e\u57fa\u672c\u304c\u3088\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u81ea\u52d5\u8d77\u52d5\u3092\u3069\u3046\u3059\u308b\u306e\u304c\u4e3b\u6d41\u306a\u306e\u304b\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3084\u3063\u3064\u3051\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092 crontab \u306e @reboot \u3067\u6307\u5b9a\u3057\u3066\u307f\u305f\u3002<\/p>\n<pre class=\"brush:bash\">\n#! \/bin\/sh\n\nexport GOPATH=\/var\/golang\/gocode\ncd ${GOPATH}\/src\/github.com\/goniltalk\/niltalk\n.\/run &\n<\/pre>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u305f\u3068\u3048\u3070 \/var\/golang\/scripts\/niltalk\/start.sh \u3068\u3057\u3066\u4f5c\u6210\u3057\u3001<\/p>\n<p>crontab -e<\/p>\n<pre class=\"brush:plain\">\n@reboot nohup \/var\/golang\/scripts\/niltalk\/start.sh\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30e1\u30e2\u3002 MOONGIFT\u3055\u3093\u306e\u8a18\u4e8b http:\/\/moongift.jp\/2015\/05\/niltalk-\u3068\u3066\u3082\u7c21\u5358\u306b\u4f7f\u3048\u308b\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30c1\u30e3\u30c3\u30c8\/ \u3067\u51fa\u3066\u3044\u305f\u306e\u3092\u8a66\u3057\u3066\u307f\u305f\u3002 redis\u3092\u4f7f\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067redis\u3082 [&hellip;]<\/p>\n","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,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[81],"tags":[],"class_list":["post-2035","post","type-post","status-publish","format-standard","hentry","category-81"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":44,"url":"https:\/\/wp.kaz.bz\/tech\/2008\/05\/13\/44.html","url_meta":{"origin":2035,"position":0},"title":"\u30ed\u30b0\u306e\u632f\u308a\u5206\u3051","author":"kaz. Suenaga","date":"2008\/05\/13","format":false,"excerpt":"http:\/\/httpd.apache.org\/docs\/2.0\/ja\/mod\/mod_setenv\u2026","rel":"","context":"Apache","block_context":{"text":"Apache","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/apache"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4,"url":"https:\/\/wp.kaz.bz\/tech\/2009\/11\/11\/4.html","url_meta":{"origin":2035,"position":1},"title":"qmail + vpopmail\u74b0\u5883\u3078\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb","author":"kaz. Suenaga","date":"2009\/11\/11","format":false,"excerpt":"qmail + vpopmail \u306e\u74b0\u5883\u306bmailman \u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u969b\u306e\u624b\u9806\u3002 v\u2026","rel":"","context":"mailman","block_context":{"text":"mailman","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/mailman"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1179,"url":"https:\/\/wp.kaz.bz\/tech\/2012\/05\/25\/1179.html","url_meta":{"origin":2035,"position":2},"title":"1\u3064\u306eIP\u30a2\u30c9\u30ec\u30b9\u3067\u8907\u6570\u306e\u30b3\u30e2\u30f3\u30cd\u30fc\u30e0\u306eSSL\u8a3c\u660e\u66f8\u3092\u5229\u7528\u3059\u308b\uff08\uff1dSNI\uff09\u3002","author":"kaz. Suenaga","date":"2012\/05\/25","format":false,"excerpt":"\u53c2\u7167\uff09 http:\/\/e-garakuta.net\/techinfo\/doku.php\/linux\/\u2026","rel":"","context":"Apache","block_context":{"text":"Apache","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/apache"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1725,"url":"https:\/\/wp.kaz.bz\/tech\/2013\/07\/26\/1725.html","url_meta":{"origin":2035,"position":3},"title":"CentOS6\u7cfb\u3067SSH\u516c\u958b\u9375\u8a8d\u8a3c\u3092LDAP\u8a8d\u8a3c\u306b\u3059\u308b\u65b9\u6cd5\u3002","author":"kaz. Suenaga","date":"2013\/07\/26","format":false,"excerpt":"SSH\uff08CentOS\u6a19\u6e96\u30ea\u30dd\u30b8\u30c8\u30ea\u306eOpenSSH\uff09\u306e\u516c\u958b\u9375\u8a8d\u8a3c\u3067LDAP\u8a8d\u8a3c\u3092\u5229\u7528\u3059\u308b\u624b\u9806\u3067\u3059\u3002 \u2026","rel":"","context":"CentOS","block_context":{"text":"CentOS","link":"https:\/\/wp.kaz.bz\/tech\/category\/lin\/centos"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2663,"url":"https:\/\/wp.kaz.bz\/tech\/2021\/09\/21\/2663.html","url_meta":{"origin":2035,"position":4},"title":"AlmaLinux 8 \u6a19\u6e96\u30ea\u30dd\u30b8\u30c8\u30ea\u3067 WordPress \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u74b0\u5883\u69cb\u7bc9\u3002","author":"kaz. Suenaga","date":"2021\/09\/21","format":false,"excerpt":"remi \u3092\u4f7f\u308f\u305a\u306b\u8a2d\u5b9a\u3059\u308b\u30e1\u30e2\u3002 epel \u306f\u4f7f\u3046\u3002powertools \u3082\u4f7f\u3046\u3002 httpd 2\u2026","rel":"","context":"AlmaLinux","block_context":{"text":"AlmaLinux","link":"https:\/\/wp.kaz.bz\/tech\/category\/lin\/almalinux"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76,"url":"https:\/\/wp.kaz.bz\/tech\/2006\/12\/29\/76.html","url_meta":{"origin":2035,"position":5},"title":"httpd.conf\u306eVirtualHost \u96db\u5f62\u3002\uff08SSL\u7248\uff09","author":"kaz. Suenaga","date":"2006\/12\/29","format":false,"excerpt":"# ------------------------------------------------\u2026","rel":"","context":"Apache","block_context":{"text":"Apache","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/apache"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts\/2035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/comments?post=2035"}],"version-history":[{"count":0,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts\/2035\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/media?parent=2035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/categories?post=2035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/tags?post=2035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}