Sunday May 20

Archive for the ‘Servers’ Category

Jul
03/10
Using Symbolic Links
Last Updated on Saturday, 3 July 2010 02:41
Written by Cody Snider
Saturday, July 3rd, 2010

Symbolic links (symlinks) are an extremely useful tool to every system admin and web application developer. They work a lot like a shortcut in Windows. Let’s say you were working with a web application that used a framework that held all Javascript, CSS and image files in a tucked-away location (for the sake of this example, that location is /var/www/html/production/clientside/, making /var/www/html/production/clientside/js/ the location of the Javascript files). And you, the developer working on creating these Javascript, CSS and image files, wanted to use /js/somefile.js instead of a longer name like /production/clientside/js/somefile.js in your public-facing code. To do this, use the following commands:

ln -s /var/www/html/production/clientside/js/ /var/www/html/js/

ln -s /var/www/html/production/clientside/css/ /var/www/html/css/

ln -s /var/www/html/production/clientside/images/ /var/www/html/images/

Bear in mind that if you are using a framework that has pretty URL rules in the .htaccess file, you will have to make exclusions (below is the basic /var/www/html/.htaccess in our example framework):

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|css|js)
RewriteRule ^(.*)$ /index.php/$1 [L]

Posted under Servers  |  Comments  No Comments
Aug
14/09
Disable yum-updatesd for better performance
Last Updated on Saturday, 15 August 2009 02:17
Written by Cody Snider
Friday, August 14th, 2009

On a base server install for Centos 5.2, yum-updatesd is included and it seems like a fairly good idea to keep that running (keeps you updated). Not so and it’s safe to disable this (kill the process and disable it from starting up in the first place.

Here’s the process, I noticed an immediate speed increase in my VPS when I disabled it (among a few other thing like avahi):

/usr/bin/python -tt /usr/sbin/yum-updatesd

Posted under Servers  |  Comments  No Comments