Author Archives: Randy

Windows 7 / Vista DNS Suffix only one level deep

Major annoyance to any organization that has hostnames like foo.bar.domain.com — Windows 7 and Vista appends domain.com to bar, but not foo.bar. After some digging I finally found a registry hack that restores ‘proper’ functionality like any other OS or older version of windows. Create a DWORD ‘AppendToMultiLabelName’ with a value of 1 in: HKEY_LOCAL_MACHINE […]

Categories: Technical and Windows. Comments Off on Windows 7 / Vista DNS Suffix only one level deep

DJBot Rsync Copy

rsync –progress -av –delete -e ssh root@x.x.x.x:/ root –exclude=/dev –exclude=/proc –exclude=/sys –exclude=/tmp –exclude=’*.mp3′ –exclude=’*.MP3′ — exclude=’*.sql.gz’ –exclude=djbot/logs

SQL-fu #1

Nested select with an insert to create multiple rows — used this to add admin privileges for a client in Maia for all their domains: INSERT INTO maia_domain_admins (SELECT t2.domain_id,1013 from postfix_transport t2 WHERE t2.mta_host=’1.2.3.4′);

Search + Replace, Append, Prepend MySQL

Search and replace update [table_name] set [field_name] = replace([field_name],'[string_to_find]’,'[string_to_replace]’); Append update [table_name] set [field_name] = concat([field_name],'[string_to_append]’); Prepend update [table_name] set [field_name] = concat(‘[string_to_prepend]’,[field_name]);

Categories: Uncategorized. Comments Off on Search + Replace, Append, Prepend MySQL

Mcelog – Bad memory?

The original hardware did all kinds of strange things, stuff like SSH not working and RPM checksums failing, random rebooting, ect. I ended up swapping the chassis, mainboard and RAM but kept the HDD’s to avoid an OS reinstall. Now, I’ve gotten this twice on the new box followed by a hard freeze about 2 […]

Installing Subversion on Cpanel/WHM

Make and install Subversion: mkdir -p /usr/local/src/ wget http://subversion.tigris.org/downloads/subversion-1.5.2.tar.bz2 tar xfj subversion-1.5.2.tar.bz2 && cd subversion-1.5.2 ./configure –with-apxs=/usr/local/apache/bin/apxs –with-apr=/usr/local/apache/bin/apr-1-config –with-apr-util=/home/cpeasyapache/src/httpd-2.2.17/srclib/apr-util make && make install Add to pre-main include in Apache Configuration (WHM): LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so Set up EasyApache’s per-user virtualhost config directories (if not present): mkdir /etc/httpd/conf/userdata mkdir /etc/httpd/conf/userdata/std mkdir /etc/httpd/conf/userdata/std/2 Add a […]