Commit b47b2938 authored by wojiushixiaobai's avatar wojiushixiaobai

[Update]更新文档

parent 29d30bc5
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
.. code-block:: vim .. code-block:: vim
这是因为当前系统的 hostname 有 coco 不支持的字符, 需要手动指定 coco 的 NAME # 这是因为当前系统的 hostname 有 coco 不支持的字符, 需要手动指定 coco 的 NAME
$ cd /opt/coco/ $ cd /opt/coco/
$ vi config.yml $ vi config.yml
...@@ -141,17 +141,17 @@ ...@@ -141,17 +141,17 @@
# NAME: {{ Hostname }} # NAME: {{ Hostname }}
NAME: localhost NAME: localhost
保存后重新执行 ./cocod start 即可 # 保存后重新执行 ./cocod start 即可
17. 运行 ./cocod start 后提示 No such file or directory: '/opt/coco/xxx/xxx' 17. 运行 ./cocod start 后提示 "detail":"身份认证信息未提供。" Failed register terminal
.. code-block:: shell .. code-block:: shell
这是一个小 bug, 之后的版本会修复掉 # 保证 coco 的 BOOTSTRAP_TOKEN 与 jumpserver/config.yml 里面的内容不一致
$ cd /opt/coco $ cat /opt/jumpserver/config.yml | grep BOOTSTRAP_TOKEN
$ mkdir keys logs $ cat /opt/coco/config.yml | grep BOOTSTRAP_TOKEN
保存后重新执行 ./cocod start 即可 # 修改成一致保存后 重新执行 ./cocod start 即可
18. 运行 ./cocod start 后提示 Connect endpoint http://xxxx:8080 error: HTTPConnectionPool(host='xxxx', port=8080) 18. 运行 ./cocod start 后提示 Connect endpoint http://xxxx:8080 error: HTTPConnectionPool(host='xxxx', port=8080)
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
.. code-block:: nginx .. code-block:: nginx
这是因为你没有按照教程进行安装, 修改了安装目录, 需要在 nginx 的配置文件里面修改资源路径 # 这是因为你没有按照教程进行安装, 修改了安装目录, 需要在 nginx 的配置文件里面修改资源路径
$ vi /etc/nginx/conf.d/jumpserver.conf $ vi /etc/nginx/conf.d/jumpserver.conf
... ...
......
...@@ -57,75 +57,12 @@ ...@@ -57,75 +57,12 @@
&& systemctl restart docker \ && systemctl restart docker \
&& docker pull jumpserver/jms_coco:1.4.9 \ && docker pull jumpserver/jms_coco:1.4.9 \
&& docker pull jumpserver/jms_guacamole:1.4.9 \ && docker pull jumpserver/jms_guacamole:1.4.9 \
&& rm -rf /etc/nginx/conf.d/default.conf && rm -rf /etc/nginx/conf.d/default.conf \
&& curl -o /etc/nginx/conf.d/jumpserver.conf https://demo.jumpserver.org/download/nginx/conf.d/jumpserver.conf
.. code-block:: shell .. code-block:: shell
$ echo -e "\033[31m 4. 配置nginx \033[0m" \ $ echo -e "\033[31m 4. 处理配置文件 \033[0m" \
&& cat << EOF > /etc/nginx/conf.d/jumpserver.conf
server {
listen 80;
client_max_body_size 100m; # 录像及文件上传大小限制
location /luna/ {
try_files \$uri / /index.html;
alias /opt/luna/;
}
location /media/ {
add_header Content-Encoding gzip;
root /opt/jumpserver/data/;
}
location /static/ {
root /opt/jumpserver/data/;
}
location /socket.io/ {
proxy_pass http://localhost:5000/socket.io/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location /coco/ {
proxy_pass http://localhost:5000/coco/;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location /guacamole/ {
proxy_pass http://localhost:8081/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection \$http_connection;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}
}
EOF
.. code-block:: shell
$ echo -e "\033[31m 5. 处理配置文件 \033[0m" \
&& if [ "$DB_PASSWORD" = "" ]; then DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24`; fi \ && if [ "$DB_PASSWORD" = "" ]; then DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24`; fi \
&& if [ "$SECRET_KEY" = "" ]; then SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`; echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc; fi \ && if [ "$SECRET_KEY" = "" ]; then SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`; echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc; fi \
&& if [ "$BOOTSTRAP_TOKEN" = "" ]; then BOOTSTRAP_TOKEN=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; echo "BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN" >> ~/.bashrc; fi \ && if [ "$BOOTSTRAP_TOKEN" = "" ]; then BOOTSTRAP_TOKEN=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; echo "BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN" >> ~/.bashrc; fi \
...@@ -135,7 +72,7 @@ ...@@ -135,7 +72,7 @@
.. code-block:: shell .. code-block:: shell
$ echo -e "\033[31m 6. 启动 Jumpserver \033[0m" \ $ echo -e "\033[31m 5. 启动 Jumpserver \033[0m" \
&& systemctl start nginx \ && systemctl start nginx \
&& cd /opt/jumpserver \ && cd /opt/jumpserver \
&& ./jms start all -d \ && ./jms start all -d \
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
&& yum update -y \ && yum update -y \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& yum -y install kde-l10n-Chinese \ && yum -y install kde-l10n-Chinese \
&& yum -y reinstall glibc-common \
&& localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8 \ && localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8 \
&& export LC_ALL=zh_CN.UTF-8 \ && export LC_ALL=zh_CN.UTF-8 \
&& echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf \ && echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf \
...@@ -53,75 +52,12 @@ ...@@ -53,75 +52,12 @@
&& systemctl restart docker \ && systemctl restart docker \
&& docker pull jumpserver/jms_coco:1.4.9 \ && docker pull jumpserver/jms_coco:1.4.9 \
&& docker pull jumpserver/jms_guacamole:1.4.9 \ && docker pull jumpserver/jms_guacamole:1.4.9 \
&& rm -rf /etc/nginx/conf.d/default.conf && rm -rf /etc/nginx/conf.d/default.conf \
&& curl -o /etc/nginx/conf.d/jumpserver.conf https://demo.jumpserver.org/download/nginx/conf.d/jumpserver.conf
.. code-block:: shell .. code-block:: shell
$ echo -e "\033[31m 4. 配置nginx \033[0m" \ $ echo -e "\033[31m 4. 处理配置文件 \033[0m" \
&& cat << EOF > /etc/nginx/conf.d/jumpserver.conf
server {
listen 80;
client_max_body_size 100m; # 录像及文件上传大小限制
location /luna/ {
try_files \$uri / /index.html;
alias /opt/luna/;
}
location /media/ {
add_header Content-Encoding gzip;
root /opt/jumpserver/data/;
}
location /static/ {
root /opt/jumpserver/data/;
}
location /socket.io/ {
proxy_pass http://localhost:5000/socket.io/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location /coco/ {
proxy_pass http://localhost:5000/coco/;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location /guacamole/ {
proxy_pass http://localhost:8081/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection \$http_connection;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}
}
EOF
.. code-block:: shell
$ echo -e "\033[31m 5. 处理配置文件 \033[0m" \
&& if [ "$DB_PASSWORD" = "" ]; then DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24`; fi \ && if [ "$DB_PASSWORD" = "" ]; then DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24`; fi \
&& if [ "$SECRET_KEY" = "" ]; then SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`; echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc; fi \ && if [ "$SECRET_KEY" = "" ]; then SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`; echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc; fi \
&& if [ "$BOOTSTRAP_TOKEN" = "" ]; then BOOTSTRAP_TOKEN=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; echo "BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN" >> ~/.bashrc; fi \ && if [ "$BOOTSTRAP_TOKEN" = "" ]; then BOOTSTRAP_TOKEN=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; echo "BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN" >> ~/.bashrc; fi \
...@@ -131,7 +67,7 @@ ...@@ -131,7 +67,7 @@
.. code-block:: shell .. code-block:: shell
$ echo -e "\033[31m 6. 启动 Jumpserver \033[0m" \ $ echo -e "\033[31m 5. 启动 Jumpserver \033[0m" \
&& systemctl start nginx \ && systemctl start nginx \
&& cd /opt/jumpserver \ && cd /opt/jumpserver \
&& ./jms start all -d \ && ./jms start all -d \
......
...@@ -52,75 +52,12 @@ ...@@ -52,75 +52,12 @@
&& systemctl restart docker \ && systemctl restart docker \
&& docker pull jumpserver/jms_coco:1.4.9 \ && docker pull jumpserver/jms_coco:1.4.9 \
&& docker pull jumpserver/jms_guacamole:1.4.9 \ && docker pull jumpserver/jms_guacamole:1.4.9 \
&& rm -rf /etc/nginx/conf.d/default.conf && rm -rf /etc/nginx/conf.d/default.conf \
&& curl -o /etc/nginx/conf.d/jumpserver.conf https://demo.jumpserver.org/download/nginx/conf.d/jumpserver.conf
.. code-block:: shell .. code-block:: shell
$ echo -e "\033[31m 4. 配置nginx \033[0m" \ $ echo -e "\033[31m 4. 处理配置文件 \033[0m" \
&& cat << EOF > /etc/nginx/conf.d/jumpserver.conf
server {
listen 80;
client_max_body_size 100m; # 录像及文件上传大小限制
location /luna/ {
try_files \$uri / /index.html;
alias /opt/luna/;
}
location /media/ {
add_header Content-Encoding gzip;
root /opt/jumpserver/data/;
}
location /static/ {
root /opt/jumpserver/data/;
}
location /socket.io/ {
proxy_pass http://localhost:5000/socket.io/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location /coco/ {
proxy_pass http://localhost:5000/coco/;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location /guacamole/ {
proxy_pass http://localhost:8081/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection \$http_connection;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
access_log off;
}
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}
}
EOF
.. code-block:: shell
$ echo -e "\033[31m 5. 处理配置文件 \033[0m" \
&& if [ "$DB_PASSWORD" = "" ]; then DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24`; fi \ && if [ "$DB_PASSWORD" = "" ]; then DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24`; fi \
&& if [ "$SECRET_KEY" = "" ]; then SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`; echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc; fi \ && if [ "$SECRET_KEY" = "" ]; then SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`; echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc; fi \
&& if [ "$BOOTSTRAP_TOKEN" = "" ]; then BOOTSTRAP_TOKEN=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; echo "BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN" >> ~/.bashrc; fi \ && if [ "$BOOTSTRAP_TOKEN" = "" ]; then BOOTSTRAP_TOKEN=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; echo "BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN" >> ~/.bashrc; fi \
...@@ -130,7 +67,7 @@ ...@@ -130,7 +67,7 @@
.. code-block:: shell .. code-block:: shell
$ echo -e "\033[31m 6. 启动 Jumpserver \033[0m" \ $ echo -e "\033[31m 5. 启动 Jumpserver \033[0m" \
&& systemctl start nginx \ && systemctl start nginx \
&& cd /opt/jumpserver \ && cd /opt/jumpserver \
&& ./jms start all -d \ && ./jms start all -d \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment