This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------- | |
iscsi troubleshooting | |
-------------------------------------------------------------------------- | |
View discovered targets | |
# iscsiadm -m node | |
12.212.84.7:3260,1 iqn.tgt-1 | |
Identify the target transport is configured as iSER | |
# iscsiadm -m node -T iqn.tgt-1 | grep -i trans | |
iface.transport_name = iser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ freebsd-version -k | |
11.1-RELEASE-p9 | |
pkg update -y | |
pkg upgrade -y | |
pkg install -y wget bmake | |
Display the network traffic going through active interfaces on the system. | |
$ systat -ifstat | |
The iostat utility displays kernel I/O statistics on terminal, device and cpu operations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zypper se --installed-only -> list all packages | |
zypper se -si virtualbox vbox kernel | |
sudo zypper pa -i --installed-only | grep nginx ->#check whether or not nginx is installed | |
zypper search mpv | |
zypper remove mpv -> remove package | |
zypper info cdcat | |
zypper info --requires cdcat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
#CIS_Kubernetes_V1.20_Benchmark_v1.0.0_PDF | |
#1.1.1 Ensure that the API server pod specification file permissions are set to 644 or more restrictive | |
Audit: | |
controlplane $ stat -c %a /etc/kubernetes/manifests/kube-apiserver.yaml | |
600 | |
controlplane $ ls -lai /etc/kubernetes/manifests/kube-apiserver.yaml | |
788143 -rw------- 1 root root 3219 Feb 3 06:52 /etc/kubernetes/manifests/kube-apiserver.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1st method Install bundler,ruby,rbenv | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update -y | |
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev | |
sudo apt-get install -y libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#===================================================================== | |
To Apply the Cron Job in Docker: | |
1️⃣ Edit the cron file: | |
echo "10 * * * * root ansible-playbook -i /ansible/inventory-switches.ini /ansible/switch-version.yml >> /var/log/ansible-cron.log 2>&1" > /etc/cron.d/ansible-cron | |
2️⃣ Set permissions and reload cron: | |
chmod 0644 /etc/cron.d/ansible-cron |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rpm -qa | grep selinux | |
libselinux-2.5-11.el7.x86_64 | |
libselinux-python-2.5-11.el7.x86_64 | |
selinux-policy-targeted-3.13.1-166.el7_4.9.noarch | |
libselinux-utils-2.5-11.el7.x86_64 | |
selinux-policy-3.13.1-166.el7_4.9.noarch | |
yum install policycoreutils policycoreutils-python selinux-policy selinux-policy-targeted libselinux-utils setroubleshoot-server setools setools-console mcstrans | |
$ getenforce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------- | |
# All-in-one openstack run on single ubuntu-16.04 vagrant VM guest. min 6GB ram required. | |
vagrant up | |
E:\PURR\openstack3>vagrant ssh-config 33b9056 | |
Host default | |
HostName 127.0.0.1 | |
User vagrant | |
Port 2222 | |
UserKnownHostsFile /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================ | |
To create a Python virtual environment on Ubuntu 24.04 and ensure you can use pip3 and python3 commands inside it, follow these steps: | |
🐍 1. Install Python and Virtual Environment Tools | |
Open a terminal and run: | |
sudo apt update | |
sudo apt install -y python3 python3-venv python3-pip | |
🛠️ 2. Create a Virtual Environment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------------------ | |
Problem: | |
The tip of your current branch is behind its remote counterpart. Try pulling before pushing again. Or, to force push, hold cmd or ctrl while clicking. | |
Fix: | |
C:\Users\verona\github\PROBLEMPROJECT>git status | |
C:\Users\verona\github\PROBLEMPROJECT>git pull | |
C:\Users\verona\github\PROBLEMPROJECT>git push (github login required) | |
------------------------------------------------------------------------------------------ | |
AtomLinter |