Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
e23c535e
Unverified
Commit
e23c535e
authored
Nov 16, 2018
by
wojiushixiaobai
Committed by
GitHub
Nov 16, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2054 from wojiushixiaobai/docs
[Update]
parents
c2b27df3
1e3560c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
81 deletions
+4
-81
setup_by_centos7.rst
docs/setup_by_centos7.rst
+4
-81
No files found.
docs/setup_by_centos7.rst
View file @
e23c535e
...
@@ -215,14 +215,6 @@ CentOS 7 安装文档
...
@@ -215,14 +215,6 @@ CentOS 7 安装文档
$ firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="172.17.0.2" port protocol="tcp" port="8080" accept"
$ firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="172.17.0.2" port protocol="tcp" port="8080" accept"
$ firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="172.17.0.3" port protocol="tcp" port="8080" accept"
$ firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="172.17.0.3" port protocol="tcp" port="8080" accept"
# 组件多节点部署
$ docker run --name jms_coco01 -d -p 2223:2222 -p 5001:5000 -e CORE_HOST=http://<Jumpserver_url> wojiushixiaobai/coco:1.4.4
$ docker run --name jms_guacamole01 -d -p 8082:8081 -e JUMPSERVER_SERVER=http://<Jumpserver_url> wojiushixiaobai/guacamole:1.4.4
# 允许 容器ip 访问宿主 8080 端口,(容器的 ip 可以进入容器查看)
$ firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="172.17.0.4" port protocol="tcp" port="8080" accept"
$ firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="172.17.0.5" port protocol="tcp" port="8080" accept"
# 172.17.0.x 是docker容器默认的IP池
# 172.17.0.x 是docker容器默认的IP池
.. code-block:: shell
.. code-block:: shell
...
@@ -236,81 +228,12 @@ CentOS 7 安装文档
...
@@ -236,81 +228,12 @@ CentOS 7 安装文档
.. code-block:: shell
.. code-block:: shell
# 配置 Nginx 整合各组件
# 配置 Nginx 整合各组件
$ vi /etc/nginx/nginx.conf
$ rm /etc/nginx/conf.d/default.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
stream {
log_format proxy '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$upstream_addr" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
access_log /var/log/nginx/tcp-access.log proxy;
open_log_file_cache off;
upstream cocossh {
server localhost:2222 weight=1;
server localhost:2223 weight=1; # 多节点
# 这里是 coco ssh 的后端ip
hash $remote_addr;
}
server {
listen 2222;
proxy_pass cocossh;
proxy_connect_timeout 10s;
proxy_timeout 24h; #代理超时
}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
# tcp_nopush on;
keepalive_timeout 65;
# 关闭版本显示
server_tokens off;
include /etc/nginx/conf.d/*.conf;
}
.. code-block:: shell
.. code-block:: shell
$ vi /etc/nginx/conf.d/jumpserver.conf
$ vi /etc/nginx/conf.d/jumpserver.conf
upstream cocows {
server localhost:5000 weight=1;
server localhost:5001 weight=1; # 多节点
# 这里是 coco ws 的后端ip
ip_hash;
}
upstream guacamole {
server localhost:8081 weight=1;
server localhost:8082 weight=1; # 多节点
# 这里是 guacamole 的后端ip
ip_hash;
}
server {
server {
listen 80;
listen 80;
...
@@ -331,7 +254,7 @@ CentOS 7 安装文档
...
@@ -331,7 +254,7 @@ CentOS 7 安装文档
}
}
location /socket.io/ {
location /socket.io/ {
proxy_pass http://
cocows
/socket.io/;
proxy_pass http://
localhost:5000
/socket.io/;
proxy_buffering off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
...
@@ -343,7 +266,7 @@ CentOS 7 安装文档
...
@@ -343,7 +266,7 @@ CentOS 7 安装文档
}
}
location /coco/ {
location /coco/ {
proxy_pass http://
cocows
/coco/;
proxy_pass http://
localhost:5000
/coco/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
...
@@ -351,7 +274,7 @@ CentOS 7 安装文档
...
@@ -351,7 +274,7 @@ CentOS 7 安装文档
}
}
location /guacamole/ {
location /guacamole/ {
proxy_pass http://
guacamole/
;
proxy_pass http://
localhost:8081
;
proxy_buffering off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment