{"id":52719,"date":"2024-10-09T05:07:13","date_gmt":"2024-10-08T21:07:13","guid":{"rendered":"https:\/\/server.hk\/cnblog\/52719\/"},"modified":"2024-11-14T10:37:44","modified_gmt":"2024-11-14T02:37:44","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-centos-7-5%e3%80%81ubuntu-18-04-%e5%92%8c-debian-9-%e4%b8%ad%e5%ae%89%e8%a3%9d-golang-1-11","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/52719\/","title":{"rendered":"\u5982\u4f55\u5728 CentOS 7.5\u3001Ubuntu 18.04 \u548c Debian 9 \u4e2d\u5b89\u88dd Golang 1.11"},"content":{"rendered":"<h1 id=\"%e5%a6%82%e4%bd%95%e5%9c%a8-centos-7-5%e3%80%81ubuntu-18-04-%e5%92%8c-debian-9-%e4%b8%ad%e5%ae%89%e8%a3%9d-golang-1-11-mGnUdjskiM\">\u5982\u4f55\u5728 CentOS 7.5\u3001Ubuntu 18.04 \u548c Debian 9 \u4e2d\u5b89\u88dd Golang 1.11<\/h1>\n<p>Golang\uff08\u6216 Go \u8a9e\u8a00\uff09\u662f\u4e00\u7a2e\u7531 Google \u958b\u767c\u7684\u958b\u6e90\u7de8\u7a0b\u8a9e\u8a00\uff0c\u56e0\u5176\u7c21\u6f54\u6027\u548c\u9ad8\u6548\u6027\u800c\u53d7\u5230\u5ee3\u6cdb\u6b61\u8fce\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 CentOS 7.5\u3001Ubuntu 18.04 \u548c Debian 9 \u4e2d\u5b89\u88dd Golang 1.11\uff0c\u5e6b\u52a9\u958b\u767c\u8005\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n<h2 id=\"%e5%9c%a8-centos-7-5-%e4%b8%ad%e5%ae%89%e8%a3%9d-golang-1-11-mGnUdjskiM\">\u5728 CentOS 7.5 \u4e2d\u5b89\u88dd Golang 1.11<\/h2>\n<p>\u5728 CentOS 7.5 \u4e2d\u5b89\u88dd Golang 1.11 \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7d71\u7684\u8edf\u4ef6\u5305\uff1a<\/li>\n<pre><code>sudo yum update<\/code><\/pre>\n<li>\u63a5\u8457\uff0c\u4e0b\u8f09 Golang 1.11 \u7684\u5b89\u88dd\u5305\uff1a<\/li>\n<pre><code>wget https:\/\/dl.google.com\/go\/go1.11.linux-amd64.tar.gz<\/code><\/pre>\n<li>\u89e3\u58d3\u4e0b\u8f09\u7684\u6587\u4ef6\uff1a<\/li>\n<pre><code>sudo tar -C \/usr\/local -xzf go1.11.linux-amd64.tar.gz<\/code><\/pre>\n<li>\u8a2d\u7f6e\u74b0\u5883\u8b8a\u91cf\uff0c\u7de8\u8f2f ~\/.bash_profile \u6587\u4ef6\uff1a<\/li>\n<pre><code>nano ~\/.bash_profile<\/code><\/pre>\n<p>\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre><code>export PATH=$PATH:\/usr\/local\/go\/bin<\/code><\/pre>\n<li>\u4f7f\u6539\u52d5\u751f\u6548\uff1a<\/li>\n<pre><code>source ~\/.bash_profile<\/code><\/pre>\n<li>\u6aa2\u67e5 Golang \u662f\u5426\u5b89\u88dd\u6210\u529f\uff1a<\/li>\n<pre><code>go version<\/code><\/pre>\n<\/ol>\n<h2 id=\"%e5%9c%a8-ubuntu-18-04-%e4%b8%ad%e5%ae%89%e8%a3%9d-golang-1-11-mGnUdjskiM\">\u5728 Ubuntu 18.04 \u4e2d\u5b89\u88dd Golang 1.11<\/h2>\n<p>\u5728 Ubuntu 18.04 \u4e2d\u5b89\u88dd Golang 1.11 \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7d71\u7684\u8edf\u4ef6\u5305\uff1a<\/li>\n<pre><code>sudo apt update<\/code><\/pre>\n<li>\u4e0b\u8f09 Golang 1.11 \u7684\u5b89\u88dd\u5305\uff1a<\/li>\n<pre><code>wget https:\/\/dl.google.com\/go\/go1.11.linux-amd64.tar.gz<\/code><\/pre>\n<li>\u89e3\u58d3\u4e0b\u8f09\u7684\u6587\u4ef6\uff1a<\/li>\n<pre><code>sudo tar -C \/usr\/local -xzf go1.11.linux-amd64.tar.gz<\/code><\/pre>\n<li>\u8a2d\u7f6e\u74b0\u5883\u8b8a\u91cf\uff0c\u7de8\u8f2f ~\/.profile \u6587\u4ef6\uff1a<\/li>\n<pre><code>nano ~\/.profile<\/code><\/pre>\n<p>\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre><code>export PATH=$PATH:\/usr\/local\/go\/bin<\/code><\/pre>\n<li>\u4f7f\u6539\u52d5\u751f\u6548\uff1a<\/li>\n<pre><code>source ~\/.profile<\/code><\/pre>\n<li>\u6aa2\u67e5 Golang \u662f\u5426\u5b89\u88dd\u6210\u529f\uff1a<\/li>\n<pre><code>go version<\/code><\/pre>\n<\/ol>\n<h2 id=\"%e5%9c%a8-debian-9-%e4%b8%ad%e5%ae%89%e8%a3%9d-golang-1-11-mGnUdjskiM\">\u5728 Debian 9 \u4e2d\u5b89\u88dd Golang 1.11<\/h2>\n<p>\u5728 Debian 9 \u4e2d\u5b89\u88dd Golang 1.11 \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7d71\u7684\u8edf\u4ef6\u5305\uff1a<\/li>\n<pre><code>sudo apt update<\/code><\/pre>\n<li>\u4e0b\u8f09 Golang 1.11 \u7684\u5b89\u88dd\u5305\uff1a<\/li>\n<pre><code>wget https:\/\/dl.google.com\/go\/go1.11.linux-amd64.tar.gz<\/code><\/pre>\n<li>\u89e3\u58d3\u4e0b\u8f09\u7684\u6587\u4ef6\uff1a<\/li>\n<pre><code>sudo tar -C \/usr\/local -xzf go1.11.linux-amd64.tar.gz<\/code><\/pre>\n<li>\u8a2d\u7f6e\u74b0\u5883\u8b8a\u91cf\uff0c\u7de8\u8f2f ~\/.profile \u6587\u4ef6\uff1a<\/li>\n<pre><code>nano ~\/.profile<\/code><\/pre>\n<p>\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre><code>export PATH=$PATH:\/usr\/local\/go\/bin<\/code><\/pre>\n<li>\u4f7f\u6539\u52d5\u751f\u6548\uff1a<\/li>\n<pre><code>source ~\/.profile<\/code><\/pre>\n<li>\u6aa2\u67e5 Golang \u662f\u5426\u5b89\u88dd\u6210\u529f\uff1a<\/li>\n<pre><code>go version<\/code><\/pre>\n<\/ol>\n<h2 id=\"%e7%b8%bd%e7%b5%90-mGnUdjskiM\">\u7e3d\u7d50<\/h2>\n<p>\u672c\u6587\u4ecb\u7d39\u4e86\u5982\u4f55\u5728 CentOS 7.5\u3001Ubuntu 18.04 \u548c Debian 9 \u4e2d\u5b89\u88dd Golang 1.11\u3002\u9019\u4e9b\u6b65\u9a5f\u7c21\u55ae\u6613\u884c\uff0c\u80fd\u5920\u5e6b\u52a9\u958b\u767c\u8005\u5feb\u901f\u642d\u5efa\u958b\u767c\u74b0\u5883\u3002\u5982\u679c\u60a8\u9700\u8981\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u670d\u52d9\u4f86\u904b\u884c\u60a8\u7684 Golang \u61c9\u7528\uff0c\u8acb\u8003\u616e\u6211\u5011\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u63d0\u4f9b\u9ad8\u6548\u80fd\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u4ee5\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u5728 CentOS 7.5\u3001Ubuntu 18.04 \u548c Debian 9 \u4e2d\u5b89\u88dd Golang 1.11\uff0c\u7c21\u55ae\u6b65\u9a5f\u52a9\u4f60\u5feb\u901f\u4e0a\u624b Go \u8a9e\u8a00\u958b\u767c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-52719","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/52719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=52719"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/52719\/revisions"}],"predecessor-version":[{"id":52720,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/52719\/revisions\/52720"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=52719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=52719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=52719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}