I have a lot of servers up and running doing various tasks. They run scripts, and for most of the scripts I want to know if the outcome was good or bad. Especially bad.
The most common and easy way is to send an email for most of the cases, but I don’t want to setup a mailserver such as postfix in order to do it. I prefer to just use a gmail address in order to complete the task easily.
I found an application-utility which does exactly this simple thing. It is written in perl and it is called sendEmail – not to be confused with sendmail. I figured out that because I just install it when I set up a new server, I can’t find any complete instructions and I need to search around every time in order to make it work. Note that you cannot find sendEmail in the usual yum repositories.
Continue reading Install sendEmail (simple SMTP client for Linux) on CentOS
I always use the PHP mysql native driver aka mysqlnd when I develop something serious in PHP. Because of many reasons, both of performance and software design nature.
I’ve learned the hard way that the trio mysqlnd – CentOS 6 – PHP 5.3 is never a happy story, unless you have a system administrator sitting around to compile PHP 5.3 with the mysqlnd option in configure command every time you setup another web server. I don’t want to go further to other implications, to be honest I hate being logged in as root and I try to make my visits as short as possible. Sometimes I wonder how sysadmins can like their job.
So, I took a leap of faith, I upgraded all my servers to CentOS 6.4 and I installed PHP 5.5 which ships with mysqlnd and did all the management with yum. Sweet.
It is a bit trickier than it seems though. The default PHP that ships with CentOS 6.4 is PHP 5.3.
Continue reading Setup CentOS 6.4 to run PHP 5.5
Yesterday, I wanted to install the php-mysqlnd driver on an Ubuntu Linux Server running PHP 5.3. I needed to do that in order to be able to run code like that (it fails miserably otherwise and for me that function is like a swiss knife):
$result = $stmt->get_results();
The procedure was quite straightforward, but it kind of “sacked” phpmyadmin. And when I tried to reinstall it, it was uninstalling the mysqlnd driver.
Continue reading PHP 5.3 mysqlnd driver – phpmyadmin problems on Ubuntu Linux Server 12.04
I am not a scripting expert, I have to admit that. I am not a sysadmin either. But I think that every developer has to possess wider knowledge about the tools and the platforms he uses.
At least for me, some basic – intermediate knowledge makes me more productive, has saved the day in the past and also makes my life easier.
For example, the power of Linux is that you can write scripts and schedule them with Cron to do a lot of things that is considered to be “dull-programming-stuff”. Let’s start with backups.
Or scheduling automatic backups for things that matter and are also more tricky to perform than simple file backups.
Or also monitoring website up-times and logging the results.
Continue reading bash scripting