{"id":428,"date":"2023-02-25T12:14:51","date_gmt":"2023-02-25T04:14:51","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=428"},"modified":"2023-04-29T21:19:11","modified_gmt":"2023-04-29T13:19:11","slug":"install-ruby-and-go-with-source-code-under-centos","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/25\/install-ruby-and-go-with-source-code-under-centos\/","title":{"rendered":"CentOS\u4e0b\u6e90\u7801\u5b89\u88c5Ruby\u53caGo"},"content":{"rendered":"<h2>\u5b89\u88c5\u4f9d\u8d56<\/h2>\n<pre><code>yum install wget gcc gcc-c++ g++ autoconf autoconf2.13 automake make cmake m4 openssl openssl-devel curl libcurl-devel zlib-devel libxml2-devel gettext-devel gdbm-devel readline-devel ncurses-devel libffi-devel libyaml-devel libxslt-devel libicu-devel logrotate python-docutils krb5-devel<\/code><\/pre>\n<p><!-- more --><\/p>\n<h2>\u5b89\u88c5Ruby<\/h2>\n<pre><code># rpm -qa | grep -i ruby\n# wget https:\/\/cache.ruby-lang.org\/pub\/ruby\/2.4\/ruby-2.4.1.tar.gz\n# tar -xzf ruby-2.4.1.tar.gz\n# cd ruby-2.4.1\/\n# .\/configure --prefix=\/usr\/local\/ruby --disable-install-rdoc\n# make\n# make install\n# ln -s \/usr\/local\/ruby\/bin\/ruby \/usr\/bin\/ruby  \/\/\u653e\u5728\/usr\/local\/bin\/\u76ee\u5f55\u4e0b\u53ea\u80fd\u4e3a\u5f53\u524d\u7528\u6237\u8bc6\u522b\uff0c\u653e\u5728\/usr\/bin\/\u76ee\u5f55\u4e0b\u53ef\u4ee5\u4e3a\u6240\u6709\u7528\u6237\u8bc6\u522b\n# ln -s \/usr\/local\/ruby\/bin\/gem \/usr\/bin\/gem\n# ruby -v\n# gem -v\n# gem sources --remove https:\/\/rubygems.org\/  \/\/\u6700\u597d\u4e0d\u8981\u5220\u9664\u9ed8\u8ba4\u6e90\n# gem sources -a https:\/\/ruby.taobao.org\/  \/\/\u4fee\u6539ruby\u7684\u6e90\u4e3a\u6dd8\u5b9d\n# gem sources -u  \/\/\u66f4\u65b0\u7f13\u5b58\n# gem sources -l  \/\/\u5217\u51fa\u6e90\n# gem install bundler --no-ri --no-doc\n# ln -s \/usr\/local\/ruby\/bin\/bundle \/usr\/bin\/bundle\n# bundle -v<\/code><\/pre>\n<h2>\u5b89\u88c5Go<\/h2>\n<pre><code># wget https:\/\/storage.googleapis.com\/golang\/go1.8.3.linux-amd64.tar.gz\n# tar -xzf go1.8.3.linux-amd64.tar.gz -C \/usr\/local\/\n# ln -sf \/usr\/local\/go\/bin\/{go,godoc,gofmt} \/usr\/bin\/  \/\/\u653e\u5728\/usr\/local\/bin\/\u76ee\u5f55\u4e0b\u53ea\u80fd\u4e3a\u5f53\u524d\u7528\u6237\u8bc6\u522b\uff0c\u653e\u5728\/usr\/bin\/\u76ee\u5f55\u4e0b\u53ef\u4ee5\u4e3a\u6240\u6709\u7528\u6237\u8bc6\u522b\uff0c\u540e\u9762\u7684git\u7528\u6237\u5c31\u8981\u7528\u5230go\n# go version<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u4f9d\u8d56 yum install wget gcc gcc-c++ g++ autoconf autoconf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[137,136],"class_list":["post-428","post","type-post","status-publish","format-standard","hentry","category-devops-base","tag-go","tag-ruby"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/428\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}