首页 > 其他分享 >安装Jumpserver Core内核

安装Jumpserver Core内核

时间:2023-02-24 19:12:05浏览次数:47  
标签:opt Core 14 18 2023 jumpserver 内核 24 Jumpserver

安装Jumpserver Core内核

netstat -tunlp |grep 

# 设置pip源,可选# 设置pip安装模块源,都是开发工程师,会告诉你的操作。
python -m pip    install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple

pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# 检查pip源
pip3 config list

# 每次运行项目都需要先执行 source /opt/py3/bin/activate 载入此环境。
# 首先确保在python虚拟环境下:我创建的虚拟环境名称叫venv1_jump
source venv1_jump/bin/activate

# 下载并解压v2最后一版本 2.28.7
cd /opt
mkdir /opt/jumpserver-v2.28.7
wget -O /opt/jumpserver-v2.28.7.tar.gz https://github.com/jumpserver/jumpserver/archive/refs/tags/v2.28.7.tar.gz
tar -xf jumpserver-v2.28.7.tar.gz -C /opt/jumpserver-v2.28.7 --strip-components 1

# 创建软连接,方便以后换版本号依旧可用
ln -s /opt/jumpserver-v2.28.7/ /opt/jumpserver
ls

# 按照jumpserver的需求环境列表安装软件版本
cd /opt/jumpserver/requirements

# 升级安装pip setuptools wheel
pip install -U pip setuptools wheel
# 从给定的需求文件requirements.txt安装软件
pip install -r requirements.txt


cd /opt/jumpserver
rm -f apps/common/utils/ip/geoip/GeoLite2-City.mmdb apps/common/utils/ip/ipip/ipipfree.ipdb
wget https://download.jumpserver.org/files/ip/GeoLite2-City.mmdb -O apps/common/utils/ip/geoip/GeoLite2-City.mmdb
wget https://download.jumpserver.org/files/ip/ipipfree.ipdb -O apps/common/utils/ip/ipip/ipipfree.ipdb

# 执行脚本安装包
source requirements/rpm_pkg.sh

# 删除apps的文件
rm -f apps/locale/zh/LC_MESSAGES/django.mo apps/locale/zh/LC_MESSAGES/djangojs.mo

# 拷贝样例配置文件config_example变为标准配置文件config.yml
cp config_example.yml config.yml

# 然后执行两条命令:

cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 50;echo
rwnnnzNNsVPPEZbHLiJL8hodCEkPGGxujdlIeFFF1jcJHTIgr

cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 16;echo
chPBhw4uFLz8z14PchPBhw4uFLz8z14P
# 修改core配置文件
vim/config.yml
# 把rwnnnzNNsVPPEZbHLiJL8hodCEkPGGxujdlIeFFF1jcJHTIgr第一个数赋值给SECRET_KEY:
# 把chPBhw4uFLz8z14PchPBhw4uFLz8z14P第二个数赋值给BOOTSTRAP_TOKEN:

cd /opt/jumpserver/apps
python /opt/jumpserver/apps/manage.py makemigrations
python /opt/jumpserver/apps/manage.py migrate

cd /opt/jumpserver
# 后台启动core -d
./jms start -d
(venv1_jump) root@jumpserver-app-t02:/opt/jumpserver#./jms start -d
2023-02-24 18:14:19 [common DEBUG] Start subscribe for expire orgs mapping from memory
2023-02-24 18:14:19 [node_assets_mapping DEBUG] Start subscribe for expire node assets id mapping from memory
2023-02-24 18:14:19 [signal_handlers DEBUG] Start subscribe setting change
2023-02-24 18:14:19 [signal_handlers INFO] Init db port mapper
2023-02-24 18:14:19 Check database connection: 0
System check identified no issues (0 silenced).
2023-02-24 18:14:19 Database connect success
2023-02-24 18:14:19 Collect static files
2023-02-24 18:14:19 Collect static files done
2023-02-24 18:14:19 Check database structure change ...
2023-02-24 18:14:19 Migrate model change to database ...
Operations to perform:
  Apply all migrations: acls, admin, applications, assets, audits, auth, authentication, captcha, common, contenttypes, django_cas_ng, django_celery_beat, jms_oidc_rp, notifications, ops, orgs, perms, rbac, sessions, settings, terminal, tickets, users
Running migrations:
  No migrations to apply.
After migration, update builtin role permissions
2023-02-24 18:14:21 Fri Feb 24 18:14:21 2023
2023-02-24 18:14:21 JumpServer version 2.0.0, more see https://www.jumpserver.org
daphne is running: 154232.
celery_default is running: 154201.
celery_ansible is running: 154308.
gunicorn is running: 154327.
beat is running: 154211.
flower is running: 154217.
daphne is running: 154232.
celery_default is running: 154201.
celery_ansible is running: 154308.
gunicorn is running: 154327.
beat is running: 154211.
flower is running: 154217.
(venv1_jump) root@jumpserver-app-t02:/opt/jumpserver#

 

标签:opt,Core,14,18,2023,jumpserver,内核,24,Jumpserver
From: https://www.cnblogs.com/Magiclala/p/17152814.html

相关文章