Wednesday, April 30, 2008

nixCraft Linux Sys Admin Blog

nixCraft Linux Sys Admin Blog

Link to nixCraft Linux Sys Admin Blog

Linux Maximum Length Of A Host Name

Posted: 30 Apr 2008 06:09 PM CDT

While browsing Linux kernel source code I came across POSIX (Portable Operating System Interface) variable called _POSIX_HOST_NAME_MAX . It defines the maximum length of a host name (not including the terminating null) as returned from the gethostname function. This variable sets the limit to the number of characters in a hostname under Linux.
$ grep '_POSIX_HOST_NAME_MAX' /usr/include/bits/posix1_lim.h
Output:

#define _POSIX_HOST_NAME_MAX    255

You can change limit and recompile the kernel to get bigger hostname.

Related Posts:



© Linux Maximum Length Of A Host Name - nixCraft - Support nixCraft when you shop at amazon. Thanks!

Open Source Java - OpenJDK Added To Fedora and Ubuntu Linux

Posted: 30 Apr 2008 05:53 PM CDT

Canonical Ltd. and Red Hat, Inc. today announced the inclusion of OpenJDK-based implementations in Fedora 9 and Ubuntu 8.04 Long Term Support (LTS) Server and Desktop editions, furthering the promise of Sun's open source Java technology initiative.

In addition, the NetBeans 6.0 Integrated Development Environment (IDE) () is being delivered as part of the Ubuntu 8.04 LTS release and Canonical has certified Ubuntu 8.04 LTS Server Edition on several Sun x86 systems.

Sun Press Release : Open Source Java Technology Debuts In GNU/Linux Distributions

Related Posts:



© Open Source Java - OpenJDK Added To Fedora and Ubuntu Linux - nixCraft - Support nixCraft when you shop at amazon. Thanks!

Microsoft To Extend Systems Management To Linux / UNIX

Posted: 30 Apr 2008 01:10 PM CDT

Microsoft is extending its management software to Linux and Unix by integrating some of the open source OpenPegasus project's code into System Center Operations Manager. You can use this software to manage your Linux / UNIX boxes:

Today Microsoft announced a few new beta products â€" two of which came from our team. The System Center Operations Manager 2007 Cross Platform Extensions, which enable customers to manage Unix/Linux systems from Operations Manager 2007, was delivered as a beta today.

=> Microsoft Uses Open Source To Extend Systems Management To Linux

Related Posts:



© Microsoft To Extend Systems Management To Linux / UNIX - nixCraft - Support nixCraft when you shop at amazon. Thanks!

What Is Tux Web Server and How do I Use it?

Posted: 30 Apr 2008 05:39 PM CDT

Can you explain the tux web server and its usage against regular apache httpd web server?

Answer to "What Is Tux Web Server and How do I Use it?"


Copyright © nixCraft. All Rights Reserved. Support nixCraft when you shop at amazon. Thanks!

The Daily Tee

The Daily Tee

Obey Classic Tee: No Eyewear, No Problemo

Posted: 30 Apr 2008 10:52 AM CDT

OBEY men Tee shirt OBEY men Tee shirt 2

The Obey new tee called “Joe Cool Antique Tee”, I have no idea how they came up with such a name. But that’s okay, because this classic urban tee come with additional “free” eyewear to you can’t wear

You can get this tee from 80sPurple.com for $27.00

I wish math were easy.

Posted: 29 Apr 2008 11:47 PM CDT

image

Remember math in 4th grade? Ohhhh yeah. Those were the days. I clearly remember having to do this as homework one day.

Finals week is coming up soon for me. So I can definitely relate to this tee. So if you notice posts are a little less often than normal… well, you know I’m probably off playing with a calculator.

Anyways, here is to me wishing I stayed in the world of hello and never ventured any further. :-)

Image: Scary Go Round

Tuesday, April 29, 2008

The Daily Tee

The Daily Tee

We Built This City - On ROCK AND ROLL!

