日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

目錄
  • 官網(wǎng)
  • 簡介
  • 一、機器環(huán)境準(zhǔn)備
  • 二、安裝部署
  • 三、對接k8s集群

官網(wǎng)

https://www.jumpserver.org/

簡介

Jumpserver 是一款由python編寫開源的跳板機(堡壘機)系統(tǒng),實現(xiàn)了跳板機應(yīng)有的功能。

一、機器環(huán)境準(zhǔn)備

機器規(guī)格:4vcpu 8G 100G
操作系統(tǒng):Rocky8.6
docker: 20.10.18
mysql: 5.7.30
redis: 6.2.7

二、安裝部署

安裝docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce -y

mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://a7h8080e.mirror.aliyuncs.com"]
}
EOF
systemctl enable --now docker.service

創(chuàng)建目錄
#mkdir -p /etc/mysql/mysql.conf.d/
#mkdir -p /etc/mysql/conf.d/

#生成服務(wù)器配置文件,指定字符集
tee /etc/mysql/mysql.conf.d/mysqld.cnf <<EOF
[mysqld]
pid-file= /var/run/mysqld/mysqld.pid
socket= /var/run/mysqld/mysqld.sock
datadir= /var/lib/mysql
symbolic-links=0
character-set-server=utf8   #添加此行,指定字符集
EOF

#生成客戶端配置文件,指定字符集
tee /etc/mysql/conf.d/mysql.cnf <<EOF
[mysql]
default-character-set=utf8  #添加此行,指定字符集
EOF

docker run -d -p 3306:3306 --name mysql --restart always \
-e MYSQL_ROOT_PASSWORD=123456 \
-e MYSQL_DATABASE=jumpserver  \
-e MYSQL_USER=jumpserver      \
-e MYSQL_PASSWORD=123456       \
-v /data/mysql:/var/lib/mysql   \
-v /etc/mysql/mysql.conf.d/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf  \
-v /etc/mysql/conf.d/mysql.cnf:/etc/mysql/conf.d/mysql.cnf   mysql:5.7.30

