Category: Linux
-
Get disk usage information for MySQL databases
Ever wonder how much space your MySQL database uses? Here you go: [sql]SELECT table_schema "Database", SUM( data_length + index_length )…
-
WordPress Multisite on CentOS 7.2, Nginx 1.9.5, PHP7, batcache, and HTTP/2
It was time for an overhaul of my go-to WordPress stack. For a long while, I’ve been running PHP 5.4…
-
Get Up and Running with LetsEncrypt.org Certificates on CentOS 6 and nginx
If you don’t have git installed, use Yum to install it. [bash]sudo yum install git[/bash] Stop nginx, if it’s running.…
-
Web Server iptables Script
Here is an iptables script to set up a solid firewall on a CentOS web server. Remember to change the…
-
Nginx Load Balancer Config
[code]http { upstream myproject { server 10.0.0.2:8000 weight=2; server 10.0.0.3:8000 weight=2; server 10.0.0.4:8000 weight=2; } server { listen 80; server_name…
-
NFS Server & Client Setup on CentOS 6.4
Install NFS on the server [code]sudo su yum install nfs-utils nfs-utils-lib chkconfig nfs on service rpcbind start service nfs start[/code]…
-
Send load average to Graphite
#!/bin/bash LOAD=`cat /proc/loadavg | awk ‘{print $1}’` DATETIME=`date +%s` echo “some.system.metric.name $LOAD $DATETIME” | nc graphite.somedomain.com 2003
-
Graphite Graphs for WordPress
It’s no secret that I love Graphite. My co-workers think it’s a bit ridiculous how much data I feed into…
-
A little PHP script to watch for 404 errors
This is a quick script which reads a standard RSS feed and then grabs the response header for each feed…
-
Some Helpful Varnish Commands
Look at incoming requests for URL varnishlog -c -m RxURL:”/somepage.html” Look at requests made to the backend for URL varnishlog…