Wednesday, March 16, 2005
delete lineitems from lineitems l left join invoices i on l.invid =i.invid where i.invid is null;
Thursday, February 24, 2005
Compiling a kernel with Gigabit ethernet driver (Marvell)
Installing driver for linksys gigabit NIC (Marvell Chipset)
- Download the driver for 2.4 and 2.6 kernel from here.
- unzip and untar the driver.
- execute install.sh
- choose either user or expert mode.
- If the driver is happy with the kernel source, then the GigE module will be installed. If not. then read on
- The new driver has been installed in the /usr/src/linuxdirectory.Go to the directory /usr/src/linux .
- For the console mode, run the command: make menuconfig
- Select the options you want to compile into the kernel
- Select the menu "Network Device Support"
- Select "Ethernet (1000 Mbit)".
- Mark "Marvell Yukon/SysKonnect SK-98xx/SK-95xx Gigabit Ethernet Adapter support" with (M)
- Execute the command:
make dep clean bzImage modules modules_install
Install the new kernel
- Install the new kernel by copying it into your boot directory by executing the commands
cp arch/i386/boot/bzImage /boot/vmlinuz-new
cp System.map /boot/System.map-new.
- Edit the boot loader configuration file to boot the new kernel.
- Reboot your system with the new kernel.
Friday, February 18, 2005
Sendmail using authenticated SMTP servers
So, you want to send mail using an authenticated SMTP server like dyndns.org's "Outbound MailHop".
This is what I did to get it working.
a. Slackare 9.1
b. sendmail-8.12.10
c. cyrus-sasl-1.5.27
1. Install cyrus-sasl
This is what I did to get it working.
a. Slackare 9.1
b. sendmail-8.12.10
c. cyrus-sasl-1.5.27
1. Install cyrus-sasl
- download unzip and untar sasl
- cd (directory it was untarred into)
- ./configure
- make
- make install
2. Install sendmail
- go to devtools/Site/README and add the following two lines in site.config.m4 file.
APPENDDEF(`confENVDEF', `-DSASL')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl')
- In the sendmail/ directory, run "sh Build"
- Change to the cf/cf/ directory (that's not a typo): Copy whichever .mc file best matches your environment to sendmail.mc. Next, tailor it as explained in cf/README. Then run "sh Build sendmail.cf".
- Back up your current /etc/mail/sendmail.cf and the sendmail binary (whose location varies from operating system to operating system, but is usually in /usr/sbin or /usr/lib).
- Install sendmail.cf as /etc/mail/sendmail.cf and submit.cf as /etc/mail/submit.cf. This can be done in the cf/cf by using "sh Build install-cf".
- Please read sendmail/SECURITY before continuing; you have to create a new user smmsp and a new group smmsp for the default installation. Then install the sendmail binary built in step 3 by cd-ing back to sendmail/ and running "sh Build install".
- For each of the associated sendmail utilities (makemap, mailstats, etc.), read the README in the utility's directory if it exists. When you are ready to install it, back up your installed version and type "sh Build install".
- If you are upgrading from an older version of sendmail and are using any database maps, be sure to rebuild them with the new version of makemap, in case you are now using a different (and thereby incompatible) version of Berkeley DB.
To be continued ...
Wednesday, February 16, 2005
rsync to synchronize files across servers
- To synchronize files which have been modified/created in the last 6 days between serverA and serverB:
Tuesday, February 15, 2005
Building a Gigabit LAN
Buy
- Bought a DLink GigE switch from Fry's
- Bought the Frys weekly deal, Gigabyte Triton K8 Mobo with Athlon64 3000.
Oops
- Turns out the triton K8 doesn't have a GigE NIC. went back to fry's and patiently explained their advertisement error. Walked out with a replacement Abit NF8-V board with GigE NIC
Configure/Install
- Installed Slackware 10.1, kernel 2.4.29.
- Looks like the network driver is forcedeth.c a reversed engineered driver for nVidia nForce.
- Downloaded the correct driver from nVidia.
- Compiled it with the Kernel and viola
- Speed: 1000Mb/s
- Duplex: Full
- Port: Twisted Pair
Delete Background of an image using Photoshop
- open image in photoshop
- select the magic wand
- lower the sensitivity
- click on the background
- click Edit->Inverse
- The image gets selected.
- copy to a new layer
Build a lean & mean mysql server
1. Build a server
- 1U rackmount case
- 1 GB PC3200, DDR400, Patriot mem. stick
- AMD 64 3000
- Gigabyte Mobo
- WD Raptor 36GB HDD
- Dynatron CPU Cooler
2. Downloaded the mysql 4.1.9 source.
3. Build shell script.
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
-fno-exceptions -fno-rtti"
./configure \
--prefix=/usr/local/build/mysql \
--with-mysqld-user=mysql \
--without-debug \
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--disable-shared \
--localstatedir=/usr/local/build/mysql/var \
--with-extra-charsets=none \
--enable-assembler
4. Test Test Test
- Data
- Loaded the database with 3 million records
- Database size 3 Gig
- Fulltext index size 1 gig
- set the word length ro 3 characters ft_len_max
2. Results
- took 3 hours to load the database
- full text searches take 30 seconds :)
Status: Need to lurk at Jeremey Zawdony's forum/blogs to figure out how to improve this.
