echo_color
echo_color #!/usr/bin/env bashecred='\033[0;31m'ecyellow='\033[0;33m'ecgreen='\033[32m'ecend='\033[0m'echo_red() { echo -e "${ecred}$@${ecend}"}echo_yellow() { echo -e "${ecyellow}$@${ecend}"}echo_green() {echo -e "${ecgreen}$@${ecend}"} 格式解析 Colors Reference 字颜色:30—–37 echo -e “\033[30m 黑色字 \033[0m” echo -e “\033[31m 红色字 \033[0m” echo -e “\033[32m 绿色字 \033[0m” echo -e “\033[33m 黄色字 \033[0m” echo -e “\033[34m 蓝色字 \033[0m” echo -e “\033[35m 紫色字 \033[0m” echo -e “\033[36m 天蓝字 \033[...
Linux Quick Commands
Linux Quick Commands PS1 PS1="┌──\u@\h:\w\n└─\$ "┌──ubuntu@instance-20260728-0031:~└─$ Manufacturer information: dmidecode -t memory Temporarily allow the required algorithms directly in your SSH command: ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa user@hostname Convert line break CRLF to LF. sed -i 's/\r//g' a.txt Convert file encoding. file input.txticonv -f UTF-16 -t UTF-8 input.txt -o output.txt Rename files. find . -name "* *.md" -exec rename -f 's/ /-/g...
lsb_functions
lsb_functions ## Use LSB init script functions for printing messages, if possible#lsb_functions="/lib/lsb/init-functions"if test -f $lsb_functions ; then . $lsb_functionselse # Include non-LSB Redhat init functions to make systemctl redirect work init_functions="/etc/init.d/functions" if test -f $init_functions; then . $init_functions fi log_success_msg() { echo " SUCCESS! $@" } log_failure_msg() { echo " ERROR! $@" }fi
oracle_11g_setup
oracle_11g_setup #! /usr/bin/env bash# set -e Exit immediately if a command exits with a non-zero status.set -esource /assets/colorechotrap "echo_red '******* ERROR: Something went wrong.'; exit 1" SIGTERMtrap "echo_red '******* Caught SIGINT signal. Stopping...'; exit 2" SIGINT#Install prerequisites directly without virtual packagedeps () { echo "Installing dependencies" yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 \ ksh elfutils-libelf elfutils-libelf-devel glib...
Brocade SAN Switch Configuration
Brocade SAN Switch Configuration Default IP and User IP: 10.77.77.77 User: admin/password root/fibranne Init switchname SW1tstimezone Asia/Shanghaidate "0101235922"tsclockserver "192.168.2.1"ipaddrsetipaddrshow Zoning For safety and consistent setup, always log in to the principal switch to configure the Zone. # Add alias/zoning/cfgalicreate "Esxi168_HBA0","10:00:00:00:c9:60:15:2a"zonecreate "Esxi168_HBA0_VNX5200_01_SPA01","Esxi168_HBA0;VNX5200_01_SPA01"cfgadd "HIS_CONFIG","Esxi168_HB...
Brocade SAN Switch Upgrade Firmware
Brocade SAN Switch Upgrade Firmware we use the firmwareshow command to see which firmware version is currently installed on the switch. Next, we are going to initiate a firmwaredownload command and put in all the required options. The Server name or IP Address is the IP address of your workstation that hosts the FTP server. The Username is the FTP user. The filename is the folder where the firmware is residing in and for Network Protocol, choose FTP. Lastly, put in the ...
Oracle ILOM
Oracle ILOM ・ Oracle Integrated Lights Out Manager (ILOM) 3.2 Documentation Library (简体中文) | Assigning a Static IP Address to the SP Log In to the SP (SER MGT Port) a. Configure a terminal or terminal emulator with these settings: 9600 baud, 8 bits, No parity, 1 Stop bit, No handshake. b. Default user root and password changeme. Use the password command to change the root password -> set /SP/users/root password Assign a Static IP Address to the NET MGT Port If you plan to connect to...
HACMP Add a Logical Volume
HACMP Add a Logical Volume smitty hacmp-> System Management (C-SPOC)-> Storage-> Logical Volumes-> Add a Logical Volume-> <pacsdatavg>
Replacing a disk drive or solid-state drive for mirrored rootvg in AIX
Replacing a disk drive or solid-state drive for mirrored rootvg in AIX 查看系统故障日志,确定故障硬盘信息。 ]/# errptIDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTIONEAA3D429 1113051522 U S LVDD PHYSICAL PARTITION MARKED STALEE86653C3 1113051522 P H LVDD I/O ERROR DETECTED BY LVMB6267342 1113051522 P H hdisk0 DISK OPERATION ERROR]/#errpt -aj B6267342......Diagnostic AnalysisDiagnostic Log sequence number: 2639Resource tested: hdisk0Resource Description: SAS Disk...
Create an AIX 7.2 VM on QEMU
Create an AIX 7.2 VM on QEMU Reference: QEMU - AIX on x86 Installing Qemu on Ubuntu. sudo apt-get install qemu-system Create a disk file. qemu-img create -f qcow2 /mnt/e/Qemu/AIX_v7.2/hdisk0.qcow2 20G Create an AIX VM. qemu-system-ppc64 -cpu POWER8 -machine pseries,accel=tcg -m 4096 -serial stdio \-drive file=/mnt/e/Qemu/AIX_v7.2/hdisk0.qcow2,if=none,id=drive-virtio-disk0 \-device virtio-scsi-pci,id=scsi \-device scsi-hd,drive=drive-virtio-disk0 \-cdrom /mnt/e/Downloads/AIX_v7.2_Install_72...













