{"id":9368,"date":"2019-11-21T15:05:35","date_gmt":"2019-11-21T06:05:35","guid":{"rendered":"https:\/\/www.mubit.co.jp\/pb-blog\/?p=9368"},"modified":"2019-12-04T10:10:36","modified_gmt":"2019-12-04T01:10:36","slug":"api%e5%af%be%e5%bf%9cvps%e3%81%ae%e6%ad%a9%e3%81%8d%e6%96%b9%e3%80%80webarena-indigo%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e8%a8%ad%e5%ae%9a%e7%b7%a8","status":"publish","type":"post","link":"https:\/\/www.mubit.co.jp\/pb-blog\/?p=9368","title":{"rendered":"API\u5bfe\u5fdcVPS\u306e\u6b69\u304d\u65b9 WebARENA Indigo\u306e\u4eee\u60f3\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u7de8"},"content":{"rendered":"<p>NTTPC\u30b3\u30df\u30cb\u30e5\u30b1\u30fc\u30b7\u30e7\u30f3\u30ba\u793e\u306e\u63d0\u4f9b\u3059\u308b\u4eee\u60f3\u5c02\u7528\u306eVPS\u30b5\u30fc\u30d3\u30b9WebARENA\/Indigo\u306f\u3001VPS\u3067\u4f7f\u3048\u308b\u3053\u3068\u3084\u4fa1\u683c\u306e\u5b89\u3055\u306b\u52a0\u3048\u3066API\u3067\u306e\u64cd\u4f5c\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u70b9\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u30021vCPU\/1GB memory\/20GB SSD\u30b9\u30da\u30c3\u30af\u306e\u30a8\u30f3\u30c8\u30ea\u30e2\u30c7\u30eb\u306e\u5834\u5408\u30011\u6642\u9593\u5f53\u305f\u308a0.55\u5186\u30fb\u6708\u984d349\u5186\u3067\u3059\u3002Linux\u30b5\u30fc\u30d0\u30fc\u306e\u30c1\u30a7\u30c3\u30af\u74b0\u5883\u3084\u30c6\u30b9\u30c8\u74b0\u5883\u306b\u306f\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p><strong>WebARENA \/ Indigo\u306e\u7279\u5fb4<\/strong><\/p>\n<ul>\n<li>VPS<\/li>\n<li>\u5229\u7528\u3067\u304d\u308bOS\u9650\u5b9a ( CentOS7 \/ Ubuntu )<\/li>\n<li>Firewall\u6a5f\u80fd\u3042\u308a<\/li>\n<li>\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u6a5f\u80fd\u3042\u308a<\/li>\n<li>GUI\u306f\u30b7\u30f3\u30d7\u30eb<\/li>\n<li>\u73fe\u72b6\u306e\u904b\u7528\u30be\u30fc\u30f3\u306f\u6771\u4eac\u306e\u307f<\/li>\n<li>\u30c7\u30fc\u30bf\u8ee2\u9001\u91cf\u306e\u5236\u9650\u3042\u308a<\/li>\n<li>\u30b5\u30fc\u30d0\u30fc\u306b\u306f\u30b0\u30ed\u30fc\u30d0\u30ebIP\u304c\u76f4\u63a5\u30a2\u30b5\u30a4\u30f3( IP\u306f1\u500b\u306e\u307f \uff09<\/li>\n<li>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3000ifcfg-eth0<\/li>\n<li>RestAPI\u306b\u5bfe\u5fdc<\/li>\n<li>\u904b\u7528\u57fa\u76e4KVM<\/li>\n<li>\u30b5\u30dd\u30fc\u30c8\u306a\u3057<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>GUI<\/strong><\/p>\n<p>WebARENA \u30b5\u30fc\u30d3\u30b9\u9805\u76ee\u304b\u3089\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u9078\u629e<\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-9433\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-1-1024x639.png\" alt=\"\" width=\"625\" height=\"390\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-1-1024x639.png 1024w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-1-300x187.png 300w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-1-768x480.png 768w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-1-624x390.png 624w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-1.png 1025w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Indigo\u306e\u753b\u9762<\/strong><\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-9434\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-2-1024x697.png\" alt=\"\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-2-1024x697.png 1024w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-2-300x204.png 300w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-2-768x523.png 768w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-2-624x425.png 624w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-2.png 1025w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u4f5c\u696d\u624b\u9806<\/strong><\/p>\n<ul>\n<li>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7ba1\u7406\uff08Firewall\u306e\u8a2d\u5b9a\uff09<\/li>\n<li>SSH\u30ad\u30fc\u306e\u4f5c\u6210<\/li>\n<li>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210<\/li>\n<li>API\u30ad\u30fc\u306e\u4f5c\u6210\uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff09<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Firewall\u3092\u4f5c\u6210<\/strong><\/p>\n<p>\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\uff06\u30a2\u30a6\u30c8\u30d0\u30a6\u30f3\u30c9\u306e\u30dd\u30ea\u30b7\u30fc\u3092\u8a2d\u5b9a\u3057\u307e\u3059<\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-9436\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-4-1024x851.png\" alt=\"\" width=\"625\" height=\"519\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-4-1024x851.png 1024w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-4-300x249.png 300w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-4-768x638.png 768w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-4-624x519.png 624w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-4.png 1025w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>SSH\u9375\u306e\u4f5c\u6210<\/strong><\/p>\n<p>SSH\u30ad\u30fc\u306f\u65b0\u898f\u4f5c\u6210\u306e\u4ed6\u306b\u3001\u65e2\u5b58\u306eSSH\u30ad\u30fc\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3082\u51fa\u6765\u307e\u3059<\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-9438\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-5-1024x851.png\" alt=\"\" width=\"625\" height=\"519\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-5-1024x851.png 1024w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-5-300x249.png 300w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-5-768x638.png 768w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-5-624x519.png 624w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-5.png 1025w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210<\/p>\n<ul>\n<li>\u30b9\u30da\u30c3\u30af\u3092\u9078\u629e<\/li>\n<li>OS\u3092\u9078\u629e\uff08CentOS \/ ubuntu )<\/li>\n<li>SSH\u9375\u3092\u9078\u629e<\/li>\n<li>\u904b\u7528\u3059\u308b\u30ea\u30fc\u30b8\u30e7\u30f3\u3092\u9078\u629e<\/li>\n<\/ul>\n<p>1\u5206\u7a0b\u5ea6\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059<\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-6-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-9466\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-6-1-905x1024.png\" alt=\"\" width=\"625\" height=\"707\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-6-1-905x1024.png 905w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-6-1-265x300.png 265w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-6-1-768x869.png 768w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-6-1-624x706.png 624w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-6-1.png 1025w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30d1\u30ef\u30fc\u30aa\u30f3<\/strong><\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-9441\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-7-1024x767.png\" alt=\"\" width=\"625\" height=\"468\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-7-1024x767.png 1024w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-7-300x225.png 300w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-7-768x575.png 768w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-7-624x468.png 624w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-7.png 1025w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u30a2\u30af\u30bb\u30b9<\/strong><\/p>\n<p>\u4f8b<\/p>\n<ul>\n<li>SSH\u9375\u30d5\u30a1\u30a4\u30eb\u540d\u3000webarena-indigo-ssh<\/li>\n<li>IP\u30a2\u30c9\u30ec\u30b9\u300040.2.22.4<\/li>\n<li>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d\u3000centos75-test<\/li>\n<li>centos \u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\u3000\u3000centos<\/li>\n<li>ubuntu\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\u3000\u3000ubuntu<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>teraterm \u306a\u3069\u3092\u5229\u7528\u3057\u3066CentOS\u306eVPS\u3078\u30a2\u30af\u30bb\u30b9<\/strong><\/p>\n<p>centos\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30e6\u30fc\u30b6\u30fc\u306f\u3001<strong>centos<\/strong> \u3067\u3059<\/p>\n<ul>\n<li>\u30e6\u30fc\u30b6\u30fc\u540d\u3000centos\u00a0 \u3092\u5165\u529b<\/li>\n<li>\u79d8\u5bc6\u9375\u306e key file \u6307\u5b9a\u00a0 \u4f8b\u3000webarena-indigo-ssh<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-teraterm-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9457\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-teraterm-1.png\" alt=\"\" width=\"325\" height=\"314\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-teraterm-1.png 480w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-teraterm-1-300x290.png 300w\" sizes=\"auto, (max-width: 325px) 100vw, 325px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u3082\u3057\u304f\u306f<\/p>\n<p><strong>Cygwin\u306a\u3069\u3067\u306e\u30a2\u30af\u30bb\u30b9<\/strong><\/p>\n<p>SSH\u9375\u30d5\u30a1\u30a4\u30eb\u306e\u30e2\u30fc\u30c9\u3092\u9069\u5207\u306b\u8a2d\u5b9a\u3057\u307e\u3059<\/p>\n<pre>[root@remoto-client]# chmod 600 webarena-indigo-ssh\r\n\r\n[root@remoto-client]# ssh -i\u3000webarena-indigo-ssh \u00a040.2.22.4 \u00a0-l \u00a0 centos\r\n\r\n[centos@centos75-test]$ sudo\u3000su -l\r\n\r\n[root@centos75-test]# pwd\r\n\/root\r\n[root@centos75-test]#<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u306e\u30ed\u30b0\u30a4\u30f3\u3084\u30ea\u30e2\u30fc\u30c8\u30ed\u30b0\u30a4\u30f3<\/strong><\/p>\n<p>\u5916\u90e8\u306eWAN\u5074\u304b\u3089\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u306a\u3044\u5834\u5408\u306a\u3069\u3067\u3082\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u30ed\u30b0\u30a4\u30f3\u3092\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3068\u3001\u4f55\u3089\u304b\u306e\u969c\u5bb3\u3067WAN\u304b\u3089\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u306a\u3044\u30b1\u30fc\u30b9\u3067\u3082\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u30ed\u30b0\u30a4\u30f3\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><strong>root \u30ed\u30b0\u30a4\u30f3\u8a31\u53ef \/ ssh \u3067\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u8a31\u53ef\u306e\u8a2d\u5b9a<br \/>\n<\/strong><\/p>\n<p>cloud.init \u306e\u8a2d\u5b9a\u5909\u66f4<strong><br \/>\n<\/strong><\/p>\n<p>\/etc\/cloud\/cloud.cfg\u3000\u30d5\u30a1\u30a4\u30eb\u306e2\u304b\u6240\u3092<\/p>\n<pre>disable_root: 0\r\nssh_pwauth: 1\r\n<\/pre>\n<p>\u3078\u5909\u66f4<\/p>\n<p><strong>root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a<\/strong><\/p>\n<pre>[root@centos75-test]# passwd\r\nChanging password for user root.\r\nNew password:                     \u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\r\nRetype new password:\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u518d\u5165\u529b\r\npasswd: all authentication tokens updated successfully.\r\n[root@centos75-test]#\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>ssh\u3084\u30ea\u30e2\u30fc\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u306e\u30ed\u30b0\u30a4\u30f3<\/strong><\/p>\n<p>root \u30ed\u30b0\u30a4\u30f3\u8a31\u53ef \/ ssh \u3067\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u8a31\u53ef\u306e\u4f8b<\/p>\n<p>\/etc\/ssh\/sshd_config\u3000\u30d5\u30a1\u30a4\u30eb\u306e\u4ee5\u4e0b\u306e\u9805\u76ee\u3092\u8a2d\u5b9a<\/p>\n<pre>PermitRootLogin\u3000 yes\r\nPasswordAuthentication \u3000yes\r\n<\/pre>\n<p>\u3078\u5909\u66f4<\/p>\n<p><strong>sshd \u306e\u518d\u8d77\u52d5<\/strong><\/p>\n<pre>[root@centos75-test ~]# systemctl\u3000 restart\u3000 sshd\r\n[root@centos75-test ~]#\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>VNC \u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u306e\u30ed\u30b0\u30a4\u30f3<\/strong><\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-console-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9531\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-console-1.png\" alt=\"\" width=\"402\" height=\"286\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-console-1.png 667w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-console-1-300x213.png 300w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-console-1-624x443.png 624w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306e\u30ed\u30b0\u30a4\u30f3<\/strong><\/p>\n<pre>[root@remoto-client]# ssh  40.2.22.4\u3000-l  root\r\nroot@40.2.22.4\u2019s password:\u3000\u3000\u3000\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\r\nLast login: Mon Nov 21 10:02:50 2019\r\n[root@centos75-test]#\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>SWAP\u8ffd\u52a0<\/strong><\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306f\u30ef\u30f3\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u70ba\u306b\u30e1\u30e2\u30ea\u30b9\u30ef\u30c3\u30d7\u306f\u6709\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30e1\u30e2\u30ea\u30b9\u30ef\u30c3\u30d7\u306fHDD\u3092\u5229\u7528\u3057\u307e\u3059\u306e\u3067\u3001\u30b9\u30ef\u30c3\u30d7\u306e\u30b5\u30a4\u30ba\u306a\u3069\u306f\u9069\u5b9c\u8abf\u6574\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\/etc\/rc.d\/rc.local \u3078\u8a18\u8ff0\u306e\u4f8b<\/p>\n<pre>--- \u6a19\u6e96\u3067\u306f\u30b9\u30ef\u30c3\u30d7\u306f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093 ---\r\n[root@centos75-test]# free\r\n              total        used        free      shared  buff\/cache   available\r\nMem:        1015396       83096      778440       13216      153860      765756\r\nSwap:             0           0           0\r\n\r\n\r\n---  \u30b9\u30ef\u30c3\u30d7\u306e\u8a2d\u5b9a\u4f8b ---\r\n[root@centos75-test]# cat\u00a0 \/etc\/rc.d\/rc.local\r\n#!\/bin\/bash\r\ntouch \/var\/lock\/subsys\/local\r\n\r\n# --- add swapfile 2GB ---\r\nSWAPFILE=\/swapfile\r\nif [ -e $SWAPFILE ] ; then\r\n\u3000swapon $SWAPFILE\r\nelse\r\n\u3000dd if=\/dev\/zero of=$SWAPFILE bs=1024K count=2048\r\n\u3000chmod 600 $SWAPFILE\r\n\u3000mkswap $SWAPFILE\r\n\u3000swapon $SWAPFILE\r\nfi\r\n\r\n[root@centos75-test]# chmod\u00a0 755\u00a0 \/etc\/rc.d\/rc.local\r\n[root@centos75-test]# reboot\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u518d\u8d77\u52d5\u5f8c\u3000swap\u304c\u6709\u52b9<\/strong><\/p>\n<pre>[root@centos75-test]# free\r\n              total        used        free      shared  buff\/cache   available\r\nMem:        1016396      148620      202144       51448      665632      620504\r\nSwap:       2097148        7952     2089196\r\n[root@centos75-test]# \r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>API\u30ad\u30fc\u306e\u4f5c\u6210<\/strong><\/p>\n<p>RestAPI\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059<\/p>\n<p>API\u79d8\u5bc6\u9375\u3092\u300c\u30ab\u30c3\u30c8\u30a2\u30f3\u30c9\u30da\u30fc\u30b9\u30c8\u300d\u3067\u81ea\u5206\u306e\u7aef\u672b\u5074\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58<\/p>\n<p>\u4f8b\u3000webarena-indigo-ssh.key<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9499\" src=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-9.png\" alt=\"\" width=\"768\" height=\"523\" srcset=\"https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-9.png 768w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-9-300x204.png 300w, https:\/\/www.mubit.co.jp\/pb-blog\/wp-content\/uploads\/2019\/11\/webarena-9-624x425.png 624w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>RestAPI\u306e\u64cd\u4f5c\u3000\u3000<\/strong><\/p>\n<p>accessToken\u3084\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\u306f\u4e8b\u524d\u306b\u5165\u624b\u3057\u3066\u3057\u3066\u304a\u304d\u307e\u3059<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u306e\u5165\u624b\u3000\u4f8b<\/strong><\/p>\n<p><span style=\"background-color: #00ff00;\"><span style=\"background-color: #ffffff;\">API\u9375<\/span> <\/span><span style=\"background-color: #00ff00;\">clientid<\/span>\u3068API\u79d8\u5bc6\u9375 <span style=\"background-color: #00ff00;\">clientsecret<\/span> \u30ad\u30fc\u3092\u5165\u308c\u3066\u5b9f\u884c<\/p>\n<p><span style=\"background-color: #ffff00;\">\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3<\/span>\u3092\u5165\u624b<\/p>\n<pre>[root@remoto-client]#\u3000.\/1st-start.sh | jq .\r\n\r\n+ curl -X POST https:\/\/api.customer.jp\/oauth\/v1\/accesstokens -H 'Content-Type: application\/json' -d '{\r\n\"grantType\": \"client_credentials\",\r\n\"clientId\": \"<span style=\"background-color: #00ff00;\">eawBwrlIGV9iPSAVDUPLgx1TR2g<\/span>\",\r\n\"clientSecret\": \"<span style=\"background-color: #00ff00;\">TNB6n6bWvug<\/span>\",\r\n\"code\": \"\"\r\n}'\r\n{\r\n\"accessToken\": \"<span style=\"background-color: #ffff99;\">AB2N13a5xrv3gGhpUACVZMXXb<\/span>\",  &lt;&lt;-- \u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\r\n\"tokenType\": \"BearerToken\",\r\n\"expiresIn\": \"3299\",\r\n\"scope\": \"READWRITE\",\r\n\"issuedAt\": \"1973555407312\"\r\n}\r\n\r\n[root@remoto-client]#\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u524a\u9664<\/strong><\/p>\n<p><span style=\"background-color: #ffff00;\"><span style=\"background-color: #ffffff;\">\u4e0a\u8a18\u3067\u5f97\u3089\u308c\u305f<\/span>\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3<\/span>\u3092\u5165\u308c\u3066\u5b9f\u884c<\/p>\n<pre>[root@remoto-client]# .\/delete-instance.sh\u3000|\u3000jq\u3000 .\r\n\r\n+ curl -X POST https:\/\/api.customer.jp\/webarenaIndigo\/v1\/vm\/instance\/statusupdate -H 'Authorization: Bearer <span style=\"background-color: #ffff00;\">AB2N13a5xrv3gGhpUACVZMXXb<\/span>' -H 'Content-Type: application\/json' -d '{\"instanceId\":917, \"status\":\"destroy\"}'\r\n\r\n\r\n{\r\n\"success\": true,\r\n\"message\": \"<span style=\"color: #000000; background-color: #00ff00;\">Instance has been destroyed successfully<\/span>\",\r\n\"sucessCode\": \"I20010\",\r\n\"instanceStatus\": \"shutoff\"\r\n}\r\n[root@remoto-client]#<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>\u305d\u306e\u4ed6<\/strong><\/p>\n<p>network \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u306f\u3000 ifcfg-eth0 \u3067\u3059<\/p>\n<p>\u30a2\u30d7\u30ea\u306b\u3088\u3063\u3066\u306f\u3001\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u306b\u4f9d\u5b58\u3059\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059<\/p>\n<pre>[root@centos75-test]#\u3000pwd\r\n\/etc\/sysconfig\/network-scripts\r\n\r\n[root@centos75-test]#\u3000ls -l ifcfg-eth0\r\n-rw-r--r--. 1 root root 487 10\u6708 30 16:39 ifcfg-eth0\r\n\r\n[root@centos75-test]#\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u73fe\u72b6\u3067\u306f\u3001WebARENA\u3000\u300c Indigo\u300d\u306b\u306f\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b5\u30fc\u6a5f\u80fd\u306f\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u307e\u305b\u3093\u3002\u4e0a\u4f4d\u306e\u30b5\u30fc\u30d3\u30b9WebARENA\u3000\u300c VPS\u300d\u3067\u306f\u3001\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b5\u30fc\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NTTPC\u30b3\u30df\u30cb\u30e5\u30b1\u30fc\u30b7\u30e7\u30f3\u30ba\u793e\u306e\u63d0\u4f9b\u3059\u308b\u4eee\u60f3\u5c02\u7528\u306eVPS\u30b5\u30fc\u30d3\u30b9WebARENA\/Indigo\u306f\u3001VPS\u3067\u4f7f\u3048\u308b\u3053\u3068\u3084\u4fa1\u683c\u306e\u5b89\u3055\u306b\u52a0\u3048\u3066API\u3067\u306e\u64cd\u4f5c\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u70b9\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u30021vCPU\/1GB memory\/2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,15],"tags":[],"class_list":["post-9368","post","type-post","status-publish","format-standard","hentry","category-api","category-vps"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=\/wp\/v2\/posts\/9368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9368"}],"version-history":[{"count":9,"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=\/wp\/v2\/posts\/9368\/revisions"}],"predecessor-version":[{"id":9632,"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=\/wp\/v2\/posts\/9368\/revisions\/9632"}],"wp:attachment":[{"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mubit.co.jp\/pb-blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}