{"id":9319,"date":"2023-03-15T11:45:32","date_gmt":"2023-03-15T03:45:32","guid":{"rendered":"https:\/\/www.hefeiyu.com\/?p=9319"},"modified":"2023-03-15T11:45:32","modified_gmt":"2023-03-15T03:45:32","slug":"ubuntu-16-04-%e4%b8%8a%e5%ae%89%e8%a3%85redash%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=9319","title":{"rendered":"Ubuntu 16.04 \u4e0a\u5b89\u88c5redash\u8bb0\u5f55"},"content":{"rendered":"<p>Ubuntu 16.04 \u4e0a\u5b89\u88c5Redash\u8bb0\u5f55<\/p>\n<ol>\n<li>\u5148\u5b89\u88c5\u597dUbuntu 16.04\uff0c\u5e76\u914d\u7f6e\u597d\u7f51\u7edc(\u672c\u4f8bIP192.168.0.36)\uff0c\u4e3b\u673a\u540dUbuntu\uff0c\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u6700\u597d\u5b89\u88c5openssh\uff0c\u65b9\u4fbf\u8fdc\u7a0b\u8fde\u63a5\u3002\u5982\u679c\u662f\u5efa\u7acb\u5728\u5404\u4e91\u670d\u52a1\u5668\u4e0a\u7684\uff0c\u6bd4\u5982\u963f\u91cc\u4e91\uff0c\u9700\u8981\u5f00\u653e\u76f8\u5e94\u7684\u7aef\u53e3\uff1a\u9632\u706b\u5899\u6216\u5b89\u5168\u7ec4\u89c4\u5219\u914d\u7f6e\u4e3a\u5141\u8bb8\u7aef\u53e3&#8221;80&#8243;\uff0c&#8221;443&#8243;\u3002<\/li>\n<li>\u5207\u6362\u6210\u7ba1\u7406\u5458\u547d\u4ee4 sudo -i<\/li>\n<li>\u4e3a\u4e86\u4e0b\u8f7d\u66f4\u5feb\uff0c\u4e0b\u8f7d\u6e90\u5207\u6362\u6210\u963f\u91cc\u6e90\uff1a\uff08\u5982\u679c\u6ca1\u6709\u5207\u6362\u6210\u7ba1\u7406\u5458\u547d\u4ee4\u9700\u8981\u52a0\u4e0asudo\uff09<\/li>\n<\/ol>\n<p>\u5907\u4efd\u6587\u4ef6sudo cp \/etc\/apt\/sources.list \/etc\/apt\/sources.list.old<\/p>\n<p>\u6253\u5f00\u6587\u4ef6 sudo vi \/etc\/apt\/sources.list<\/p>\n<p>\u5220\u9664\u539f\u5185\u5bb9\u540e\uff0c\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<p># deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ &#8211; Release amd64 (20160420.1)]\/ xenial main restricted<\/p>\n<p>deb-src http:\/\/archive.ubuntu.com\/ubuntu xenial main restricted #Added by software-properties<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial main restricted<\/p>\n<p>deb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial main restricted multiverse universe #Added by software-properties<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-updates main restricted<\/p>\n<p>deb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-updates main restricted multiverse universe #Added by software-properties<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial universe<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-updates universe<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial multiverse<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-updates multiverse<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-backports main restricted universe multiverse<\/p>\n<p>deb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-backports main restricted universe multiverse #Added by software-properties<\/p>\n<p>deb http:\/\/archive.canonical.com\/ubuntu xenial partner<\/p>\n<p>deb-src http:\/\/archive.canonical.com\/ubuntu xenial partner<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-security main restricted<\/p>\n<p>deb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-security main restricted multiverse universe #Added by software-properties<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-security universe<\/p>\n<p>deb http:\/\/mirrors.aliyun.com\/ubuntu\/ xenial-security multiverse<\/p>\n<p>\u4fdd\u5b58\u9000\u51fa\u540e\uff0c\u6267\u884c\u547d\u4ee4:<\/p>\n<p>sudo apt-get update<\/p>\n<p>sudo apt-get upgrade<\/p>\n<ol>\n<li>\u901a\u8fc7 SSH \u8fde\u63a5\u5230\u5b9e\u4f8b\u540e\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u66f4\u65b0\u5b58\u50a8\u5e93\u7f13\u5b58\u548c\u57fa\u672c\u7cfb\u7edf\uff1a<\/li>\n<\/ol>\n<p>apt update &amp;&amp; apt -y upgrade &amp;&amp; apt -y autoremove<\/p>\n<ol>\n<li>\u5b89\u88c5 Java\uff1a<\/li>\n<\/ol>\n<p>\u7531\u4e8e Metabase \u662f\u7528 Java \u7f16\u5199\u7684\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u5b89\u88c5 Java \u8fd0\u884c\u65f6\u624d\u80fd\u8fd0\u884c Metabase\u3002Metabase \u652f\u6301 Oracle Java 8 \u548c OpenJDK 8\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u5b89\u88c5 OpenJDK Java \u8fd0\u884c\u65f6\u7248\u672c 8\u3002<\/p>\n<p>apt -y install openjdk-8-jre<\/p>\n<p>\u901a\u8fc7\u8fd0\u884c java \u7248\u672c\u68c0\u67e5 Java \u662f\u5426\u6210\u529f\u5b89\u88c5\u3002<\/p>\n<p>root@aliyun:~# java -version<\/p>\n<p>openjdk version &#8220;1.8.0_162&#8221;<\/p>\n<p>OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-0ubuntu0.16.04.2-b12)<\/p>\n<p>OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)<\/p>\n<p>\u67e5\u627e\u5c06 Java \u5b89\u88c5\u5230\u7cfb\u7edf\u4e2d\u7684\u76ee\u5f55\u3002<\/p>\n<p>readlink -f \/usr\/bin\/java | sed &#8220;s:\/jre\/bin\/java::&#8221;<\/p>\n<p>\u60a8\u5e94\u8be5\u4f1a\u770b\u5230\u4ee5\u4e0b\u8f93\u51fa\u3002<\/p>\n<p>root@aliyun:~# readlink -f \/usr\/bin\/java | sed &#8220;s:\/jre\/bin\/java::&#8221;<\/p>\n<p>\/usr\/lib\/jvm\/java-8-openjdk-amd64<\/p>\n<p>\u73b0\u5728\uff0c\u6839\u636eJAVA_HOME\u5b89\u88c5\u8def\u5f84\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>echo &#8220;export JAVA_HOME=\/usr\/lib\/jvm\/java-8-openjdk-amd64&#8221; | tee -a \/etc\/profile<\/p>\n<p>source \/etc\/profile<\/p>\n<p>\u68c0\u67e5JAVA_HOME\u662f\u5426\u901a\u8fc7\u8fd0\u884c\u56de\u663e$JAVA_HOME \u8bbe\u7f6e\u3002\u4f60\u5e94\u8be5\u770b\u770b\u3002<\/p>\n<p>root@aliyun:~# echo $JAVA_HOME<\/p>\n<p>\/usr\/lib\/jvm\/java-8-openjdk-amd64<\/p>\n<ol>\n<li>\u8f85\u52a9\u5de5\u7a0b\u4e00\u952e\u5b89\u88c5<\/li>\n<\/ol>\n<p>Ubuntu\u73af\u5883\u4e0b\u5b89\u88c5Redash\u6709\u4e00\u4e2a\u8f85\u52a9\u5de5\u7a0b\uff0c\u901a\u8fc7\u8fd9\u4e2a\u8f85\u52a9\u5de5\u7a0b\u53ef\u4ee5\u5b9e\u73b0\u4e00\u952e\u5b89\u88c5\uff0c\u8fc7\u7a0b\u4e2d\u65e0\u9700\u5355\u72ec\u5b89\u88c5\u548c\u914d\u7f6edocker\u73af\u5883\uff0c\u9879\u76ee\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/getredash\/setup\">https:\/\/github.com\/getredash\/setup<\/a><\/p>\n<p>\u4e0b\u8f7d\u6587\u4ef6\uff1agit clone <a href=\"https:\/\/github.com\/getredash\/setup.git\">https:\/\/github.com\/getredash\/setup.git<\/a><\/p>\n<ol>\n<li>\u5728<\/li>\n<li>\u5728<\/li>\n<li>\u5728<\/li>\n<li>\u5728<\/li>\n<\/ol>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=9319\">Ubuntu 16.04 \u4e0a\u5b89\u88c5redash\u8bb0\u5f55<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Ubuntu 16.04 \u4e0a\u5b89\u88c5Redash\u8bb0\u5f55 \u5148\u5b89\u88c5\u597dUbuntu 16.04\uff0c\u5e76\u914d\u7f6e\u597d\u7f51\u7edc(\u672c\u4f8bIP192.168.0.36)\uff0c\u4e3b\u673a\u540dUbuntu\uff0c\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u6700\u597d\u5b89\u88c5openssh\uff0c\u65b9\u4fbf\u8fdc\u7a0b\u8fde\u63a5\u3002\u5982\u679c\u662f\u5efa\u7acb\u5728\u5404\u4e91\u670d\u52a1\u5668\u4e0a\u7684\uff0c\u6bd4\u5982\u963f\u91cc\u4e91\uff0c\u9700\u8981\u5f00\u653e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[1092,1089],"class_list":["post-9319","post","type-post","status-publish","format-standard","hentry","category-soft_install","tag-sudo","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/9319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9319"}],"version-history":[{"count":1,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/9319\/revisions"}],"predecessor-version":[{"id":9320,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/9319\/revisions\/9320"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}