Wednesday, October 31, 2007

Maximum swappage

When you set up a brand new Linux server, do you create a single 128 MB swap partition? If so, did you know that you are severely limiting swap performance? Would you like to increase swap performance by several orders of magnitude, and to create swap partitions larger than 1 GB? It's possible, requiring no kernel patches or special hardware, just pure geek know-how!
Some of you may not really care about swap. After all, Linux systems are typically very memory efficient, and swap is often barely touched. While often true on desktop systems, servers are another story. Because servers may handle unexpected stresses, such as runaway processes, denial of service attacks, or even the Slashdot effect, they need to have adequate high-speed swap so that they do not grind to a halt and possibly crash when all physical memory (and then some) is exhausted.More...

Tuesday, October 30, 2007

FreeBSD Security Event Auditing

FreeBSD 6.2-RELEASE and later include support for fine-grained security event auditing. Event auditing allows the reliable, fine-grained, and configurable logging of a variety of security-relevant system events, including logins, configuration changes, and file and network access. These log records can be invaluable for live system monitoring, intrusion detection, and postmortem analysis. FreeBSD implements Sun™'s published BSM API and file format, and is interoperable with both Sun's Solaris™ and Apple®'s Mac OS® X audit implementations.read more..

Monday, October 29, 2007

Perl 5.6 for C and Java programmers

Ted Zlatanov explains some of the peculiarities in Perl 5.6 for C and Java programmers, who may actually be pleasantly surprised by some familiar features hailing from sources other than Perl, like operator ambiguity, multiple ways of doing the same thing, punctuation, regular expressions, and variable mechanism. All of them put variety and power at your fingertips. The point is, Perl isn't too far from anyone's familiar territory and may be useful to even C and Java programmers at some point. So here's your opportunity to enhance your Perl 5.6 skills.

Sunday, October 28, 2007

Teach Yourself Perl 5 in 21 days

This book is designed to teach you the Perl programming language in just 21 days. When you finish reading this book, you will have learned why Perl is growing rapidly in popularity: It is powerful enough to perform many useful, sophisticated programming tasks, yet it is easy to learn and use.

Saturday, October 27, 2007

Understanding the Solaris socket filesystem

Sockets provide an interface into the kernel's networking protocols by allowing programmers to create a communication endpoint in the form of a file descriptor, and by binding a name to the file descriptor. That follows a convention that has existed in Unix systems since its inception: file-based I/O, where the source or destination of an I/O operation appears to the programmer as a file, and a standard set of interfaces (open(2), read(2), write(2), close(2)) can be used to acquire a file descriptor and issue I/O operations.more...

Friday, October 26, 2007

Debian way to make tiny change to package

Have you ever had to make a one-line correction (or customization) in a big package? If so how did you manage it? The obvious way is to rebuild a package and serve it locally, but is there some other approach?
After spending an hour investigating bad behavior from the amoverview perl script in the amanda-server package (2.5.1p1-2.1), I traced the problem to one line in the script. It was an easy fix if you don't mind tweaking code directly in /usr/sbin/ read more...

A Simple Socket Server Using inetd .

It is often the case that one needs to test a system before the hardware is available or on-line. In my case, I'm developing an interface which will talk to a socket on a complex piece of Fab Metrology gear called an Applied Materials NanoSEM, using a complex protocol called SEMI SECS-II/GEM HSMS. I needed a quick and dirty handler to act as the NanoSEM while I get the protocol parser working.read full tutorial.

Wednesday, October 24, 2007

How to move FreeBSD to a new hard disk

This article will explain how you can move your FreeBSD installation from one hard disk drive to another. I have done this many times using the dump/restore utility. Before you begin, be sure you have read this document carefully. Let's assume that our FreeBSD installation is on a 4 gigabyte drive (ide master ad0) and we would like to move it to a new 20 gig drive. What you need to do is remove the old hard disk, install the new [20G] drive as an ide master and perform a minimal clean install of FreeBSD, setting up the partitions exactly how you want them. Be se sure to set the drive as bootable and boot from it one time as a test. Next, put your old [4G] drive back in the system as an ide master and the new [20G] drive in as an ide slave. Boot the system on your old installation in single user mode.

Linux IPv6 HOWTO

The goal of the Linux IPv6 HOWTO is to answer both basic and advanced questions about IPv6 on the Linux operating system. This HOWTO will provide the reader with enough information to install, configure, and use IPv6 applications on Linux machines. Intermediate releases of this HOWTO are available at mirrors.bieringer.de or mirrors.deepspace6.net. See also revision history for changes.

Tuesday, October 23, 2007

Linux assemblers: A comparison of GAS and NASM

This article explains some of the more important syntactic and semantic differences between two of the most popular assemblers for Linux®, GNU Assembler (GAS) and Netwide Assembler (NASM), including differences in basic syntax, variables and memory access, macro handling, functions and external routines, stack handling, and techniques for easily repeating blocks of code.

