Epel’s yum install does not cut it anymore at time of writing installing node.js causes a mass of 404s and file not found. current best approach : Enterprise Linux and Fedora Including Red Hatยฎ Enterprise Linuxยฎ / RHEL, CentOS and Fedora. Node.js is available from the NodeSource Enterprise Linux and Fedora binary distributions repository….
Category: Howtos
Enable Gzip Compression in Apache
This is a simple sample configuration for the impatient. Compress only a few types AddOutputFilterByType DEFLATE text/html text/plain text/xml The following configuration, while resulting in more compressed content, is also much more complicated. Do not use this unless you fully understand all the configuration details. Compress everything except images <Location /> # Insert filter SetOutputFilter…
Compact a log for any value changed except the timestamp
cat graph.log.heavy | awk -F, -vOFS=, '{l=$0; $1=""}; ! ($0 in seen) {print l; seen[$0]}' > graph.log nJoy ๐
AWS link to obtain IP ranges programmatically by service !!!
If you need to automate firewall settings for AWS by service this is a real time source of info you can pro grammatically use. https://ip-ranges.amazonaws.com/ip-ranges.json nJoy ๐
Use ssh keys to encrypt and decrypt messages
Encryption with RSA Key Pairs During the Thanksgiving holiday I wondered, “how hard would it be to encrypt and decrypt files with my SSH key?” Encryption is the purpose of public/private RSA key pairs, after all. With `openssl`, it’s not too hard. (Note: If you’re on OSX, you should install the latest versions of OpenSSL…
Gather metatdata on AWS from within EC2 instance.
So I need to get information about a particular set of machines in the cloud (AWS). EC2_INSTANCE_ID="`wget -q -O – http://instance-data/latest/meta-data/instance-id || die \"wget instance-id has failed: $?\"`" test -n "$EC2_INSTANCE_ID" || die 'cannot obtain instance-id' EC2_AVAIL_ZONE="`wget -q -O – http://instance-data/latest/meta-data/placement/availability-zone || die \"wget availability-zone has failed: $?\"`" test -n "$EC2_AVAIL_ZONE" || die 'cannot obtain…
Permanently set hostname in Fedora 22
root ~ # hostnamectl set-hostname –static "YOUR-HOSTNAME-HERE" nJoy ๐
Installing node on Fedora 22
yum install gcc-c++ make openssl-devel Install from Source code : wget http://nodejs.org/dist/v0.8.15/node-v0.8.15.tar.gz tar zxvf node-v0.8.15.tar.gz cd node-v0.8.15 ./configure make make install Install from GIT repository yum install git git clone git://github.com/joyent/node.git cd node ./configure make make install nJoy ๐
D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open “/var/lib/dbus/machine-id”
This is quite a common issue with X11 upgraded on a Centos Minimal. quick fix ( not perfect but gets the system through the hump : dbus-uuidgen > /var/lib/dbus/machine-id This should fix the issue. nJoy ๐
Bash test if port is open no external tools
Assume you do not have curl/telnet/netcat (or nc does not support -z as in later versions ?? why did they remove it ?? ) the following will work on any recent Bash version. (echo > /dev/tcp/skinner/22) >/dev/null 2>&1 && echo “Port is open” || echo “Port is closed” nJoy ๐