Archive for the ‘UNIX’ Category.

Sending mail from CentOS on Slicehost

When I first set up CainManor on slicehost, e-mail wasn’t working. The solution, based on this thread, was to install postfix.

apt-get install postfix  -Install postfix

edit /etc/postfix/main.cf

mydomain = cainmanor.com
myorigin = cainmanor.com
mynetworks_style = host

service postfix start -start the service to see if it works as expected.

chkconfig –list postfix - make sure it will start on boot.  The default install takes care of this

Easy way to ping a range of IP Addresses

nmap -sP 10.1.1.0/24

When I need to find an open IP, this is a decent way to do it. I wish there were a way to find IPs that don’t respond, but this works for now. This won’t work if your network bans ICMP traffic, or your host doesn’t respond, but is alive.

Wordpress 2.5 on a fresh CentOS 5.0 install - Part 2

Now that we have the OS ready for the wordpress install, let’s finish up…

Continue reading ‘Wordpress 2.5 on a fresh CentOS 5.0 install - Part 2’ »

Wordpress 2.5 on a fresh CentOS 5.0 install - part 1

I’m doing this on my new host - Slicehost (more about that later.) It’s VPS, which gives you a clean install of your choice of Linux Operating Systems (they have seven or eight choices.) In this case, I’m using CentOS, since it’s close to what we use at work.

Continue reading ‘Wordpress 2.5 on a fresh CentOS 5.0 install - part 1’ »

WP-Syntax

Let’s you use correct syntax on your code snippets, or rather - keeps WordPress from fucking up your code.

Download from here. To use, wrap your code with

<pre lang="LANGUAGE" line=”1″> and </pre>

line=”1″ is optional. This is based on syntax highlighting from GeSHI. You can visit their page for a full list of supported languages. The ones I care about are - or rather, may care about in the future:

Continue reading ‘WP-Syntax’ »

smbclient on OS-X

find your public SMB shares with findsmb

findsmb
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
———————————————————————
10.0.0.4 NAS +[CAINMANOR] [Unix] [Samba 3.0.22]

Continue reading ‘smbclient on OS-X’ »

bc - how to do math from the command line

echo ‘25+7′ | bc - addition
echo ‘25-7′ | bc - subtraction
echo ‘25*7′ | bc - multiplication
scale - the scale variable tells how many decimal places to take your answer. The default is 0, unless using -l, in which case the default is 20.
echo ’scale=5;25/7′ | bc division

3.57142

echo ’scale=10;sqrt(7)’ | bc square root

2.6457513110

bc -q interactive mode

Proliant Support Pack CLI on Linux

A Cheat sheet for PSP tools on Linux - specifically hpasmcli & hpacucli.

Continue reading ‘Proliant Support Pack CLI on Linux’ »

VMWare Tips

VMWare ESX Server, by default, does not allow outgoing SSH connections.

You must be very careful where you place your memory.  On  a dual proc HP 385, as an example, you have two processors and 8 slots for memory.  Each processor must have access to the same size of memory.  For example, proc A has slots 1 & 2 full of 1GB DIMMs, then proc B must have slots 5 & 6 with 1GB DIMMs.  You will pull a lot of hair with the errors you’ll see if you make this mistake.

Quick dig tips

Quick Answer

dig cainmanor.com +short <- returns only IP
dig @ns28.1and1.com cainmanor.com in any <- lot’s of information
dig docs +search <- use /etc/resolv.conf search order
dig -x 74.208.27.139 +short <- reverse lookup
dig cainmanor.com +trace <- traceroute for DNS
dig cainmanor.com +nssearch <- find your SOA serial number to see if your records are updated.

Long Answer