Mount VirtualBox Additions disk through the VirtualBox UI.
yum install -y gcc kernel-devel-`uname -r` mkdir /mnt/cdrom mount -o ro -t iso9660 /dev/cdrom /mnt/cdrom sh /mnt/cdrom/VBoxLinuxAdditions-amd64.run Info found on tuxtraining.com
linux
- When you’re in a shell, and you want to do 1 or 2 commands in another brand new shell, but don’t feel like opening a new window, try using a subshell. Here’s an example: ~ jhaddad$ pwd /Users/jhaddad ~ jhaddad$ ( cd /tmp/; touch bacon.txt ) ~ jhaddad$ pwd /Users/jhaddad ~ jhaddad$ ls -lah /tmp/bacon.txt -rw-r--r-- 1 jhaddad wheel 0B Apr 15 13:09 /tmp/bacon.txt Why I like it: I can very quickly fire off a command that involves changing directories without having to switch back to my pwd.
- 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 accomplish this by using rc.local too, if you prefer, but I think it’s more convenient to have everything be service based where you can use chkconfig to manage startup / shutdown.
- 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 open http 88/tcp open kerberos-sec 548/tcp open afp 631/tcp open ipp 3306/tcp open mysql 3325/tcp open unknown 5900/tcp open vnc 9000/tcp open cslistener 10000/tcp open snet-sensor-mgmt
- 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. However, this comes with a drawback - the installation process, choosing your timezone, putting in the same password every time, etc… takes a while.
- 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 though the rest of your network is a 192.168.xx.xxx deal. Yes, the two are related. Essentially what’s happening is the VM is sitting on it’s on little private line, where it can go out but nothing can reach it.
- 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 lists and it’s usually really helpful. What if these types of useful feedback were available within the application itself? You could literally just type a question into your help box, and a minute later you would get answers.
- 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 the Twitter libmemcached builds, you won’t even have to change the production server pool. The instance is not restarted, and no data is lost.
- lsof works under linux and MacOS X and will help you figure out what files are open. lsof | grep ‘mysqld’
- 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 /usr/share/automake-1.9/config.sub . I copied the above files into my jpeg-6b directory, and ./configure –enable-shared –enable-static worked correctly.