Sunday, October 21, 2007

Perl, Sockets and TCP/IP Networking

Sockets are a mechanism that allows programs to communicate, either on the same machine or across a network. The way it works is pretty simple: Each machine on a network is identified by some address. In this tutorial we will talk about tcp/ip networking, so by network address we mean an IP address. (like 192.168.4.4) Apart from the IP address that specifies a machine, each machine has a number of ports that allow handling multiple connections simultaneously...more

Rebuilding failed Linux software RAID

Recently I had a hard drive fail. It was part of a Linux software RAID 1 (mirrored drives), so we lost no data, and just needed to replace hardware. However, the raid does requires rebuilding. A hardware array would usually automatically rebuild upon drive replacement, but this needed some help.
When you look at a "normal" array, you see something like this ... read more

Saturday, October 20, 2007

Egroupware server with LDAP backend.

Egroupware is a webbased groupware suite with an impressive list of features. Egroupware uses a Mysql backend to store all it's data but the latest release makes it easy to store useraccounts in an LDAP tree. This documents describes how to install the latest version while using an LDAP backend for useraccounts. Egroupware can then manage the unix loginaccounts as well as samba login accounts.

Friday, October 19, 2007

Learn the Perl/Tk module: The basics of Perl/Tk

The Perl language is usually used by IBM® AIX® operating system administrators and developers, and it can be found on nearly every successful Web site and most AIX systems. Although Perl scripts are powerful, they produce a Web interface that lacks a graphical front end, and the user has to type information instead of using the mouse, which can be an unsatisfying experience for the customer. This problem has been resolved with the introduction to the Tk module in Perl. An administrator or developer can quickly breathe new life into their Perl script with the Tk module and satisfy their customer's desire for an X11 product...read more.

Thursday, October 18, 2007

Installing FreeBSD on a USB stick

Insert the stick. They come preformatted with a FAT32 partition on, so we'll need to throw a BSD slice label on there — this command will destroy all existing slices. If you get a warning regarding "Geom not found"...read more.

Wednesday, October 17, 2007

Secure SSH

SSH is not only the secure replacement for rlogin, rsh and telnet, which has been used in the past to do remote administration work, but there are also neat tricks like port forwarding, vpn tunneling and file transfers that you can do with minimal configuration work, leaving only one port open to the internet.read full article..

Tuesday, October 16, 2007

UNIX work with Windows XP and Mac OS X

Learn about using a UNIX® system as a primary domain controller (PDC) and file repository, including an anonymous, read-only shared area accessible by anyone with a Web browser. To be a good citizen on your local network, you need to integrate your favorite UNIX system with the networking features of client systems, generally running Windows® XP or Mac OS X. This makes it easier for the users of those workstations to take advantage of the centralized authentication and storage facilities you can provide.

Monday, October 15, 2007

Configure Linux Firewalls Using iptables

Network security is a primary consideration in any decision to host a website as the threats are becoming more widespread and persistent every day. One means of providing additional protection is to invest in a firewall. Though prices are always falling, in some cases you may be able to create a comparable unit using the Linux iptables package on an existing server for little or no additional expenditure. read more...

Configuring Wine

Most of the most common configuration changes can be done with the Winecfg tool. We'll go through an easy, step-by-step introduction to Winecfg and outline the options available. In the next section we'll go over more advanced changes you can make using regedit as well as provide a complete reference to all Wine configuration settings. Finally, some things you might want to configure fall out of the scope of Winecfg and regedit, and we'll go over those.

Sunday, October 14, 2007

How-to Install Ubuntu Linux on a usb drive.

This tutorial will show how-to install Ubuntu on a usb stick. Even though this tutorial uses Ubuntu as its base distribution, you could virtually use any type of Linux liveCD distribution.
Being able to run Linux out of a usb bar is a great way to enjoy the live CD experience (being able to use Linux on any computer you might get by) and the big advantage of being easier to carry around than a CD.

Saturday, October 13, 2007

Introduction to Porting UNIX/Linux Applications to Mac OS X.

The UNIX Porting Guide is a first stop for UNIX developers coming to Mac OS X. This document helps guide developers in bringing applications written for UNIX-based operating systems to Mac OS X. It provides the background needed to understand the operating system. It touches on some of the design decisions, and it provides a listing and discussion of some of the main areas that you should be concerned with in bringing UNIX applications to Mac OS X. It also points out some of the advanced features of Mac OS X not available in traditional UNIX applications that you can add to your ported applications.

Friday, October 12, 2007

Crontab - Quick reference.

Setting up cronjobs in Unix and Solaris
cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris.
Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.

Easier Linux/Unix remote CGI Debugging.

