yum repo plugins

Here’s how to disable plugin in Yum repos. # check which plugins are enabled yum repolist # disable plugins yum update --disableplugin=product-id,subscription-manager # check agin yum repolist If that doesn’t work, check the individual config files of each plugin. cd /etc/yum/pluginconf.d/ vim product-id.conf vim subscription-manager.conf Disable it. [main] enable=0

April 2, 2020 · 1 min · ulysses

gitbash .bashrc

Here’s how to find your GitBash .bashrc. # cd takes you to gitbash home cd # edit .bashrc vim ~/.bashrc You can add aliases, change prompt styles, etc. export PS1="\w: $ " alias gcloud="gcloud.cmd" alias gsutil="gsutil.cmd" alias code="cd ~/Code" cd Code

April 1, 2020 · 1 min · ulysses

aws xfs volume setup

Here’s how to setup a XFS volume. file -s /dev/nvme2n1 mkfs -t xfs /dev/nvme2n1 Mount to /data. mkdir /data mount /dev/nvme2n1 /data Add to /etc/fstab. vim /etc/fstab # # UUID=xxxxxxxxxxxxxxxxxxxxxx /data xfs defaults 0 0

March 31, 2020 · 1 min · ulysses

create swap disk

To see which disk is available for swap disk use. lsblk blkid df -Th Format the disk. fdisk /dev/xvda Create a swap disk. sudo mkswap -f /dev/xvda sudo swapon -s /dev/xvda # or sudo swapon /dev/xvda Check if swap disk is available. lsblk free -h cat /proc/swaps cat /proc/meminfo swapon -s top vmstat vmstat 1 5

March 28, 2020 · 1 min · ulysses

gcp bucket size

Here are the commands to find out the bucket size in GCP. gsutil du -s gs://bucket-name/

March 26, 2020 · 1 min · ulysses

gcp projects list

Here’s how to get a list of GCP projects. gcloud projects list Result: PROJECT_ID NAME PROJECT_NUMBER your-project-id-xxxx servers xxxxxxxxxxxx Use awk to display the project id only. gcloud projects list | awk '{print $1}' Result PROJECT ID your-project-id-xxxx

March 26, 2020 · 1 min · ulysses

ebs deleteontermination

Here’s how to set the DeleteOnTermination setting on EBS volumes. The DeleteOnTermination flag determines if an EBS volume will be kept or deleted when an EC2 instance is terminated. The DeleteOnTermination setting can be set during EC2 instance creation, or it can be applied to an existing or a running EC2 instance. The settings can be placed in a JSON file and loaded using –block-device-mappings option upon creation. During creation. ...

March 22, 2020 · 1 min · ulysses

nmap

Here’s how to list all the devices on your network using nmap. nmap -sn 192.168.0.0/24 If nmap is not installed, install it. yum install nmap apt install nmap

March 19, 2020 · 1 min · ulysses

netstat

Netstat is a utility for gathering network statistics. It comes preinstalled on most systems. If missing, here’s how to install. # Redhat, CentOS yum install net-tools # Debian, Ubuntu, Mint apt install net-tools # SLES, SUSE zypper install net-tools Here are some common and useful commands. # show version netstat -v # show routing table netstat -nr # show network interface statistics netstat -ai # show network connections netstat -ant # show network services netstat -tulpn

March 3, 2020 · 1 min · ulysses

list available php modules

Here’s how to list the available PHP modules. apt-cache search php- | less To get details about a module. apt-cache show php-curl To install a module. apt install php-curl Or install all modules. apt install php* Restart Apache after each install. systemctl restart apache2

March 2, 2020 · 1 min · ulysses