{"id":34656,"date":"2023-12-20T10:49:50","date_gmt":"2022-12-28T17:56:25","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/"},"modified":"2024-05-04T14:25:45","modified_gmt":"2024-05-04T06:25:45","slug":"%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/","title":{"rendered":"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>\u5728\u6ca1\u6709\u4f7f\u7528Docker\u6784\u5efa\u7684redash\u4e0a\u9047\u5230\u4e86\u9700\u8981\u91cd\u65b0\u6784\u5efa\u7684\u573a\u666f\u3002<br \/>\n\u968f\u7740redash\u7248\u672c\u7684\u66f4\u65b0\uff0c\u4e0d\u4f7f\u7528Docker\u6784\u5efa\u7684\u65b9\u6cd5\u4eceredash\u6587\u6863\u4e2d\u6d88\u5931\u4e86\u3002<br \/>\n\u5728redash\u7684\u6784\u5efa\u4e2d\uff0c\u9700\u8981\u4f7f\u7528\u8bbe\u7f6e\u811a\u672c\uff0c\u4f46\u6700\u65b0\u7684\u8bbe\u7f6e\u811a\u672c\u662f\u4eceUbuntu 18.04\u5f00\u59cb\u652f\u6301\u7684\u3002\u800c\u6211\u7684\u60c5\u51b5\u662f\u9700\u8981\u5728Ubuntu 16.04\u4e0a\u8fdb\u884c\u6784\u5efa\u3002<br \/>\nredash\u7684\u6587\u6863\u8fd8\u6ca1\u6709\u5b8c\u5168\u6574\u7406\uff0c\u7ecf\u8fc7\u4e0d\u65ad\u5c1d\u8bd5\u548c\u63a2\u7d22\uff0c\u6211\u5b8c\u6210\u4e86redash\u7684\u6784\u5efa\u3002<br \/>\n\u672c\u6587\u603b\u7ed3\u4e86\u6211\u5728\u90a3\u65f6\u7684\u6784\u5efa\u6b65\u9aa4\u3002<\/p>\n<blockquote><p>\u53c2\u8003\u6587\u732e\uff1aredash\u6587\u6863<br \/>\nhttps:\/\/redash.io\/help\/<\/p>\n<p>\u53c2\u8003\u6587\u732e\uff1a\u5173\u4e8eredash\u8bbe\u7f6e\u811a\u672c<br \/>\nhttps:\/\/github.com\/getredash\/redash\/tree\/master\/setup<\/p><\/blockquote>\n<h1>\u7ea2\u8272\u9a6e\u662f\u4ec0\u4e48\uff1f<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">OSS\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u30c4\u30fc\u30eb<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">RDB\u3084BigQuery\u3001Presto\u3068\u3044\u3063\u305f\u69d8\u3005\u306a\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u306e\u9023\u643a\u304c\u53ef\u80fd\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Active Directory\u3068\u306e\u9023\u643a\u304c\u53ef\u80fd\u3067\u3001LDAP\u306b\u3088\u308a\u30b7\u30f3\u30b0\u30eb\u30b5\u30a4\u30f3\u30aa\u30f3\u3082\u5b9f\u73fe\u53ef\u80fd\u3002<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1ed937434c4406c17a73\/5-0.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2019-01-22 11.47.40.png\" \/><\/div>\n<h1>\u8bf7\u6ce8\u610f<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u672c\u624b\u9806\u306f2018\u5e7411\u6708\u6642\u70b9\u3067\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u305f\u624b\u9806\u3067\u3042\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u6700\u65b0\u4ee5\u5916\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5165\u308c\u308b\u624b\u9806\u306f\u975e\u516c\u5f0f\u3067\u3042\u308b\u305f\u3081\u3001\u6025\u306b\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3082\u8003\u3048\u3089\u308c\u308b\u306e\u3067\u672c\u624b\u9806\u306f\u53c2\u8003\u7a0b\u5ea6\u306b\u898b\u3066\u3082\u3089\u3048\u308b\u3068\u826f\u3044\u3002<\/ul>\n<h1>\u7248\u672c\u4fe1\u606f<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">redash<\/ul>\n<\/li>\n<\/ul>\n<p>4.0.x<\/p>\n<p>OS<\/p>\n<p>Ubuntu 16.04<\/p>\n<p>Python<\/p>\n<p>2.7.12<\/p>\n<h1>\u51c6\u5907\u597d<\/h1>\n<p>\u5728\u4f7f\u7528Redash\u4e4b\u524d\uff0c\u9700\u8981\u9884\u5148\u5b89\u88c5\u4ee5\u4e0b5\u4e2a\u6700\u4f4e\u5fc5\u8981\u7684\u4e1c\u897f\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Python(2.7)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">npm(3.10.10)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Node.js(v6\u4ee5\u4e0a)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">PostgreSQL(9.3\u4ee5\u4e0a)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Redis(2.8.3\u4ee5\u4e0a)<\/ul>\n<h2>\u9019\u662f\u5982\u4f55\u5b89\u88ddPython\u3002<\/h2>\n<p>\u867d\u7136\u63a8\u8350\u4f7f\u7528 virtualenv\uff0c\u4f46\u8fd9\u6b21\u6211\u6b63\u5e38\u5b89\u88c5\u4e86\u3002<\/p>\n<ul class=\"post-ul\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/ul>\n<pre class=\"post-pre\"><code>sudo apt-get install python-dev python-dev\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>$ python -V\r\nPython 2.7.12\r\n$ pip -V\r\npip 8.1.1 from \/usr\/lib\/python2.7\/dist-packages (python 2.7)\r\n<\/code><\/pre>\n<h2>\u5b89\u88c5npm<\/h2>\n<p>\u4e3a\u4e86\u5b89\u88c5Node.js\uff0c\u5148\u5b89\u88c5npm\u3002<\/p>\n<p>\u7531\u4e8eUbuntu 16.04\u5b98\u65b9\u4ed3\u5e93\u4e2d\u7684npm\u7248\u672c\u4e0d\u591f\uff0c\u6545\u6545\u610f\u6307\u5b9a\u7248\u672c\u6765\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<ul class=\"post-ul\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/ul>\n<pre class=\"post-pre\"><code>sudo apt-get install -y build-essential\r\ncurl -sL https:\/\/deb.nodesource.com\/setup_6.x | sudo -E bash -\r\nsudo apt-get install -y nodejs\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>$ npm --version\r\n3.10.10\r\n\r\n$ node --version\r\nv6.14.4\r\n<\/code><\/pre>\n<h2>\u5b89\u88c5PostgreSQL<\/h2>\n<ul class=\"post-ul\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/ul>\n<pre class=\"post-pre\"><code>sudo sh -c \"echo 'deb http:\/\/apt.postgresql.org\/pub\/repos\/apt\/ xenial-pgdg main' &gt; \/etc\/apt\/sources.list.d\/pgdg.list\"\r\nwget --quiet -O - http:\/\/apt.postgresql.org\/pub\/repos\/apt\/ACCC4CF8.asc | sudo apt-key add -\r\nsudo apt-get update\r\nsudo apt-get install postgresql\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>$ which psql\r\n\/usr\/bin\/psql\r\n$ ps aux | grep postgres | grep -v grep\r\npostgres 14271  0.1  1.2 310900 26088 ?        S    16:42   0:00 \/usr\/lib\/postgresql\/11\/bin\/postgres -D \/var\/lib\/postgresql\/11\/main -c config_file=\/etc\/postgresql\/11\/main\/postgresql.conf\r\npostgres 14273  0.0  0.1 310900  3932 ?        Ss   16:42   0:00 postgres: 11\/main: checkpointer   \r\npostgres 14274  0.0  0.1 310900  3932 ?        Ss   16:42   0:00 postgres: 11\/main: background writer   \r\npostgres 14275  0.0  0.4 310900  8952 ?        Ss   16:42   0:00 postgres: 11\/main: walwriter   \r\npostgres 14276  0.0  0.3 311328  6628 ?        Ss   16:42   0:00 postgres: 11\/main: autovacuum launcher   \r\npostgres 14277  0.0  0.1 165816  3424 ?        Ss   16:42   0:00 postgres: 11\/main: stats collector   \r\npostgres 14278  0.0  0.2 311192  4896 ?        Ss   16:42   0:00 postgres: 11\/main: logical replication launcher \r\n<\/code><\/pre>\n<h2>\u5b89\u88c5Redis<\/h2>\n<p>\u5728Ubuntu 16.04\u7684\u5b98\u65b9\u8f6f\u4ef6\u6e90\u4e2d\u63d0\u4f9b\u7684Redis\u7248\u672c\u8f83\u65e7\uff082.3.0.6-1\uff09\uff0c\u56e0\u6b64\u9700\u8981\u6ce8\u518c\u65b0\u7684\u8f6f\u4ef6\u6e90\u3002<\/p>\n<ul class=\"post-ul\">\u30ea\u30dd\u30b8\u30c8\u30ea\u767b\u9332<\/ul>\n<pre class=\"post-pre\"><code>sudo add-apt-repository ppa:chris-lea\/redis-server\r\nsudo apt update\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30ea\u30dd\u30b8\u30c8\u30ea\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>$ sudo apt show redis-server\r\nPackage: redis-server\r\nVersion: 5:4.0.11-1chl1~xenial1\r\nPriority: optional\r\nSection: database\r\nSource: redis\r\nMaintainer: Chris Lamb &lt;lamby@debian.org&gt;\r\nInstalled-Size: 162 kB\r\nDepends: adduser, lsb-base (&gt;= 3.2-14), redis-tools (= 5:4.0.11-1chl1~xenial1), init-system-helpers (&gt;= 1.18~)\r\nDownload-Size: 90.9 kB\r\nAPT-Sources: http:\/\/ppa.launchpad.net\/chris-lea\/redis-server\/ubuntu xenial\/main amd64 Packages\r\nDescription: Persistent key-value database with network interface\r\n Redis is a key-value database in a similar vein to memcache but the dataset\r\n is non-volatile. Redis additionally provides native support for atomically\r\n manipulating and querying data structures such as lists and sets.\r\n .\r\n The dataset is stored entirely in memory and periodically flushed to disk.\r\n\r\nN: There is 1 additional record. Please use the '-a' switch to see it\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/ul>\n<pre class=\"post-pre\"><code>sudo apt install redis-server\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>$ redis-cli --version\r\nredis-cli 5.0.0\r\n$ redis-server --version\r\nRedis server v=5.0.0 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=12e155be0a2852d9\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u8d77\u52d5<\/ul>\n<pre class=\"post-pre\"><code>sudo systemctl start redis-server\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u8d77\u52d5\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>$ ps aux | grep redis\r\nredis    16358  0.1  0.4  53328  8432 ?        Ssl  16:48   0:00 \/usr\/bin\/redis-server 127.0.0.1:6379\r\nubuntu   16363  0.0  0.0  14192  1020 pts\/0    S+   16:48   0:00 grep --color=auto redis\r\n<\/code><\/pre>\n<h1>\u521b\u5efa\u7ea2\u8393\u642d\u5efa<\/h1>\n<h2>\u5b89\u88c5\u6750\u6599\u4e0b\u8f7d<\/h2>\n<p>\u7531\u4e8e\u6700\u65b0\u7248\u672c\u53ea\u80fd\u5728Docker\u4e2d\u8fdb\u884c\u6784\u5efa\uff0c\u6240\u4ee5\u9700\u8981\u4e0b\u8f7d\u4e00\u4e2a\u8f83\u65e7\u7248\u672c\u7684\u6750\u6599\u3002<\/p>\n<pre class=\"post-pre\"><code>cd \/usr\/local\/\r\nsudo git clone -b release\/4.0.x https:\/\/github.com\/getredash\/redash.git\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>$ cd \/usr\/local\/redash\r\n$ git branch\r\n* release\/4.0.x\r\n<\/code><\/pre>\n<h2>rdash\u7684\u8bbe\u7f6e<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u524d\u306e\u6e96\u5099<\/ul>\n<\/li>\n<\/ul>\n<p>\u4eca\u56de\u306e\u624b\u9806\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fsetup\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306f\u304b\u306a\u308a\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eredash\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u3001setup\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4fee\u6b63\u3057\u3001\u6bd4\u8f03\u7684\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u3082\u306e\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4e0a\u6bb5\u306b\u3042\u308bREDASH_BRANCH\u3068REDASH_VERSION\u3092\u4e0b\u8a18\u306b\u5909\u66f4\u3059\u308b<\/p>\n<pre class=\"post-pre\"><code>REDASH_BRANCH=\"${REDASH_BRANCH:-release\/4.0.x}\" # Default branch\/version to master if not specified in REDASH_BRANCH env var\r\nREDASH_VERSION=${REDASH_VERSION-4.0.1.b4038} # Install latest version if not specified in REDASH_VERSION env var\r\n<\/code><\/pre>\n<ul class=\"post-ul\">setup\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c<\/ul>\n<pre class=\"post-pre\"><code>sudo sh bootstrap.sh\r\n<\/code><\/pre>\n<h2>\u5b89\u88c5Python\u8f6f\u4ef6\u5305<\/h2>\n<pre class=\"post-pre\"><code>cd \/opt\/redash\/current\r\nsudo pip install -r requirements.txt -r requirements_dev.txt\r\n<\/code><\/pre>\n<h2>\u5b89\u88c5Node.js\u5305\u3002<\/h2>\n<pre class=\"post-pre\"><code>cd \/opt\/redash\/current\r\nsudo npm install\r\n<\/code><\/pre>\n<h2>\u5efa\u7b51<\/h2>\n<ul class=\"post-ul\">\u30d3\u30eb\u30c9\u3059\u308b\u524d\u306b\u4e00\u90e8\u30b3\u30fc\u30c9\u306b\u624b\u3092\u52a0\u3048\u308b\u3002<\/ul>\n<pre class=\"post-pre\"><code>sudo vi \/opt\/redash\/redash.4.0.1.b4038\/client\/app\/pages\/dashboards\/dashboard-list.js\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u4ee5\u4e0b\u306e\u884c(\u6700\u4e0a\u6bb5\u3042\u305f\u308a)\u3092<\/ul>\n<pre class=\"post-pre\"><code>const TAGS_REGEX = \/(^([\\w\\s]|[^\\u0000-\\u007F])+):|(#([\\w-]|[^\\u0000-\\u007F])+)\/ig;\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u3002<\/ul>\n<pre class=\"post-pre\"><code>\/* eslint-disable no-control-regex *\/\r\nconst TAGS_REGEX = \/(^([\\w\\s]|[^\\u0000-\\u007F])+):|(#([\\w-]|[^\\u0000-\\u007F])+)\/ig;\r\n\/* eslint-enable no-control-regex *\/\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u4e0a\u8a18\u5bfe\u5fdc\u5f8c\u306b\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u30d3\u30eb\u30c9\u3059\u308b\u3002<\/ul>\n<pre class=\"post-pre\"><code>sudo npm run build\r\n<\/code><\/pre>\n<blockquote><p>\u53c2\u8003\u8d44\u6599\uff1a<br \/>\n\u5173\u4e8e no-control-regex<br \/>\nhttps:\/\/code.i-harness.com\/ja\/docs\/eslint\/rules\/no-control-regex<br \/>\n\u5728 redash \u7684\u6e90\u4ee3\u7801\u4e2d\uff0c\u90e8\u5206\u5185\u5bb9\u5305\u542b\u63a7\u5236\u5b57\u7b26\uff0c\u7531\u4e8e\u6211\u4eec\u4f7f\u7528\u7684 npm \u9ed8\u8ba4\u542f\u7528\u4e86 no-control-regex\uff0c\u56e0\u6b64\u5982\u679c\u76f4\u63a5\u6784\u5efa\u4f1a\u5bfc\u81f4\u9519\u8bef\u53d1\u751f\u3002<br \/>\n\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u672c\u6b65\u9aa4\u901a\u8fc7\u4fee\u6539\u6e90\u4ee3\u7801\uff0c\u5728\u53ea\u4f7f\u7528\u63a7\u5236\u5b57\u7b26\u7684\u90e8\u5206\u4e34\u65f6\u5141\u8bb8\u63a7\u5236\u5b57\u7b26\u3002<\/p><\/blockquote>\n<h2>PostgreSQL\u7684\u914d\u7f6e<\/h2>\n<p>\u5728redash\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528Postgre\u6765\u7ba1\u7406\u7528\u6237\u7b49\u3002\u5728\u672c\u6b21\u6b65\u9aa4\u4e2d\uff0c\u7531\u4e8e\u5df2\u7ecf\u5355\u72ec\u5b89\u88c5\u4e86Postgre\uff0c\u56e0\u6b64\u9700\u8981\u5728redash\u7684\u8bbe\u7f6e\u4e2d\u6307\u5b9a\u5df2\u5b89\u88c5\u7684Postgre\u3002<\/p>\n<ul class=\"post-ul\">redash\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6<\/ul>\n<pre class=\"post-pre\"><code>sudo vi \/opt\/redash\/.env\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u5185\u306b\u4e0b\u8a18\u306e\u8a2d\u5b9a\u5024\u304c\u3042\u308b\u306e\u3067\u3001\u6b63\u3057\u3044\u3082\u306e\u306b\u5909\u66f4\u3059\u308b(\u30e6\u30fc\u30b6\u540d\u3001\u30db\u30b9\u30c8\u540d\u3001\u30dd\u30fc\u30c8\u756a\u53f7\u7b49)<\/ul>\n<pre class=\"post-pre\"><code>export REDASH_DATABASE_URL=\"postgresql:\/\/postgres:postgres@localhost:5432\/postgres\"\r\n<\/code><\/pre>\n<h2>\u521b\u5efa\u6570\u636e\u5e93\u3002<\/h2>\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306bpostgres\u30e6\u30fc\u30b6\u3067\u30ed\u30b0\u30a4\u30f3<\/ul>\n<pre class=\"post-pre\"><code>sudo su postgres\r\npsql -U postgres\r\n<\/code><\/pre>\n<ul class=\"post-ul\">DB\u306b\u30ed\u30b0\u30a4\u30f3\u5f8c\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u306b\u3066postgres\u30e6\u30fc\u30b6\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4<\/ul>\n<pre class=\"post-pre\"><code>alter role postgres with password '\u65b0\u898f\u30d1\u30b9\u30ef\u30fc\u30c9';\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30ed\u30b0\u30a4\u30f3\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code>psql postgresql:\/\/postgres:postgres@localhost:5432\/postgres\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4f5c\u6210\u3092\u884c\u3046<\/ul>\n<pre class=\"post-pre\"><code>cd \/opt\/redash\/current\r\nbin\/run .\/manage.py database create_tables\r\n<\/code><\/pre>\n<h1>\u542f\u52a8redash web\u670d\u52a1\u5668\u3002<\/h1>\n<pre class=\"post-pre\"><code>sudo supervisorctl start all\r\n<\/code><\/pre>\n<h1>Web\u7528\u6237\u754c\u9762\u7684\u8bbe\u7f6e<\/h1>\n<p>http:\/\/[\u30db\u30b9\u30c8IP]\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3002<br \/>\nAdmin\u30e6\u30fc\u30b6\u306e\u4f5c\u6210\u3092\u4fc3\u3055\u308c\u308b\u305f\u3081\u3001\u4f5c\u6210\u3059\u308b\u3002\u4f5c\u6210\u5f8c\u3001\u901a\u5e38\u5229\u7528\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n<h1>\u6700\u7ec8<\/h1>\n<p>\u8fd9\u6b21\u7684\u6b65\u9aa4\u662f\u5728\u6ca1\u6709\u4f7f\u7528Docker\u7684\u60c5\u51b5\u4e0b\u5b89\u88c5redash\uff0c\u4f46\u662f\u7531\u4e8e\u5b98\u65b9\u63a8\u8350\u5b89\u88c5Docker\uff0c\u9664\u975e\u6709\u7279\u6b8a\u60c5\u51b5\uff0c\u6211\u8ba4\u4e3a\u6700\u597d\u8fd8\u662f\u4f7f\u7528Docker\u3002<br \/>\n\u4f46\u662f\uff0c\u5982\u679c\u7c7b\u4f3c\u4e8e\u6211\u7684\u60c5\u51b5\uff0c\u9700\u8981\u5b89\u88c5\u76f8\u540c\u7248\u672c\u7684\u8bdd\uff0c\u5e0c\u671b\u8fd9\u4e2a\u6b65\u9aa4\u80fd\u591f\u4f5c\u4e3a\u53c2\u8003\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u5728\u6ca1\u6709\u4f7f\u7528Docker\u6784\u5efa\u7684redash\u4e0a\u9047\u5230\u4e86\u9700\u8981\u91cd\u65b0\u6784\u5efa\u7684\u573a\u666f\u3002 \u968f\u7740redash\u7248\u672c\u7684\u66f4\u65b0\uff0c\u4e0d\u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34656","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker - Blog - Silicon Cloud<\/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:\/\/www.silicloud.com\/zh\/blog\/\u642d\u5efaredash\uff08\u7248\u672c4-0-x\uff09\u65f6\u4e0d\u4f7f\u7528docker\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 \u5728\u6ca1\u6709\u4f7f\u7528Docker\u6784\u5efa\u7684redash\u4e0a\u9047\u5230\u4e86\u9700\u8981\u91cd\u65b0\u6784\u5efa\u7684\u573a\u666f\u3002 \u968f\u7740redash\u7248\u672c\u7684\u66f4\u65b0\uff0c\u4e0d\u4f7f\u7528 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u642d\u5efaredash\uff08\u7248\u672c4-0-x\uff09\u65f6\u4e0d\u4f7f\u7528docker\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-28T17:56:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T06:25:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1ed937434c4406c17a73\/5-0.png\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/\",\"name\":\"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-12-28T17:56:25+00:00\",\"dateModified\":\"2024-05-04T06:25:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u642d\u5efaredash\uff08\u7248\u672c4-0-x\uff09\u65f6\u4e0d\u4f7f\u7528docker\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker","og_description":"\u9996\u5148 \u5728\u6ca1\u6709\u4f7f\u7528Docker\u6784\u5efa\u7684redash\u4e0a\u9047\u5230\u4e86\u9700\u8981\u91cd\u65b0\u6784\u5efa\u7684\u573a\u666f\u3002 \u968f\u7740redash\u7248\u672c\u7684\u66f4\u65b0\uff0c\u4e0d\u4f7f\u7528 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u642d\u5efaredash\uff08\u7248\u672c4-0-x\uff09\u65f6\u4e0d\u4f7f\u7528docker\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-12-28T17:56:25+00:00","article_modified_time":"2024-05-04T06:25:45+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d1ed937434c4406c17a73\/5-0.png"}],"author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/","name":"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-12-28T17:56:25+00:00","dateModified":"2024-05-04T06:25:45+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u642d\u5efaredash\uff08\u7248\u672c4.0.x\uff09\u65f6\u4e0d\u4f7f\u7528Docker"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%90%ad%e5%bb%baredash%ef%bc%88%e7%89%88%e6%9c%ac4-0-x%ef%bc%89%e6%97%b6%e4%b8%8d%e4%bd%bf%e7%94%a8docker%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34656"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34656\/revisions"}],"predecessor-version":[{"id":98861,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34656\/revisions\/98861"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}