Posted: 28 Apr 2008 09:40 PM CDT

image

Ha. This is very creative. I found this one on Uneetee.com and it’s a great idea. Check out some more pictures here.

Image: Uneetee

Monday, April 28, 2008

nixCraft Linux Sys Admin Blog

nixCraft Linux Sys Admin Blog

Link to nixCraft Linux Sys Admin Blog

Lighttpd Install and Configure AwStats Software Log Analyzer

Posted: 29 Apr 2008 12:08 AM CDT

AWStats is a free powerful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages. It uses a partial information file to be able to process large log files, often and quickly. It can analyze log files from all major server tools like Apache log files (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar, IIS (W3C log format) and a lot of other web, proxy, wap, streaming servers, mail servers and some ftp servers.

You can easily configure awstats under Lighttpd web server.

Step # 1: Install awstats

Visit project web site to grab latest stable version.
# cd /tmp
# wget http://jaist.dl.sourceforge.net/sourceforge/awstats/awstats-6.7-1.noarch.rpm
# rpm -ivh awstats-6.7-1.noarch.rpm

Important Configuration Files

  • /usr/local/awstats/wwwroot/ - Default installtion directory
  • /etc/awstats/ - Configuration file for all your domains
  • /usr/local/awstats/wwwroot/cgi-bin/ : Main program directory
  • /var/log/lighttpd/domain.com/access.log : Web server access log file
  • /home/lighttpd/domain.com/http/ : Web root for your domain
  • /home/lighttpd/domain.com/stats/awstats/ : Directory to store awstats data files. You need to create this directory.

Step # 2: Configure lighttpd

Open lighttpd.conf file and configure perl cgi access (see tutorial for more info):
# vi lighttpd.conf
Append following configuration directive:

alias.url = (                 "/awstatsclasses" => "/usr/local/awstats/wwwroot/classes/",                 "/awstatscss" => "/usr/local/awstats/wwwroot/css/",                 "/awstatsicons" => "/usr/local/awstats/wwwroot/icon/",                 "/awstats/" => "/usr/local/awstats/wwwroot/cgi-bin/",                 "/icon/" => "/usr/local/awstats/wwwroot/icon/"               ) # provide awstats cgi-bin access $HTTP["url"] =~ "/awstats/" {       cgi.assign = ( ".pl" => "/usr/bin/perl" ) }

Save and close the file. Restart lighttpd:
# /etc/init.d/lighttpd restart

Step # 3: Configure domain

Make a copy of default configuration file awstats.model.conf as awstats.domain.com.conf:
# cd /etc/awstats
# cp awstats.model.conf awstats.theos.in.conf

Open config file:
# vi awstats.theos.in.conf
Make sure you set values as follows:
LogFile="/var/log/lighttpd/theos.in/access.log"
LogFormat=1
SiteDomain="theos.in"
DirData="/home/lighttpd/theos.in/stats/awstats"

Where,

  • LogFile : Defines the web, ftp or mail server log file to analyze. A full path to your log file /var/log/lighttpd/theos.in/access.log
  • LogFormat : Use Apache / Lighttpd combined log format
  • DirData : When AWStats updates its statistics, it stores results of its analysis in files (AWStats database). All those files are written in the directory defined by the "DirData" parameter. Set this value to the directory where you want AWStats to save its database and working files into.

Save and close the file. Create dataDir:
# mkdir -p /home/lighttpd/theos.in/stats/awstats
# chown lighttpd:lighttpd /home/lighttpd/theos.in/stats/awstats

Step 4: Generate stats

Type the following command at a shell prompt:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=domain.com
If your domain name is theos.in, enter:
# /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=theos.in
Sample output:

Create/Update database for config "/etc/awstats/awstats.theos.in.conf" by AWStats version 6.7 (build 1.892) From data in log file "/var/log/lighttpd/theos.in/access.log"... Phase 1 : First bypass old records, searching new record... Direct access after last parsed record (after line 50894) Jumped lines in file: 50894  Found 50894 already parsed records. Parsed lines in file: 47047  Found 0 dropped records,  Found 0 corrupted records,  Found 0 old records,  Found 47047 new qualified records. 

Step 5: View stats

Fire a web browser and type url:
http://server-ip/awstats/awstats.pl?config=domain.com
http://server-ip/awstats/awstats.pl?config=theos.in
http://theos.in/awstats/awstats.pl?config=theos.in


(Fig.01: Awstats for theos.in domain - click to enlarge)

Password protect your stats

Use mod_auth to setup a secure password protected area under Lighttpd.

Automatically update stats

Simply create a shell script to update all domains - /etc/cron.daily/01awstats via a cron job:
# vi /etc/cron.daily/01awstats
Append code as follows:

#!/bin/bash # path to cgi-bin AWS=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl    # append your domain DOMAINS="theos.in cyberciti.biz nixcraft.com cricketnow.in vivekgite.com"   # loop through all domains for d in ${DOMAINS} do    ${AWS} -update -config=${d} done

Save and close the file. Test your script:
# chmod +x /etc/cron.daily/01awstats
# /etc/cron.daily/01awstats

Recommended readings:

Related Posts:



© Lighttpd Install and Configure AwStats Software Log Analyzer - nixCraft - Support nixCraft when you shop at amazon. Thanks!

Ubuntu Linux Usability Testing with Girlfriend

Posted: 28 Apr 2008 11:16 PM CDT

Finally someone is doing Ubuntu Linux usability testing with a girlfriend. The new user was given a couple of common tasks over a default installation of Ubuntu. I hope, the Linux distributions can learn a lot from this article and improve Linux user experience on a desktop computer. From the post:

Erin's knowledge of computers is limited to word processors, spreadsheets, Photoshop and a reasonable amount of browsing on the Web. Fairly standard stuff for a university philosophy student. All I did to the system (before leaving Erin at the log-in screen) was to install it and create a user account for her. She had no problems logging in, and loved the stylised heron background. Then I gave her one by one the tasks I'd set her. I didn’t give her any help at all.

=> The Great Ubuntu-Girlfriend Experiment (via slashdot)

Related Posts:



© Ubuntu Linux Usability Testing with Girlfriend - nixCraft - Support nixCraft when you shop at amazon. Thanks!

Hans Reiser Guilty of First Degree Murder

Posted: 28 Apr 2008 10:52 PM CDT

Hans was deeply involved in Linux kernel development with his widespread ReiserFS journaling file system and its successor Reiser4. Reiser's estranged wife, Nina Reiser, disappeared on September 3, 2006; Reiser was convicted of her murder on April 28, 2008:

Jurors found Linux programmer Hans Reiser guilty of first degree murder on Monday, concluding he killed his estranged wife in 2006. The verdict followed a nearly six-month trial and nearly three days of deliberation

The 44-year-old developer of the ReiserFS filesystem, sat quietly as a clerk for Alameda County Superior Court Judge Larry Goodman read the verdict. Reiser faces a mandatory sentence of 25 years to life in prison. Wearing the same dark coat he's worn for months, the defendant was immediately removed from the courtroom by one of four bailiffs watching over the courtroom. He asked out loud if he could speak with his attorney.

In a murder case with no body, no crime scene, no reliable eyewitness and virtually no physical evidence, the prosecution began the trial last November with a daunting task ahead.

Related Posts:



© Hans Reiser Guilty of First Degree Murder - nixCraft - Support nixCraft when you shop at amazon. Thanks!

How To Extract a Single File / Directory from Tarball Archive

Posted: 28 Apr 2008 11:04 PM CDT

How do I extract a single file or directory form a tarball under UNIX / Linux shell prompt? How do I restore a single file from /dev/st0 tape device?

Answer to "How To Extract a Single File / Directory from Tarball Archive"


Copyright © nixCraft. All Rights Reserved. Support nixCraft when you shop at amazon. Thanks!