Linux: 25 PHP Security Best Practices For Sys Admins

Posted on in Categories php, RedHat/Fedora Linux, Security, Sys admin, Tuning last updated November 23, 2011

PHP is an open-source server-side scripting language, and it is a widely used. The Apache/Nginx/Lighttpd web server provides access to files and content via the HTTP OR HTTPS protocol. A misconfigured server-side scripting language can create all sorts of problems. So, PHP should be used with caution. Here are twenty-five php security best practices for sysadmins for configuring PHP securely.

Linux Convert ext3 to ext4 File system

Posted on in Categories CentOS, Data recovery, Linux, Linux desktop, Linux distribution, RedHat/Fedora Linux, Storage, Suse Linux, Sys admin, Tips, Troubleshooting, Tuning, Ubuntu Linux last updated January 23, 2009

Some time ago ext4 was released and available for Linux kernel. ext4 provides some additional benefits and perforce over ext3 file system. You can easily convert ext3 to ext4 file system. The next release of Fedora, 11, will default to the ext4 file system unless serious regressions are seen. In this quick tutorial you will learn about converting ext3 to ext4 file system.

FreeBSD Turn On Process Accounting – Track System Resources Used By Users

Posted on in Categories FreeBSD, Howto, Monitoring, Security, Sys admin, Tips, Troubleshooting, Tuning last updated January 8, 2009

I’ve already written about Linux process accounting under Linux ( see how to keep a detailed audit trail of what’s being done on your Linux systems). You can easily setup process accounting under FreeBSD. This tutorial expalins how to enable and utilizing FreeBSD process accounting including many other useful options are explained to keep track of system resources used, and their allocation among users.

Apache2 mod_fastcgi: Connect to External PHP via UNIX Socket or TCP/IP Port

Posted on in Categories Apache, CentOS, fedora linux, Howto, lighttpd, Networking, php, RedHat/Fedora Linux, Security, Tips, Troubleshooting, Tuning last updated December 30, 2008

Now, mod_fastcgi is configured and running. FastCGI supports connection via UNIX sockets or TCP/IP networking. This is useful to spread load among various backends. For example, php will be severed from and python / ruby on rails will be severed from This is only possible with mod_fastcgi.

Linux: Should You Use Twice the Amount of Ram as Swap Space?

Posted on in Categories data center, Debian Linux, fedora linux, File system, FreeBSD, Gentoo Linux, kernel, Linux, Linux desktop, Linux laptop, OpenBSD, RedHat/Fedora Linux, Solaris, Storage, Suse Linux, Tuning, Ubuntu Linux, UNIX last updated November 19, 2008

Linux and other Unix-like operating systems use the term “swap” to describe both the act of moving memory pages between RAM and disk, and the region of a disk the pages are stored on. It is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast as swap partitions. Now, many admins (both Windows and Linux/UNIX) follow an old rule of thumb that your swap partition should be twice the size of your main system RAM. Let us say I’ve 32GB RAM, should I set swap space to 64 GB? Is 64 GB of swap space really required? How big should your Linux / UNIX swap space be?

CentOS / Red Hat Enterprise Linux 5.2 Poor NFS Performance and Solution

Posted on in Categories Apache, CentOS, data center, File system, High performance computing, Howto, Linux, Linux distribution, Networking, package management, RedHat/Fedora Linux, Security Alert, Storage, Sys admin, Troubleshooting, Tuning last updated August 22, 2008

A few days ago I noticed that NFS performance between a web server node and NFS server went down by 50%. NFS was optimized and the only thing was updated Red Hat kernel v5.2. I also noticed same trend on CentOS 5.2 64 bit edition.

How To Avoid Sudden Outburst Of Backup Shell Script or Program Disk I/O on Linux

Posted on in Categories High performance computing, kernel, Linux, Storage, Troubleshooting, Tuning last updated June 3, 2008

A sudden outburst of violent disk I/O activity can bring down your email or web server. Usually, a web, mysql, or mail server serving millions and millions pages (requests) per months are prone to this kind of problem. Backup activity can increase current system load too. To avoid this kind of sudden outburst problem, run your script with scheduling class and priority. Linux comes with various utilities to manage this kind of madness.