How to configure cisco catalyst switch

How to configure cisco catalyst switch Clean session #Show current login users show users # terminal a user clear line vty 0 Set Session timeout exec timeout command is sused to specify the timeout for exec sessions[telnet/ssh] whereas session timeout command specifies the idle timeout period for all the sessions. config t line vty 0 15 exec-timeout 10 session-timeout 10 #Check configure sh run | be line vty How to fix %Error opening tftp://255.

Learning Golang 01

#Learning Golang notebook –001 How to install golang Set go workspace Go still expects there to be a single workspace for third-party Go tools installe via go install.By default,this workspace is located in $HOME/go. $HOME/go/src $HOME/go/bin $HOME Install golang with homebrew brew install go 2 set GOPATH on unix like os. cat << EOF >> ~/.zshrc export GOPATH=$HOME/go export PATH=$PATH:%GOPATH/bin set GOPATH on window setx GOPATH $USERPROFILE%\go setx path "%PATH%;%USERPROFILE%\bin" GO command go run go build hello world # hello.

How to Init Local Project and Push to Git Server

How to init Local project and push it to git server Create local project git init Create a repositories on git server https://mygitserver/my/myproject.git Add remote origin git remote add origin https://mygitserver/my/myproject.git Pull remote master branche and merge it with local master branche. git pull origin master:master Push local branch to remote git push -u origin master Add local project and push it on git server git add -A git commit -m "Inistal at first" git push --set-upstream origin master

How to Install Gitea With Docker-Compose

How to Install Gitea with Docker-Compose cat << EOF >> docker-compose.yaml version: "3" networks: gitea: external: false services: server: image: gitea/gitea:1.13.6 container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 - DB_TYPE=mysql - DB_HOST=db:3306 - DB_NAME=gitea - DB_USER=gitea - DB_PASSWD=gitea restart: always networks: - gitea volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "222:22" depends_on: - db db: image: mysql:5.7 restart: always environment: - MYSQL_ROOT_PASSWORD=gitea - MYSQL_USER=gitea - MYSQL_PASSWORD=gitea - MYSQL_DATABASE=gitea networks: - gitea volumes: - .

How to Rename Vm Id on Pve

How to rename VMID on PVE VMID=121 && \ NEW_VMID=1001 && \ POOL_NAME=tank && \ qm unlock $VMID && \ qm stop $VMID && \ sed -i "s/$VMID/$NEW_VMID/g" /etc/pve/qemu-server/$VMID.conf && \ mv /etc/pve/qemu-server/$VMID.conf /etc/pve/qemu-server/$NEW_VMID.conf && \ rbd --pool $POOL_NAME rename vm-$VMID-disk-0 vm-$NEW_VMID-disk-0 &&\ qm start $NEW_VMID

How to Setup Opencase on Pve6

How to setup open cas on pve 6.x Install prepare software apt update && apt -y dist-upgrade apt install -y make gcc build-essential apt install -y pve-kernel-$(uname -r) apt install -y pve-headers-$(uname -r) OPENCAS_VERSION=20.12.2.0444 OPENCAS_SOFTWARE=open-cas-linux-$OPENCAS_VERSION.release wget https://github.com/Open-CAS/open-cas-linux/releases/download/v20.12.2/$OPENCAS_SOFTWARE.tar.gz tar -zxvf $OPENCAS_SOFTWARE.tar.gz # compile with DKMS apt update && apt install -y dkms cp -r $OPENCAS_SOFTWARE /usr/src/ cat << EOF >>/usr/src/$OPENCAS_SOFTWARE/dkms.conf PACKAGE_NAME="open-cas-linux" #PACKAGE_VERSION="20.12.2.0444" PACKAGE_VERSION="$OPENCAS_VERSION" PRE_BUILD="configure" AUTOINSTALL="yes" CLEAN="make clean" MAKE[0]="'make'" BUILT_MODULE_NAME[0]="cas_disk" BUILT_MODULE_LOCATION[0]="modules/cas_disk" DEST_MODULE_LOCATION[0]="/extra" BUILT_MODULE_NAME[1]="cas_cache" BUILT_MODULE_LOCATION[1]="modules/cas_cache" DEST_MODULE_LOCATION[1]="/extra" EOF OPENCAS_VERSION=20.