tee  key.sh  <<EOF
#!/bin/bash
if [ ! "$SECRET_KEY" ]; then
  SECRET_KEY=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50`;
  echo "SECRET_KEY=$SECRET_KEY" >> ~/.bashrc;
  echo SECRET_KEY=$SECRET_KEY;
else
  echo SECRET_KEY=$SECRET_KEY;
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;
  echo BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN;
else
  echo BOOTSTRAP_TOKEN=$BOOTSTRAP_TOKEN;
fi
EOF

[root@easzlab-jumpserver-01 ~]# bash key.sh 
SECRET_KEY=UpxFzLs2fD6dSp80TEaDf94kbOlvUNzY4FAInjXJlXu6caVXtk
BOOTSTRAP_TOKEN=WW7EgNDSzNTGgaY1
[root@easzlab-jumpserver-01 ~]# 

docker run --name jms_all -d \
  -v /opt/jumpserver/core/data:/opt/jumpserver/data \
  -v /opt/jumpserver/koko/data:/opt/koko/data \
  -v /opt/jumpserver/lion/data:/opt/lion/data \
  -p 80:80 \
  -p 2222:2222 \
  -e SECRET_KEY=UpxFzLs2fD6dSp80TEaDf94kbOlvUNzY4FAInjXJlXu6caVXtk \
  -e BOOTSTRAP_TOKEN=WW7EgNDSzNTGgaY1 \
  -e LOG_LEVEL=ERROR \
  -e DB_HOST=172.16.88.181 \
  -e DB_PORT=3306 \
  -e DB_USER=jumpserver \
  -e DB_PASSWORD=123456 \
  -e DB_NAME=jumpserver \
  -e REDIS_HOST=172.16.88.181 \
  -e REDIS_PORT=6379 \
  -e REDIS_PASSWORD='' \
  --privileged=true \
  --restart always \
  jumpserver/jms_all:v2.25.5

安裝操作過程

[root@easzlab-jumpserver-01 ~]# mkdir -p /etc/mysql/mysql.conf.d/
[root@easzlab-jumpserver-01 ~]# mkdir -p /etc/mysql/conf.d/
[root@easzlab-jumpserver-01 ~]#
[root@easzlab-jumpserver-01 ~]# tee /etc/mysql/mysql.conf.d/mysqld.cnf <<EOF
> [mysqld]
> pid-file= /var/run/mysqld/mysqld.pid
> socket= /var/run/mysqld/mysqld.sock
> datadir= /var/lib/mysql
> symbolic-links=0
> character-set-server=utf8   #添加此行,指定字符集
> EOF
[mysqld]
pid-file= /var/run/mysqld/mysqld.pid
socket= /var/run/mysqld/mysqld.sock
datadir= /var/lib/mysql
symbolic-links=0
character-set-server=utf8   #添加此行,指定字符集
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]# ls /etc/mysql/mysql.conf.d/
mysqld.cnf
[root@easzlab-jumpserver-01 ~]# tee /etc/mysql/conf.d/mysql.cnf <<EOF
> [mysql]
> default-character-set=utf8  #添加此行,指定字符集
> EOF
[mysql]
default-character-set=utf8  #添加此行,指定字符集
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]# systemctl enable --now docker.service
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[root@easzlab-jumpserver-01 ~]# docker run -d -p 3306:3306 --name mysql --restart always \
> -e MYSQL_ROOT_PASSWORD=123456 \
> -e MYSQL_DATABASE=jumpserver  \
> -e MYSQL_USER=jumpserver      \
> -e MYSQL_PASSWORD=123456       \
> -v /data/mysql:/var/lib/mysql   \
> -v /etc/mysql/mysql.conf.d/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf  \
> -v /etc/mysql/conf.d/mysql.cnf:/etc/mysql/conf.d/mysql.cnf   mysql:5.7.30
Unable to find image 'mysql:5.7.30' locally
5.7.30: Pulling from library/mysql
8559a31e96f4: Pull complete 
d51ce1c2e575: Pull complete 
c2344adc4858: Pull complete 
fcf3ceff18fc: Pull complete 
16da0c38dc5b: Pull complete 
b905d1797e97: Pull complete 
4b50d1c6b05c: Pull complete 
d85174a87144: Pull complete 
a4ad33703fa8: Pull complete 
f7a5433ce20d: Pull complete 
3dcd2a278b4a: Pull complete 
Digest: sha256:32f9d9a069f7a735e28fd44ea944d53c61f990ba71460c5c183e610854ca4854
Status: Downloaded newer image for mysql:5.7.30
0b835bbd200cb595683a5b16e84843e351138d83330d8957367da9aff26cfcbc
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]# docker run -d -p 6379:6379 --name redis --restart always  redis:6.2.7
Unable to find image 'redis:6.2.7' locally
6.2.7: Pulling from library/redis
31b3f1ad4ce1: Pull complete 
ff29a33e56fb: Pull complete 
b230e0fd0bf5: Pull complete 
72d42747a22c: Pull complete 
22867d4f5465: Pull complete 
ae5fd86f0c58: Pull complete 
Digest: sha256:45a37e30dd2b3eb803b71296dd962bab827558ff017c1baad4d957a030415acf
Status: Downloaded newer image for redis:6.2.7
b15175c571639f9adf5e0a04c22dd2d92f68e500b8d29b6c56673534b61cf2df
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]#
[root@easzlab-jumpserver-01 ~]# tee /etc/docker/daemon.json <<-'EOF'
> {
>   "registry-mirrors": ["https://a7h8080e.mirror.aliyuncs.com"]
> }
> EOF
{
  "registry-mirrors": ["https://a7h8080e.mirror.aliyuncs.com"]
}
[root@easzlab-jumpserver-01 ~]# systemctl daemon-reload
[root@easzlab-jumpserver-01 ~]# systemctl restart docker
[root@easzlab-jumpserver-01 ~]# docker ps -a
CONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS         PORTS                                                  NAMES
b15175c57163   redis:6.2.7    "docker-entrypoint.s…"   5 minutes ago   Up 3 seconds   0.0.0.0:6379->6379/tcp, :::6379->6379/tcp              redis
0b835bbd200c   mysql:5.7.30   "docker-entrypoint.s…"   6 minutes ago   Up 3 seconds   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp   mysql
[root@easzlab-jumpserver-01 ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
redis        6.2.7     94cfe49e6758   7 days ago    113MB
mysql        5.7.30    9cfcce23593a   2 years ago   448MB
[root@easzlab-jumpserver-01 ~]# docker run --name jms_all -d \
>   -v /opt/jumpserver/core/data:/opt/jumpserver/data \
>   -v /opt/jumpserver/koko/data:/opt/koko/data \
>   -v /opt/jumpserver/lion/data:/opt/lion/data \
>   -p 80:80 \
>   -p 2222:2222 \
>   -e SECRET_KEY=UpxFzLs2fD6dSp80TEaDf94kbOlvUNzY4FAInjXJlXu6caVXtk \
>   -e BOOTSTRAP_TOKEN=WW7EgNDSzNTGgaY1 \
>   -e LOG_LEVEL=ERROR \
>   -e DB_HOST=172.16.88.181 \
>   -e DB_PORT=3306 \
>   -e DB_USER=jumpserver \
>   -e DB_PASSWORD=123456 \
>   -e DB_NAME=jumpserver \
>   -e REDIS_HOST=172.16.88.181 \
>   -e REDIS_PORT=6379 \
>   -e REDIS_PASSWORD='' \
>   --privileged=true \
>   --restart always \
>   jumpserver/jms_all:v2.25.5
Unable to find image 'jumpserver/jms_all:v2.25.5' locally
v2.25.5: Pulling from jumpserver/jms_all
675920708c8b: Pull complete 
4f4fb700ef54: Pull complete 
afb82be343e8: Pull complete 
4c3af39a3a5c: Pull complete 
f6136b206bef: Pull complete 
e61f0ddc6b98: Pull complete 
7b17c6db26b4: Pull complete 
762961625238: Pull complete 
617c06cf2a55: Pull complete 
Digest: sha256:70e83dd31a676afbb0a33c5561dfd3e2bf50c668d7628ed87faa0d1c8c8f5119
Status: Downloaded newer image for jumpserver/jms_all:v2.25.5
d62e2120ff39975d2bfce7cdd3452e3f226d09ae3f915468615e2a9ef5e73fa0
[root@easzlab-jumpserver-01 ~]# docker ps -a
CONTAINER ID   IMAGE                        COMMAND                  CREATED              STATUS              PORTS                                                                                           NAMES
d62e2120ff39   jumpserver/jms_all:v2.25.5   "./entrypoint.sh"        About a minute ago   Up About a minute   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:2222->2222/tcp, :::2222->2222/tcp, 33060-33061/tcp   jms_all
b15175c57163   redis:6.2.7                  "docker-entrypoint.s…"   11 minutes ago       Up 5 minutes        0.0.0.0:6379->6379/tcp, :::6379->6379/tcp                                                       redis
0b835bbd200c   mysql:5.7.30                 "docker-entrypoint.s…"   12 minutes ago       Up 5 minutes        0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp                                            mysql
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]# 
[root@easzlab-jumpserver-01 ~]#

docker安裝部署jumpserver?2.25.5的方法

admin admin

三、對接k8s集群

docker安裝部署jumpserver?2.25.5的方法

分享到:
標(biāo)簽:Docker 安裝 方法 服務(wù)器 部署
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運動步數(shù)有氧達人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定