By Hero Zzyzzx : The things I'll discuss here are aimed at new/intermediate perl coders that know basic *nix commands: ls,cd,chmod,chgrp,mv,cp, etc., meaning I'm not going to discuss these. I also assume you can use man and understand how to use telnet/ssh to get to your server. I realize that what I discuss here isn't specific to perl (or even CGI programming with perl) but is still (IMHO) very useful. If you want to know perl tricks to ease debugging, read the other tutorials in this section.

Thursday, October 11, 2007

Implement lower timer granularity for retransmission of TCP.

Reduce the overhead of per-tick processing with a timer wheel algorithm that implements the retransmission timer. The AIX® Transmission Control Protocol (TCP) has seven timers (per-connection) and uses global timer functions with two granularities to implement the timers. In this article, learn how to get lower granularity with your retransmission timer by using the AIX TCP fast timer, and discover other advantages of lower timer granularity.

Tuesday, October 09, 2007

Understanding the Linux Kernel Initcall Mechanism.

All kernel files that are referenced in this paper are specifed by a path name relative to the kernel's root directory. For example the setup.c file for the PowerPC architecture would be given as: arch/ppc/kernel/setup.c. A specific function (e.g. early_init) within a given file is expressed as arch/ppc/kernel/setup.c:early_init() regardless of what parameters it accepts (if any) and what it returns (if anything).read more.

Monday, October 08, 2007

Windows to UNIX porting.

Software programs are often made to run on systems that are completely different from the system in which the program is coded or developed. This process of adapting software across systems is known as porting. You might need to port software for any one of several reasons. Perhaps your end users want to use the software in a new environment, such as a different version of UNIX®, or perhaps your developers are integrating their own code into the software to optimize it for your organization's platform.

Sunday, October 07, 2007

Linux Infrared HOWTO.

The Infrared-HOWTO provides an introduction to Linux and infrared devices and how to use the software provided by the Linux/IrDA project. This package uses IrDA(TM) compliant standards. IrDA(TM) is an industrial standard for infrared wireless communication, and most laptops made after January 1996 are equipped with an IrDA(TM) compliant infrared transceiver. Infrared ports let you communicate with printers, modems, fax machines, LANs, and other laptops or PDAs. Speed ranges from 2400bps to 4Mbps.

Saturday, October 06, 2007

CONFIGURE NDISWRAPPER in the CONTROL CENTER.

Installing a windows wireless driver in Linux can be done through the use of a program called ndiswrapper. This is the way to go if your wireless card does not have Linux support. If you are using Mandriva/Mandrake or PCLinuxOS, then you may be able to install your NDISWrapper through the Control Center..more.

Friday, October 05, 2007

Installing FreeBSD 6.x under VMWare Server.

First of all you will need to install the host OS, and in this case we are using Windows Server 2003X64 Standard Edition R2 which must include IIS, however could have easily been an approve Linux variant, or even the VMWare ESX solution. In either case it is probably a good idea to ensure that all of the patches and updates have been applied...read more.

Thursday, October 04, 2007

Linux for the handset: a rising force.

This article traces Linux's transformation into one of the most popular mobile phone environments today. It was written by Jim Ready, founder and CTO of MontaVista -- and arguably one of the most important pioneers in the market for off-the-shelf commercial embedded operating systems. Enjoy...

System emulation with QEMU.

QEMU is an open source emulator for complete PC systems. In addition to emulating a processor, QEMU permits emulation of all necessary subsystems, such as networking and video hardware. It also permits emulation of advanced concepts, such as symmetric multiprocessing systems (up to 255 CPUs) and other processor architectures, such as ARM or PowerPC. This article explores QEMU and its architecture and shows how to emulate a guest operating system on a Linux® host.

Wednesday, October 03, 2007

Country-based packet filtering with iptables.

Bruteforce attacks shouldn't pose a real security risk to any server but are still annoying and clog up your logfiles. Many methods to block these break-in attempts exist, like BlockHosts, Fail2ban or rate-limiting incoming connections.read more.

Tuesday, October 02, 2007

Debian and Windows Shared Printing.

Debian GNU/Linux (http://www.debian.org) is the premier volunteer-supported Linux distribution. Unfortunately, setting up printers in Debian can be difficult. Also, simple step-by-step instructions for sharing printers between Windows and Linux using the latest tools are hard to find. This HOWTO was written to address both problems.
This HOWTO will demonstrate how to use command-line tools to configure your Debian system for printing. It will explain how to send documents from Linux to Windows printers and how to share Linux printers with Windows PCs. Some troubleshooting examples are also given.

Monday, October 01, 2007

Chrooted Snort on Solaris.

Do most people ever worry about the security of their Intrusion Detection System (IDS)? They should. With high speed Internet access being so common around the world, many personal PCs are being hijacked or shared by hackers these days. These hijacked PCs serve as a launch point for attacks.. more

uptime