How to Install Pbs on Debian 10

How to Install PBS on Debian 10 export LANGUAGE=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 #locale-gen en_US.UTF-8 cat >> /etc/environment <<EOF LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 EOF cat << EOF > /etc/apt/sources.list deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free EOF apt update && apt dist-upgrade -y apt install -y net-tools dnsutils vim firmware-linux-nonfree CODENAME=`cat /etc/os-release |grep CODENAME |cut -f 2 -d "="` echo "deb https://mirrors.

Bcache

How to operate becache Recently I just try to add bcache with zfs and ceph. So I just wirte down it. Install bcache-tools Since bcache implement in Linux kernel. So it will default enabled. We just need to install bcache-tools to operate bcache. apt install -y bcache-tools Configure bcache # make a cache disk for bcache .It must be a ssd disk. make-bcache -C /dev/nvme1n1 # make a disk as

How to Install Vlmcsd on Debian

How to Install VLMCSD on debian VLMCSD vlmcsd-1113-2020-03-28-Hotbird64 Download and install VLMCSD_VERSION=svn113 curl -fsSLO https://github.com/Wind4/vlmcsd/releases/download/$VLMCSD_VERSION/binaries.tar.gz tar -zxvf binaries.tar.gz sudo cp -af ./binaries/Linux/intel/glibc/vlmcsd-x64-glibc /usr/local/bin/ chown root:root /usr/local/bin/vlmcsd-x64-glibc chmod +x /usr/local/bin/vlmcsd-64-glibc sudo bash -c 'cat > /lib/systemd/system/vlmcsd.service' << EOF [Unit] Description=vlmcsd service [Service] ExecStart=/usr/local/bin/vlmcsd-x64-glibc -l /var/log/vlmcsd-64-glibc.log > /dev/null 2>&1 Restart=on-failure RestartSec=42s [Install] WantedBy=multi-user.target EOF #Reload systemctl daemon sudo systemctl daemon-reload #Delete temp directory. sudo rm -rf ./binaries sudo rm -rf ./binaries.tar.gz #Enable

How to Install Proxmox VE 6 on Debian 10

How to Install Proxmox VE 6 on Debian 10 Install debian 10 Modifiy hostname and hosts file export LANGUAGE=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 #locale-gen en_US.UTF-8 cat >> /etc/environment <<EOF LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 EOF cat << EOF > /etc/apt/sources.list deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free EOF apt update && apt dist-upgrade -y apt install -y net-tools dnsutils vim firmware-linux-nonfree #sed -i 's/127.

Install and Configure Snmp on Debian 10

Install and Configure snmp on debian 10 INSTALL SNMP apt install -y snmpd snmp libsnmp-dev CONFIGURE SNMP ON DEBIAN 10 backup original configure file. cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig Edit snmpd.conf agentAddress udp:127.0.0.1:161,udp:192.168.1.1:161

How to Install Freedns Go on Vyos

#Switch to root mode sudo su #Define freedns version freedns_version=v2020.9.17 #Create dcompass temp folder sudo mkdir -p /tmp/freedns # Swich to folder just we created. cd /tmp/freedns #Download dcompass binary sudo curl -fsSLO "https://github.com/tuna/freedns-go/releases/download/$freedns_version/freedns-go-linux-amd64" sudo cp -af /tmp/freedns/freedns-go-linux-amd64 /usr/local/bin/freedns sudo chown root:root /usr/local/bin/freedns sudo chmod +x /usr/local/bin/freedns sudo bash -c 'cat > /lib/systemd/system/freedns.service' << EOF [Unit] Description=freedns service [Service] ExecStart=/usr/local/bin/freedns -f 114.114.114.114:53 -c 8.8.8.8:53 -l 127.0.0.3:53 Restart=on-failure RestartSec=42s [Install] WantedBy=multi-user.

How to Extend Free Disk Space for Macos

Extend disk with diskutils Delete partition “Free Space” to extend disk to current macos partition. Fixed Error “The new size must be different than the existing size” #repair (internal, disk0 - in your case) diskutil repairdisk disk0 #resize (synthesized, disk1 - in your case with HS) diskutil apfs resizeContainer disk1 0 Reference Cannot resize APFS partition - “The new size must be different than the existing size”