List VMs in ESX 5.1

To get a description of all the vms on an ESX 5.1 box use the following: ~ # vim-cmd vmsvc/getallvms | grep vmx | awk '{ print $2 }'

Moving a machine from one VM or physical box to another

This is the simple case where all we have is one disk that needs cloning. Assumptions for the following example Tools including backtrack distro available and permissible by company policy ( some c**ts get all agitated when sysadmins use a ‘knife’ to cut the ‘bread’ so be warned) Networking in place for the transfer preferable…

MySQL: Grant **all** privileges on database

At mysql prompt as root user:  GRANT ALL privileges ON *.* TO ‘user’@’machine.lan’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;  FLUSH PRIVILEGES;   That’s all

How to install MySQL on CentOS

Here are the steps of what you need to do in order to install and setup MySQL on a new server. We’ll prepare a fresh CentOS 6 system (64 bit) for use as a database server. All you need is access to an SSH client and your server root credentials.   Preparing the System The…

Sharing a screen SSH session

Sharing your Session Assuming you start a screen session using screen -S david Ask your partner to connect using (assuming they are logged in using the same user account): screen -x david Now it’s simply magical. Multiple persons can type and work on the same terminal – it works best when you’re coordinating over the phone. Note…

Moving SSL Certs from IIS to Apache

Some instructions for converting SSL certificates generated for IIS to private key, and cert files you can use on unix, or Apache for windows. First Export your IIS certificate into a pfx file (this is something you should do anyways for backup) Run mmc.exe Click the ‘Console’ menu and then click ‘Add/Remove Snap-in’. Click the ‘Add’ button…

Failed to run gitk: Error in startup script

Gitk is a great tool for working with Git. Unfortunately after setting up git and X11 forwarding I got this error when running gitk. The error can easily be fixed by installing dejavu-sans-fonts. yum install -y dejavu-sans-fonts The result : Voila !

Php pecl config error on centos

When installing php PECL On CentOS/RHEL (+cPanel) installations, if you get a “checking whether the C compiler works… configure: error: cannot run C compiled programs”, you may need to remount the /tmp and /var/tmp with exec permissions first: $ mount -o remount,exec,suid /tmp $ mount -o remount,exec,suid /var/tmp Then: $ pecl install {package} And, don’t forget…

locate: can not stat () `/var/lib/mlocate/mlocate.db’

Run updatedb first.  You can run it manually from the command line. updatedb It should have scheduled itself as a cron job when you installed slocate.  If you just installed slocate, it will not have run yet.  Otherwise, make sure you have a cron daemon running and that there is an updatedb task scheduled.  Also,…

Centos No-IP setup

Howto Install no-ip utility in CentOS to fix dynamic ip issues using a subdomain from no-ip.org. First go to no-ip webpage http://www.no-ip.com Register and confirm your email, then login your account and add a host. Download the linux client As user root execute: cd;wget "https://www.no-ip.com/client/linux/noip-duc-linux.tar.gz" tar -xvf noip-duc-linux.tar.gz cd noip-2.1.9-1 make make install Create a configuration…