Category: Linux

  • My SugarCRM install proceedure for CentOS

    We are evaluating CRM products at work, and I wanted to get an idea what SugarCRM looks like. Below are the steps I used to install Sugar CRM community edition. I already had LAMP up and running Download sugarCRM: wget http://www.sugarforge.org/frs/download.php/7746/SugarCE-6.1.2.zip Extract the zip and move to /var/www. Create a virtual host for it in…

  • Xnest, xdmcp and X11 on CentOS

    It has been a while since I have used XNest. It works. Slow, but it works. I can ssh into a box and bring back a full X session back to my Mac. In CentOS 5.5 I had to edit /etc/gdm/custom.conf and add: Enable=true under [xdmcp]. Restart X and now I can run: Xnest :1 -geometry 1024×768…

  • GNU date vs BSD date

    I usually develop and test my BASH scripts on my mac, mostly for use on RedHat systems. Occasionally I run into problems with this workflow. Recently I realized there was a differnce between the date command on RedHat and the date command in OS X. Turns out BDS date != GNU date. The workaround, install coreutils from Mac…

  • Check if a file exists on a remote server

    I was working on a copy WordPress site to a local machine script, and I wanted to check if the remote path was a WordPress site. Here is the code I used.

  • Quick check if a mysql database exists

    Here is my bash code that checks if a db exists before I try to create one in a script: This will exit out if there is a database with the name you are searching for. The tricky part for me (and always is) was this double quotes inside the single quotes in the LIKE…

  • Finding diffs between clean and modified versions of WordPress

    We have an issue where our developers try to update the core WordPress files. I wanted to find a way to keep them honest. here is my script:

  • CentOS: HowTo install ruby, rubygems and passenger for a redmine install

    I like to put my complied software in /opt vs /usr/local. Make sure rpm version is not installed. install ruby: user alternatvies to create sym links: make sure current ruby is set to 1.8.7: /usr/sbin/alternatives –config ruby install rubygems: install gems (No docs): Passenger said I needed to install curl-dev  (yum install curl-devel) install passenger apache…

  • My current WordPress Update Script

    Below is my current WordPress update script. First this script downloads the most recent version and determines which version it is: Next it looks for all wp-config.php files in all the websites to identify which sites have WordPress installed. Then and finds the version from the versions.php script. If the version is not equal to…

  • My esxupdate script

    I was having problems using update manager on an esx box at a remote site. I needed to install several prerequisite patches before i could get to U5. I went to : http://www.vmware.com/patch/download/ and found the patches I needed. So I used lwp-download to download the files(esx does not have wget) like so: Then I used…

  • Use IPTables to ban repeated ssh attempts

    My logs were getting filled with scripts trying to log in via ssh. I already have “PasswordAuthentication no” so I believe I am safe. I wanted to add a new layer (and keep my logs cleaner). I added the following to my iptables config. Anyone with more than 4 connections in 60 seconds is banned: