{"id":741,"date":"2018-07-17T22:49:19","date_gmt":"2018-07-17T13:49:19","guid":{"rendered":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741"},"modified":"2020-05-24T02:03:51","modified_gmt":"2020-05-23T17:03:51","slug":"ubuntu-16-04%e3%81%ab%e6%9c%80%e6%96%b0%e7%89%88%e3%81%aego%e8%a8%80%e8%aa%9e%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741","title":{"rendered":"Ubuntu 16.04 \u306b\u6700\u65b0\u7248\u306e Go\u8a00\u8a9e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b"},"content":{"rendered":"<p>Ubuntu 16.04 \u306b\u3001Go\u8a00\u8a9e(golang) \u306e\u6700\u65b0\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306e\u89e3\u8aac\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u69cb\u7bc9\u3057\u305f\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>Ubuntu 16.04.4<\/li>\n<li>golang 1.10.3<\/li>\n<\/ul>\n<p>\u21d2 <a href=\"\/?p=512\">CentOS 7 \u3078\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806<\/a><br \/>\n<p><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br\/><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-9913955142682871\" data-ad-slot=\"7236093749\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins><br\/><script>(adsbygoogle=window.adsbygoogle||[]).push({});<\/script><\/p>\n<h2>Ubuntu \u306b golang\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h2>\n<p>\u4eca\u56de\u306f <code>apt-get<\/code> \u3092\u5229\u7528\u305b\u305a\u306b\u3001\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089\u76f4\u63a5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/golang.org\/dl\/\" target=\"_blank\" rel=\"noopener noreferrer\">golang\u306e\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001Linux \u7248\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30ea\u30f3\u30af\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<p><img src=\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/wp-content\/uploads\/2018\/07\/a015-01.png\" class=\"aligncenter size-full\"><\/p>\n<p>&nbsp;<br \/>\n<code>\/usr\/local\/src<\/code> \u306b\u79fb\u52d5\u3057\u3001\u30b3\u30d4\u30fc\u3057\u305f URL \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ cd \/usr\/local\/src\n$ sudo wget https:\/\/dl.google.com\/go\/go1.10.3.linux-amd64.tar.gz\n<\/code><\/pre>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092 <code>\/usr\/local<\/code> \u306b\u5c55\u958b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre><code>$ sudo tar xf go1.10.3.linux-amd64.tar.gz -C \/usr\/local\/\n<\/code><\/pre>\n<h2>Go\u8a00\u8a9e\u306e\u521d\u671f\u8a2d\u5b9a<\/h2>\n<p>\u5c55\u958b\u3057\u305f <code>go<\/code> \u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3057\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>$ \/usr\/local\/go\/bin\/go version\ngo version go1.10.3 linux\/amd64\n<\/code><\/pre>\n<p>Go\u8a00\u8a9e\u3067\u5fc5\u8981\u3068\u306a\u308b <code>GOPATH<\/code> \u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ echo 'export GOROOT=\/usr\/local\/go' &gt;&gt; ~\/.profile\n<\/code><\/pre>\n<p>\u30d1\u30b9\u3092\u901a\u3059\u305f\u3081\u74b0\u5883\u5909\u6570\u306e <code>PATH<\/code> \u306b1\u884c\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ echo 'export PATH=$PATH:$GOROOT\/bin' &gt;&gt; ~\/.profile\n<\/code><\/pre>\n<p><code>.profile<\/code> \u306b\u8ffd\u8a18\u3057\u305f\u5185\u5bb9\u3092\u53cd\u6620\u3055\u305b\u307e\u3059\u3002<\/p>\n<pre><code>$ source ~\/.profile\n<\/code><\/pre>\n<h2>Ubuntu \u3068 Go\u8a00\u8a9e\u3067\u300cHello, World!\u300d\u3092\u8868\u793a\u3059\u308b<\/h2>\n<p>\u6b63\u5e38\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u304d\u305f\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001Hello World \u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\u753b\u9762\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3060\u3051\u306e\u7c21\u5358\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3001\u52d5\u4f5c\u78ba\u8a8d\u3067\u3088\u304f\u5229\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4efb\u610f\u306e\u540d\u524d\u3067\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u4eca\u56de\u306f <code>test.go<\/code> \u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code>package main\n\nimport \"fmt\"\n\nfunc main(){\n  fmt.Printf(\"Hello, World!\")\n}\n<\/code><\/pre>\n<p><code>go run<\/code> \u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<code>Hello, World!<\/code> \u3068\u8868\u793a\u3055\u308c\u308c\u3070\u6210\u529f\u3067\u3059\u3002<br \/>\n\u30d5\u30eb\u30d1\u30b9\u3067\u306a\u304f\u3066\u3082\u5b9f\u884c\u3067\u304d\u305f\u305f\u3081\u3001\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a\u3082\u554f\u984c\u306a\u3044\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>$ go run test.go\nHello, World!\n<\/code><\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Ubuntu 16.04 \u306b\u300cGo\u8a00\u8a9e(golang)\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<br \/>\n<code>apt-get<\/code> \u3067\u306f\u306a\u304f\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u3088\u308a\u3001\u6700\u65b0\u7248\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>Go\u8a00\u8a9e\u306f\u3001OS \u74b0\u5883\u3092\u554f\u308f\u305a\u306b\u5b9f\u884c\u3067\u304d\u308b\u3053\u3068\u3084\u3001\u8a00\u8a9e\u4ed5\u69d8\u304c\u30b7\u30f3\u30d7\u30eb\u306a\u70b9\u304c\u7279\u5fb4\u3067\u3059\u3002<br \/>\n\u8fd1\u5e74\u3088\u304f\u5229\u7528\u3055\u308c\u59cb\u3081\u305f\u8a00\u8a9e\u306e\u4e00\u3064\u3067\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u3010\u95a2\u9023\u8a18\u4e8b\u3011<\/strong><br \/>\n\u21d2 <a href=\"\/?p=499\">MySQL 8 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 (Ubuntu)<\/a><br \/>\n\u21d2 <a href=\"\/?p=361\">Docker \u74b0\u5883\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 (Ubuntu)<\/a><br \/>\n\u21d2 <a href=\"\/?p=3073\">memcached \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 (Ubuntu)<\/a><br \/>\n\u21d2 <a href=\"\/?p=389\">PHP 7.2 \u3068 Laravel 5.6 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 (Ubuntu)<\/a><\/p>\n<p><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-9913955142682871\" data-ad-slot=\"6645392458\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 16.04 \u306b\u3001Go\u8a00\u8a9e(golang) \u306e\u6700\u65b0\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306e\u89e3\u8aac\u3067\u3059\u3002 \u4eca\u56de\u69cb\u7bc9\u3057\u305f\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002 Ubuntu 16.04.4 golang 1.10.3 \u21d2 CentOS &#8230;<\/p>\n","protected":false},"author":1,"featured_media":760,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[109],"tags":[35,26],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu 16.04 \u306b\u6700\u65b0\u7248\u306e Go\u8a00\u8a9e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b - \u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3068\u8a2d\u5b9a \uff5e\u521d\u5fc3\u8005\u306b\u3082\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\uff5e<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu 16.04 \u306b\u6700\u65b0\u7248\u306e Go\u8a00\u8a9e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b - \u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3068\u8a2d\u5b9a \uff5e\u521d\u5fc3\u8005\u306b\u3082\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\uff5e\" \/>\n<meta property=\"og:description\" content=\"Ubuntu 16.04 \u306b\u3001Go\u8a00\u8a9e(golang) \u306e\u6700\u65b0\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306e\u89e3\u8aac\u3067\u3059\u3002 \u4eca\u56de\u69cb\u7bc9\u3057\u305f\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002 Ubuntu 16.04.4 golang 1.10.3 \u21d2 CentOS ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741\" \/>\n<meta property=\"og:site_name\" content=\"\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3068\u8a2d\u5b9a \uff5e\u521d\u5fc3\u8005\u306b\u3082\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\uff5e\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-17T13:49:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-23T17:03:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/wp-content\/uploads\/2018\/07\/a026.png\" \/>\n\t<meta property=\"og:image:width\" content=\"480\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u63a8\u5b9a\u8aad\u66f8\u6642\u9593\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/#website\",\"url\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/\",\"name\":\"\\u30b5\\u30fc\\u30d0\\u30fc\\u69cb\\u7bc9\\u3068\\u8a2d\\u5b9a \\uff5e\\u521d\\u5fc3\\u8005\\u306b\\u3082\\u5206\\u304b\\u308a\\u3084\\u3059\\u304f\\u89e3\\u8aac\\uff5e\",\"description\":\"\\u30b5\\u30fc\\u30d0\\u30fc\\u306e\\u69cb\\u7bc9\\u65b9\\u6cd5\\u3084\\u8a2d\\u5b9a\\u624b\\u9806\\u3001\\u30df\\u30c9\\u30eb\\u30a6\\u30a7\\u30a2\\u306e\\u30a4\\u30f3\\u30b9\\u30c8\\u30fc\\u30eb\\u624b\\u9806\\u30fb\\u30c8\\u30e9\\u30d6\\u30eb\\u5bfe\\u5fdc\\u306a\\u3069\\u3092\\u30b3\\u30de\\u30f3\\u30c9\\u4ed8\\u304d\\u3067\\u8a73\\u3057\\u304f\\u89e3\\u8aac\\u3057\\u307e\\u3059\\u3002\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741#primaryimage\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/wp-content\/uploads\/2018\/07\/a026.png\",\"contentUrl\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/wp-content\/uploads\/2018\/07\/a026.png\",\"width\":480,\"height\":200},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741#webpage\",\"url\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741\",\"name\":\"Ubuntu 16.04 \\u306b\\u6700\\u65b0\\u7248\\u306e Go\\u8a00\\u8a9e\\u3092\\u30a4\\u30f3\\u30b9\\u30c8\\u30fc\\u30eb\\u3059\\u308b - \\u30b5\\u30fc\\u30d0\\u30fc\\u69cb\\u7bc9\\u3068\\u8a2d\\u5b9a \\uff5e\\u521d\\u5fc3\\u8005\\u306b\\u3082\\u5206\\u304b\\u308a\\u3084\\u3059\\u304f\\u89e3\\u8aac\\uff5e\",\"isPartOf\":{\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741#primaryimage\"},\"datePublished\":\"2018-07-17T13:49:19+00:00\",\"dateModified\":\"2020-05-23T17:03:51+00:00\",\"author\":{\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/#\/schema\/person\/eca4427d8eab937cb2651081ddfb91ac\"},\"breadcrumb\":{\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/\",\"url\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/\",\"name\":\"\\u30db\\u30fc\\u30e0\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/?p=741#webpage\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/#\/schema\/person\/eca4427d8eab937cb2651081ddfb91ac\",\"name\":\"\\u7ba1\\u7406\\u4eba\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","jetpack_featured_media_url":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/wp-content\/uploads\/2018\/07\/a026.png","_links":{"self":[{"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=\/wp\/v2\/posts\/741"}],"collection":[{"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=741"}],"version-history":[{"count":1,"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=\/wp\/v2\/posts\/741\/revisions"}],"predecessor-version":[{"id":4518,"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=\/wp\/v2\/posts\/741\/revisions\/4518"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=\/wp\/v2\/media\/760"}],"wp:attachment":[{"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xn--o9j8h1c9hb5756dt0ua226amc1a.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}