Archive for the ‘linux’ Category

Redhat/Centos: Control Apache Startup with Chkconfig

Tuesday, January 5th, 2010

Copy apachectl (or symlink it) to /etc/init.d/httpd, and add these two lines at the end of the comment section: # chkconfig: 2345 64 36 # description: script for starting and stopping httpd chkconfig --add httpd These commands will now work: service httpd start service httpd stop Additionally, apache will start when the system boots. You can ...

Linux/OSX: find out what network ports are in use

Tuesday, January 5th, 2010

To get a quick idea of what ports you have open on your local box, you can use nmap. ~ jhaddad$ nmap localhost Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-05 11:06 PST Interesting ports on localhost (127.0.0.1): Not shown: 499 closed ports, 492 filtered ports PORT STATE SERVICE 80/tcp ...

Using Kickstart to Automate CentOS VM Creation

Sunday, October 25th, 2009

I've done this using CentOS, but I'm pretty sure the same thing will work with RedHat the exact same way. Virtualization is now a commodity with several free tools available from Sun, VMWare and Xen. If you're like me, you like to create a new, clean VM for each experiment. ...

VirtualBox – SSH’ing into a VM from an outside machine

Saturday, October 24th, 2009

Note: The terminology used below also applies to VMWare. The screens are different, but the issue and the solution are the same. When creating a new VM through VirtualBox, you might have a problem SSH'ing into the box. You also might notice you get a 10.0.x.xx type address, even ...

Why is Social Q&A Not Embedded into Operating Systems and Applications?

Sunday, May 3rd, 2009

One thing that always bothered me about complex desktop applications like Adobe Photoshop or Eclipse, or even Desktop Linux is finding out how to use the more advanced features (or, truthfully, some of the basic features). I've always liked community response, so I've been on a number of mailing ...

Interesting Programmer Links

Tuesday, April 21st, 2009

Peeping into memcached. Really interesting read about how to examine what's stored in memcached. Peep uses ptrace to freeze a running memcached server, dump the internal key metadata, and return the server to a running state. If you have a good host ejection mechanism in your client, such as in ...

Linux: use lsof to find which files are open by a process

Tuesday, December 23rd, 2008

lsof works under linux and MacOS X and will help you figure out what files are open. lsof | grep 'mysqld'

Compiling libjpeg on 64 bit Centos

Monday, July 7th, 2008

I ran into an issue just now compiling libjpeg on 64 bit CentOS. I found this very helpful post that gives a workaround using a config.guess file from libtool. For some reason, I didn't have the folder he suggested, but I did have the alternative (automake). cp /usr/share/automake-1.9/config.guess . cp ...

How many lines of code?

Monday, May 5th, 2008

I was curious how many lines of code were in PHPBB 3. I only wanted to know about the .php files. find . -name '*.php' -exec wc -l {} \; | awk '{ SUM += $1 } END {print SUM}' The downside to this is that it includes whitespace ...

Problems Installing Subversion From Source On CentOS

Wednesday, March 26th, 2008

I was setting up a new server for someone, and encountered this error while I was trying to build svn /usr/bin/ld: cannot find -lexpat Now, while I can do some things on that a sys admin can, I am by no means a sys admin. I have only installed svn a ...