Categories

Our Sponsors

How-to Add in Apache modules, ie mod_rewrite

I seem to need this information often enough so I thought I would post it here for safe keeping.

In Apache 2, shared modules must be compiled with the directive: –enable-mods-shared=’rewrite’

Multiple modules can be configured that way like so: –enable-mods-shared=’rewrite dav dav-fs’

A simple config string would look like this: ./configure –prefix=/usr/local/apache –enable-mods-shared=’rewrite’

# [...]

Share

Sync Web Servers Script

Here is a script I wrote to keep 2 or more web sites in sync.  The data files can be anything under the data tree. The database is MySQL.

The script works by pulling the latest data and database backup from the production server.  The script can be placed in a cron. The DR server [...]

Share

Funny Unix commands

Handy command for those users that are most annoying.

# fuser -uck /you

Find all the processes running under the mount point /you and kill them all ungracefully.

About as much fun to read as

# sort -n ass | uniq -c

Unix can tell you all.

Login and type /bin/csh then type the [...]

Share

Helpful Unix commands

A thread dedicated to those useful Unix commands we all know and love.  Ya right.

I need a really tricky find command the other day so I came up with the following.  I wanted to save the command some where as it really shows the power of find

Find all files that are not [...]

Share

Pass a Shell variable to a SED command

I just helped a friend out with placing a shell variable into a sed command and thought it would be prudent to document it.

This set of commands was to be used to change directory names inside a samba share, hense the directory names of \ and the unix escape needed making a bunch of [...]

Share

Overcoming the dreaded SCP/SFTP message errors

If you have ever used scp or sftp you may have encountered the dreaded ( ”Received message too long” or “Bad packet length” ”) errors.

This is typically due to something being echo’d or sent back to your login attempt.

Usually, it’s something you have in your .profile or .bashrc login files.

Just add the [...]

Share

Procedure to swap ZFS pools Solaris

Procedure to add a new ZFS pool to a system, copy the data from an old pool, switch the mounts and remove the old pool.

Sorry there isn’t much in the way of comments or coloring.  It was just copied from the terminal window.  The procedure below does create the ZFS filesystem, clone it, move [...]

Share

Find processes and what network ports they use on Solaris 10

Show all of the processes and any open ports that they may be using.

for pid in `ps -aeo pid | grep -v PID`; do sudo pfiles ${pid} | egrep “^${pid}:|sockname:” done

Once you know the PID’s of the processes you can determine all of the atributes of the applications using pargs, instead of ps. [...]

Share

Launch Application from Excel

I started out with the need to be able to launch a putty SSH window from Excel that had a list of hosts and/or IP addresses.

In Microsoft Excel

1) View/Toolbars Visual Basic 2) Click the Control Toolbox icon 3) Click on the Command Button icon and then click in your worksheet or drag the [...]

Share

Unix Terminal Headers and Titles

Please see another post of mine about terminal colors if this post is a little confusing.

Add the following to your .kshrc or .bashrc files.

# KSH terminal headers add to .profile PS1=`uname -n`” $ ” alias cd=_cd function _cd { \cd ${1+”$@”} && echo “\033]0;${USER}@${HOST}: ${PWD}\007\c” }

# BASH terminal headers add to .bashrc [...]

Share
Get Adobe Flash playerPlugin by wpburn.com wordpress themes