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…

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,…

Cool way to run a script on a remote machine

If you have a local script file and want to run the script on another server use the following : ssh root@torino.maranello.local  ‘bash -s’ < script_local.sh Enjoy 🙂

Amazon EC2 Docs and locations

To work with command line on the Amazon Cloud you need to get hold of the following file which is the EC2-api-tools look for the latest version here : I used the file found here. When trying to setup the Amazon EC2 tools you would expect to have some script that asks you key questions and sets up the environment…

Adding a XFS filesystem to CentOS 5

Howto use enterprise Linux ‘extras’ to mount a XFS filesystem on a CentOS v5.2 VM Install RPM’s Note: Due to this bug (3205), install binutils to overcome the error “xargs: nm: No such file or directory” while installing kmod-xfs-xen. # yum install binutils # yum install xfsprogs yum-kmod kmod-xfs-xen # mkfs.xfs -f /dev/sda1 Check A chunk of…

Search entire filesystem for text in Linux

To search for text through the entire filesystem from the current path down in Linux use the following : find / -type f -print0 | xargs -0  grep -l  "string to search" 2>/dev/null