DevOps

PHP 5.4.x on CentOS 6.5

PHP 5.4.x on CentOS 6.5

Quick copy and paste list of commands to get PHP 5.4 on CentOS boxes wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm Enable remi repo sudo nano /etc/yum.repos.d/remi.repo Update sudo yum update sudo yum info php Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirror.optus.net * epel: fedora.mirror.serversaustralia.com.au * extras: ftp.swin.edu.au * remi: remi.kazukioishi.net * updates: ftp.swin.edu.au Available Packages Name : php Arch : x86_64 Version : 5.
HHVM on Amazon EC2 in 2 minutes

HHVM on Amazon EC2 in 2 minutes

Probably you already heard about  HHVM . As on their website:

HHVM is an open-source virtual machine designed for executing programs written in Hack  and PHP . HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides.

Using simple terms – HHVM allows you run scripts written in PHP but much, much more faster. Obviously you the main purpose of HHVM is to run HACK language, but it works pretty good with PHP itself.

MongoDB vs MySQL using golang

MongoDB vs MySQL using golang

I’m the guy who like to test. Benchmark is my… middle name. You can find dozens articles about speed one or other solution. I mean MongoDB and MySQL . I tried MongoDB couple times, and each time I wasn’t  moved by it speed. Got project coming in, when I have to deal with large amount of concurrent connection. It’s not very big, but bigger then casual MySQL load.

So… how did I test – very dump way. Got 2 tables, one around 11k records, second one close to 200k record. Not much. Fields were indexed in both MySQL and MongoDB. And then i run benchmarks. First one had string fields, second one numeric.

Sending emails from commandline

Sending emails from commandline

Pretty easy but annoying task. Especially when you want to send email using specific SMTP server, or from GMAIL using SSL or add some attachment, or send RAW emails. Solution is there – mailsend . Extremely simple command line tool for Linux, Mac OS X and even Windows ;). Compile / download binary and you can enjoy freedom of sending emails from command line.

CentoOS 7 NFS support

CentoOS 7 NFS support

CentOS is pretty new, and some default stuff is just missing. Like NFS suport out of the box. We have to install package called nfs-utils yum -y install nfs-utils we can mount using standard mount 192.168.1.15:/c/share mount -a to make it parmament edit /etc/fstab 192.168.1.15:/c/share /mnt/nfs nfs defaults 0 0