How To Locate Attached Disk Devices in Linux

Author: , April 24th, 2018

https://linux.die.net/man/8/lsblk # lsblk -a 1 2 3 4 5 NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT nvme1n1       259:0    0  100G  0 disk /volumes/data nvme0n1       259:1    0   20G  0 disk ├─nvme0n1p1   259:2    0   20G  0 part / └─nvme0n1p128 259:3   […]

How To Fix Peer Not Authenticated Errors While Using AWS API Tools

Author: , February 9th, 2016

I was getting the following errors when using an older version of the Amazon EC2 API Tools: $ ec2-describe-regions Unknown problem connecting to host: ‘https://ec2.amazonaws.com’ Unable to execute HTTP request: peer not authenticated The solution was to upgrade to the latest AWS CLI tools and start using the aws command instead. For example: aws ec2 […]

How To Check Amazon RDS MySQL Servers in Nagios Without Ping

Author: , August 13th, 2015

Amazon Web Services (AWS) offers MySQL Server via the Relational Database Service (RDS) offering. Unfortunately, AWS doesn’t allow ICMP Ping to reach the nodes, so as configured by default, Nagios will fail on the host check. The solution is to submit a Passive Check for that host. Login to the Nagios web console Click on […]

How To Find the AWS Region and Availability Zone Via the CLI

Author: , June 30th, 2015

/opt/aws/bin/ec2-metadata | grep placement

How To Find the RHEL/CentOS Release Version on Amazon Linux

Author: , September 9th, 2014

rpm -qa | grep epel-release | awk -F- ‘{print $3}’ Examples: RHEL5/Centos5 root@aws1:/root # cat /etc/issue Amazon Linux AMI release 2010.11.2 (beta) root@aws1:/root # rpm -qa | grep epel-release epel-release-5-4.noarch root@aws1:/root # rpm -qa | grep epel-release | awk -F- ‘{print $3}’ 5 RHEL6/Centos6 root@aws2:/root # cat /etc/issue Amazon Linux AMI release 2013.09 root@aws2:/root # […]

How To install Boto on Amazon Linux using yum and pip

Author: , August 15th, 2013

1 2 3 yum install python python /usr/bin/easy_install pip pip install boto yum install python python /usr/bin/easy_install pip pip install boto

How To Install AWS SDK v2 Using PEAR

Author: , August 3rd, 2013

1 2 3 pear upgrade pear pear -D auto_discover=1 install pear.amazonwebservices.com/sdk require ‘AWSSDKforPHP/aws.phar’; pear upgrade pear pear -D auto_discover=1 install pear.amazonwebservices.com/sdk require ‘AWSSDKforPHP/aws.phar’; http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/installation.html#installing-via-pear http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/quick-start.html http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/configuration.html

How To Install Ruby on Rails with Passenger on Apache using RVM

Author: , July 31st, 2013

These are the steps I took to get this installed on a t1.micro AWS instance. OPTIONAL: Increase virtual memory for compiling Passenger as per warnings from passenger-install-apache2-module dd if=/dev/zero of=/swap bs=1M count=1024 mkswap /swap swapon /swap BASIC INSTALLATION yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel openssl-devel libxml2-devel libxslt-devel libcurl-devel make bzip2 autoconf automake […]

How To Install s3cmd

Author: , June 7th, 2013

Install Procedure Download and extract into /usr/local: http://downloads.sourceforge.net/project/s3tools/s3cmd/1.0.1/s3cmd-1.0.1.tar.gz 1 2 3 4 5 6 cd /usr/local/bin ln -s /usr/local/s3cmd-1.0.1/s3cmd /usr/local/bin/s3cmd –configure Access Key: {ACCESS_KEY} Secret Key: {SECRET_KEY} Encryption password: {PASSWORD} cd /usr/local/bin ln -s /usr/local/s3cmd-1.0.1/s3cmd /usr/local/bin/s3cmd –configure Access Key: {ACCESS_KEY} Secret Key: {SECRET_KEY} Encryption password: {PASSWORD} Configuration saved to ‘/root/.s3cfg’ Command Line Examples List all […]

How to Block wp-login.php Attacks on WordPress Sites

Author: , May 17th, 2013

Introduction WordPress installs globally have been taking quite a hit recently, as nefarious persons continue to attempt brute-force attacks against the WordPress login page. Based on research and experimentation, I have chosen the following approach to provide security with the lowest performance hit: require a web-server-level password for all requests to the wp-login.php file. This […]