Scripts to setup jumpserver in CentOS7.
After clone this repository, run the following command to deploy jumpserver:
bash setup.sh
Check log file if some errors happen when runing the command above:
| #! /usr/bin/env python | |
| import threading | |
| import subprocess | |
| import traceback | |
| import shlex | |
| class Command(object): | |
| """ | |
| Enables to run subprocess commands in a different thread with TIMEOUT option. |
sgdisk -n 0:0:+1MiB -t 0:ef02 -c 0:grub /dev/sda
sgdisk -n 0:0:+1GiB -t 0:ea00 -c 0:boot /dev/sda
sgdisk -n 0:0:+4GiB -t 0:8200 -c 0:swap /dev/sda
sgdisk -n 0:0:+50GiB -t 0:8300 -c 0:root /dev/sda
sgdisk -n 0:0:0 -t 0:8300 -c 0:home /dev/sda| #!/bin/bash | |
| # ofed-ubuntu.sh | |
| # Install Mellanox Ofed on Ubuntu Machines | |
| # | |
| # Author: Nilson Lopes (06/17/2021) | |
| ubuntu_release=$(awk -F '"' '/VERSION_ID/ {print $2}' /etc/os-release) | |
| mofed_package_version='latest' | |
| mofed_repo_base_url="https://linux.mellanox.com/public/repo/mlnx_ofed" |
| #!/bin/bash | |
| ## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT | |
| # Quit on first error | |
| set -e | |
| # Temporary directory for the build | |
| TMP="/var/tmp/ubuntu-build" |
| --- if_mcx.c Thu Nov 5 09:48:26 2020 | |
| +++ /usr/src/sys/dev/pci/if_mcx.c Thu Nov 5 09:39:32 2020 | |
| @@ -839,6 +839,7 @@ | |
| #define MCX_CAP_DEVICE_PORT_MODULE_EVENT \ | |
| 0x80 | |
| #define MCX_CAP_DEVICE_PORT_TYPE 0x03 | |
| +#define MCX_CAP_DEVICE_PORT_TYPE_ETH 0x01 | |
| uint8_t num_ports; | |
| uint8_t snapshot_log_max_msg; |
A - Prepare USB with Drivers
You'll need a USB drive formatted as FAT32
Create a folder in the USB, named drivers or any other name easy to remember.
Download Intel VROC driver from Supermicro https://www.supermicro.com/wftp/driver/VROC/
Password: 512900 or Jinhua1920unauthorized
<HP 1920G Switch>_cmdline-mode on
[HP 1920G Switch] ipsetup ip-address 192.168.1.2 24 default-gateway 192.168.1.1
[HP 1920G Switch] save
[HP 1920G Switch] reboot| def ____run(self, command): | |
| procs = {} | |
| for node in self.nodes: | |
| ip = node['ip'] | |
| user = node['user'] | |
| password = node['password'] | |
| cmd = f'ipmitool -H {ip} -U {user} -P {password} {command}' | |
| procs[ip] = subprocess.Popen(cmd, | |
| shell=True, | |
| stdout=subprocess.PIPE, |