How To Install and Use the screen Command on AWS Linux

Author: , August 12th, 2016

Install it: yum install screen Start it up: screen Detach from the session: Control-a d Re-attach to the session later on: screen -r This is a good reference guide: https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/

How To Fix Apache VirtualHost Overlap on Port 443 on AWS Linux

Author: , July 4th, 2016

If you get this error when starting Apache or via apachectl configtest: [warn] _default_ VirtualHost overlap on port 443, the first has precedence then you must add: NameVirtualHost *:443 to /etc/httpd/conf/httpd.conf, then restart Apache

How To Fix “No Public Key Available” Errors for apt-get update on Debian

Author: , June 29th, 2016

root@myHost # apt-get update Hit http://cloudfront.debian.net wheezy Release.gpg Hit http://cloudfront.debian.net wheezy-updates Release.gpg Hit http://cloudfront.debian.net wheezy-backports Release.gpg Hit http://cloudfront.debian.net wheezy Release Hit http://cloudfront.debian.net wheezy-updates Release Hit http://cloudfront.debian.net wheezy-backports Release Hit http://cloudfront.debian.net wheezy/main Sources Hit http://cloudfront.debian.net wheezy/main amd64 Packages Hit http://cloudfront.debian.net wheezy/main Translation-en Hit http://cloudfront.debian.net wheezy-updates/main Sources Hit http://security.debian.org wheezy/updates Release.gpg Get:1 http://cloudfront.debian.net wheezy-updates/main amd64 Packages/DiffIndex [2,488 […]

How To Fix a “Corrupted index cache file” Error in Dovecot

Author: , June 17th, 2016

Jun 17 00:02:45 inbound dovecot: IMAP(yourName): Corrupted index cache file /home/yourName/Maildir/dovecot.index.cache: invalid record size

As always, YMMV. Proceed with caution.

How To Create a PDF from Multiple Image Files on the Command Line

Author: , June 6th, 2016

convert myFile*.jpg myFile.pdf convert myFile*.png myFile.pdf

How To See a Process Tree Using the ps Command

Author: , December 16th, 2015

ps -afxt

How To Patch the Linux Ghost gethostbyname Buffer Overflow Vulnerability in glibc

Author: , January 28th, 2015

As per ARS Technica: “An extremely critical vulnerability affecting most Linux distributions gives attackers the ability to execute malicious code on servers used to deliver e-mail, host webpages, and carry out other vital functions.” To patch, run: yum update glibc Article: http://arstechnica.com/security/2015/01/highly-critical-ghost-allowing-code-execution-affects-most-linux-systems/ Amazon Alert: https://alas.aws.amazon.com/ALAS-2015-473.html Original Advisory: http://www.openwall.com/lists/oss-security/2015/01/27/9

How To Fix “Could Not Bind to Address: Permission Denied” Errors on CentOS/Amazon Linux

Author: , October 16th, 2014

Permission denied: could not bind to address To disable on the fly: # getenforce Enforcing # setenforce 0 # getenforce Permissive # sestatus To survive a reboot: # vi /etc/sysconfig/selinux Change: SELINUX=enforcing to SELINUX=disabled ~or~ SELINUX=permissive

How To Patch the ShellShock bash Bug on Older or Beta AWS Linux AMI’s

Author: , October 1st, 2014

This is the standard upgrade method for AWS Linux AMI’s:

Or use this for the version 2012.09, 2012.03, or 2011.09 repositories:

For older AWS Linux AMI’s, you may not be able to use the standard upgrade method as described in this link: https://alas.aws.amazon.com/ALAS-2014-419.html These are the steps needed to manually patch bash 4.1: […]

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 # […]