Download Fedora 13 CD / DVD ISO

/* Posted February 15th, 2011 at 8:20am [Comments: none]    */
/* Filed under Linux    */

Fedora Linux version 13 has been released and available for download ( jump to download link ). Fedora Linux is a community-based Linux distribution. Fedora is sponsored by Red Hat, Inc. Fedora is considered as the second most popular distro, behind Ubuntu Linux.

Fedora 13 Desktop (image credit - the fedora project)

Fedora 13 Desktop (image credit – the fedora project)

What’s New In Fedora 13

The new features in Fedora 13 are:

  1. Automatic print driver installation
  2. Automatic language pack installation
  3. Redesigned user account tool
  4. Color management to calibrate monitors and scanners
  5. Experimental 3D support for NVIDIA video cards
  6. A new way to install Fedora over the Internet
  7. SSSD authentication for users
  8. Updates to NFS
  9. Zarafa Open Source edition, a new open-source groupware suite
  10. System rollback for the Btrfs file system
  11. Better SystemTap probes
  12. A Python 3 stack that can be installed parallel to an existing Python stack
  13. Support for the entire Java EE 6 spec in Netbeans 6.8
  14. 2.6.33-based kernel in Fedora 13.
  15. See release note for more information.

Fedora 13 Download

You can download Fedora Linux 13 via the web/ftp server or via BitTorrent (recommended).

32 bit vs 64 bit Fedora 13 Version

  • For almost all PCs select 32 bit version. For e.g., most machines with Intel/AMD/etc type processors. Good for desktop usage. Almost all multimedia plugins and software works with 32bit edition.
  • Choose 64 bit version to take full advantage of computers based on the AMD64 or EM64T architecture (e.g., Athlon64, Opteron, EM64T Xeon, Core 2 Due, Core 2 Quad, and so on). For servers and advanced feature such as hardware error detection, access to more than 4GB RAM and so on; use 64bit version.

Fedora 13 DVD ISO download

Fedora download: Fedora 13 CD ISO download

There are total 5 ISO images (5 CDs):

Fedora Linux 13 DVD ISO BitTorrent download

Download images from the following mirror:

Fedora 13 DVD ISO BitTorrent download

See complete list of torrents here .

Fedora Linux 13 Download Mirrors

Featured Articles:

Tags:

HowTo: Debug Crashed Linux Application Core Files Like A Pro

/* Posted February 13th, 2011 at 8:19am [Comments: none]    */
/* Filed under Linux    */

Core dumps are often used to diagnose or debug errors in Linux or UNIX programs. Core dumps can serve as useful debugging aids for sys admins to find out why Application like Lighttpd, Apache, PHP-CGI or any other program crashed. Many vendors and open source project author requests a core file to troubleshoot a program. A core file is generated when an application program abnormally terminates due to bug, operating system security protection schema, or program simply try to write beyond the area of memory it has allocated, and so on. This article explains how to turn on core file support and track down bugs in programs.

Turn On Core File Creation Support

By default most Linux distributions turn off core file creation (at least this is true for RHEL, CentOS, Fedora and Suse Linux). You need to use the ulimit command to configure core files.

See The Current Core File Limits

Type the following command:
# ulimit -c
Sample outputs:

0

The output 0 (zero) means core file is not created.

Change Core File Limits

In this example, set the size limit of core files to 75000 bytes:
# ulimit -c 75000

HowTo: Enable Core File Dumps For Application Crashes And Segmentation Faults

Edit /etc/profile file and find line that read as follows to make persistent configuration:

ulimit -S -c 0  /dev/null 21

Update it as follows:

ulimit -c unlimited /dev/null 21

Save and close the file. Edit /etc/sysctl.conf, enter:
# vi /etc/sysctl.conf
Append the following lines:

kernel.core_uses_pid = 1
kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t
fs.suid_dumpable = 2

Save and close the file. Where,

  1. kernel.core_uses_pid = 1 – Appends the coring processes PID to the core file name.
  2. fs.suid_dumpable = 2 – Make sure you get core dumps for setuid programs.
  3. kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t – When the application terminates abnormally, a core file should appear in the /tmp. The kernel.core_pattern sysctl controls exact location of core file. You can define the core file name with the following template whih can contain % specifiers which are substituted by the following values when a core file is created:
    • %% – A single % character
    • %p – PID of dumped process
    • %u – real UID of dumped process
    • %g – real GID of dumped process
    • %s – number of signal causing dump
    • %t – time of dump (seconds since 0:00h, 1 Jan 1970)
    • %h – hostname (same as ’nodename’ returned by uname(2))
    • %e – executable filename

Finally, enable debugging for all apps, enter (Redhat and friends specific):
# echo "DAEMON_COREFILE_LIMIT='unlimited'" /etc/sysconfig/init
Reload the settings in /etc/sysctl.conf by running the following command:
# sysctl -p

How Do I Enable Core Dumping For Specific Deamon?

To enable core dumping for specific deamons, add the following line in the /etc/sysconfig/daemon-file file. In this example, edit /etc/init.d/lighttped and add line as follows:

DAEMON_COREFILE_LIMIT='unlimited'

Please note that DAEMON_COREFILE_LIMIT is Redhat specific, for all other distro add configuration as follows:

ulimit -c unlimited /dev/null 21
echo /tmp/core-%e-%s-%u-%g-%p-%t  /proc/sys/kernel/core_pattern

Save and close the file. Restart / reload lighttpd:
# /etc/init.d/lighttpd restart
# su - lighttpd
$ ulimit -c

Sample outputs:

unlimited

Now, you can send core files to vendor or software writes.

How Do I Read Core Files?

You need use the gdb command as follows:
$ gdb /path/to/application /path/to/corefile
See the gdb command man page for more information.

strace command

System administrators, diagnosticians and trouble-shooters will find it invaluable for solving problems with programs for which the source is not readily available since they do not need to be recompiled in order to trace them. This is also useful to submit bug reports to open source developers. See how to use the strace command under Linux to debug the problems.

Recommended readings:

Stay tunned for gdb tutorial which will explains how to use generated core file to track down problem.

Featured Articles:

Tags:

Download Debian Linux 6 Squeeze ISO / CD / DVD Images

/* Posted February 11th, 2011 at 8:19am [Comments: none]    */
/* Filed under Linux    */

Debian GNU/Linux version 6.0 has been released ( jump to download ) after 24 months of constant development and available for download in various media format. Debian 6.0 is a free operating system, coming for the first time in two flavours. Alongside Debian GNU/Linux, Debian GNU/kFreeBSD is introduced with this version as a “technology preview”. It also supports various processor architectures and includes the KDE, GNOME, Xfce, LXDE and other desktop environments. It also features compatibility with the FHS v2.3 and software developed for version 3.2 of the LSB.

What’s new in Debian 6.0

Debian 6.0 introduces a dependency based boot system, making system start-up faster and more robust due to parallel execution of boot scripts and correct dependency tracking between them. Various other changes make Debian more suitable for small form factor notebooks, like the introduction of the KDE Plasma Netbook shell. Following new updated major software packages are included:

  1. KDE Plasma Workspaces and KDE Applications version 4.4.5
  2. an updated version of the GNOME desktop environment version 2.30
  3. the Xfce version 4.6 desktop environment
  4. LXDE version 0.5.0
  5. X.Org version 7.5
  6. OpenOffice.org version 3.2.1
  7. GIMP version 2.6.11
  8. Iceweasel version 3.5.16 (an unbranded version of Mozilla Firefox)
  9. Icedove version 3.0.11 (an unbranded version of Mozilla Thunderbird)
  10. PostgreSQL version 8.4.6
  11. MySQL version 5.1.49
  12. GNU Compiler Collection version 4.4.5
  13. Linux kernel version 2.6.32
  14. Apache web server version 2.2.16
  15. Samba file and print server version 3.5.6
  16. Python version 2.6.6, 2.5.5 and 3.1.3
  17. Perl version 5.10.1
  18. PHP version 5.3.3
  19. Asterisk version 1.6.2.9
  20. Nagios version 3.2.3
  21. Xen Hypervisor 4.0.1 (dom0 as well as domU support)
  22. OpenJDK version 6b18
  23. Tomcat version 6.0.18
  24. And more than 29,000 other ready-to-use software packages, built from nearly 15,000 source packages.

Debian 6 Download

Debian provides all packages on CD / DVD and the total size is around 32GB+ for all media files. You only need to download first CD / DVD and install the base system. Once downloaded, use the Internet to install any packages.

32 bit vs 64 bit Debian Linux Version

  • For almost all PCs use 32 bit version. For e.g., most machines with Intel/AMD type processors.
  • Choose 64 bit version to take full advantage of computers based on the AMD64 or EM64T architecture (e.g., Athlon64, Opteron, EM64T Xeon, Core 2 duo).

Debian 6 DVD ISO download

There are total 8 DVD images:

You can use the following shell script to grab all 8 DVD images:

#!/bin/bash
# getdeb6: Download Debian 6 DVD images
# Tip: run it over screen session
_bit="${1:-64}"
_arch="i386"
_base="http://cdimage.debian.org/debian-cd/6.0.0/i386/iso-dvd"
[ "$_bit" == "64" ]  { _base="http://cdimage.debian.org/debian-cd/6.0.0/amd64/iso-dvd"; _arch="amd64"; }
echo "Downloading Debian Linux v6.0 ${_bit} bit DVD..."
for i in {1..8}
do
        # build image path
	_image="${_base}/debian-6.0.0-${_arch}-DVD-${i}.iso"
	wget -c $_image
done

To grab 32 bit images, enter:
$ mkdir debian6_32 cd debian6_32
$ ./getdeb6 32

To grab 64 bit images
$ mkdir debian6_64 cd debian6_64
$ ./getdeb6

Debian download: Debian 6 CD ISO download

There are total 52 ISO images, I strongly suggest to get DVD images :

You can use the following shell script to grab all 52 images:

#!/bin/bash
# getdeb6: Download Debian 6 ISO images
# Tip: run it over screen session
_bit="${1:-64}"
_arch="i386"
_base="http://cdimage.debian.org/debian-cd/6.0.0/i386/iso-cd"
[ "$_bit" == "64" ]  { _base="http://cdimage.debian.org/debian-cd/6.0.0/amd64/iso-cd"; _arch="amd64";}
echo "Downloading Debian Linux v6.0 ${_bit} bit ISO images..."
for i in {1..52}
do
	_image="${_base}/debian-6.0.0-${_arch}-CD-${i}.iso"
	wget -c $_image
done

To grab 32 bit images, enter:
$ mkdir debian6_32 cd debian6_32
$ ./getdeb6 32

To grab 64 bit images
$ mkdir debian6_64 cd debian6_64
$ ./getdeb6

Debian Linux 6 DVD ISO BitTorrent download

Download images from the following mirror:

Debian 6 DVD ISO BitTorrent download

Debian 6 Upgrade over the Internet

Debian Linux 6 Download Mirrors list

Featured Articles:

Tags:

Top 5 Linux DVD RIP Software

/* Posted February 9th, 2011 at 8:19am [Comments: none]    */
/* Filed under Linux    */

A DVD ripper software allows you to copying the content of a DVD to a hard disk drive. You transfer video on DVDs to different formats, or make a backup of DVD content, and to convert DVD video for playback on media players, streaming, and mobile phone. A few DVD rippers software can copy protected disks so that you can make discs unrestricted and region-free.

Please note that most of the following programs can rip encrypted DVDs, as long as you have libdvdcss2 installed as described here. Please check the copyright laws for your country regarding the backup of any copyright-protected DVDs and other media.

#1: AcidRIP

AcidRip is an automated front end for MPlayer/Mencoder (ripping and encoding DVD tool using mplayer and mencoder) written in Perl, using Gtk2::Perl for a graphical interface. Makes encoding a DVD just one button click! You can install it as follows under Debian / Ubuntu Linux:
$ sudo apt-get install acidrip

Fig.01: Linux Ripping And Encoding DVD's With AcidRip Software

Fig.01: Linux Ripping And Encoding DVD’s With AcidRip Software

On the Preview tab you can choose to watch a bit of a preview of the resulting movie:
Fig.02: Preview your DVD rip

Fig.02: Preview your DVD rip

And when you are ready, click the Start button to rip DVDs.

= Download acidrip

#2: DVD::RIP

dvd::rip is a full featured DVD copy program written in Perl i.e. fron end for transcode and ffmpeg. It provides an easy to use but feature-rich Gtk+ GUI to control almost all aspects of the ripping and transcoding process. It uses the widely known video processing swissknife transcode and many other Open Source tools. dvd::rip itself is licensed under GPL / Perl Artistic License. You can install dvd::rip as follows under Debian / Ubuntu Linux:
$ sudo apt-get install dvdrip

Fig.03: dvd::rip in action

Fig.03: dvd::rip in action

You need to configure dvd::rip before you actually start a project. See the documentation for more information.

= Download dvd::rip

#3: HandBrake

HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder, available for MacOS X, Linux and Windows. It can rip from any DVD or Bluray-like source such as VIDEO_TS folder, DVD image, real DVD or bluray (unencrypted — removal of copy protection is not supported), and some .VOB, .TS and M2TS files. You can install HandBrake under Debian or Ubuntu Linux as follows:
$ sudo apt-get install handbrake-gtk

Fig.04: HandBrake in action

Fig.04: HandBrake in action

= Download HandBrake

#4: k9copy

K9copy is a KDE DVD Backup tool. It allows the copy of a DVD9 to a DVD5. It is also known as a Linux DVD shrink. It supports the following features:

  • The video stream is compressed to make the video fiton a 4.7GB recordable DVD
  • DVD Burning
  • Creation of ISO images
  • Choosing which audio and subtitle tracks are copied.
  • Title preview (video only)
  • The ability to preserve the original menus.

To install k9copy, enter:
$ sudo apt-get install k9copy

Fig.05: k9copy - Linux dvd shrink in action

Fig.05: k9copy – Linux dvd shrink in action

= Download k9copy

#5: thoggen

thoggen is a DVD backup utility (‘DVD ripper’) for Linux, based on GStreamer and Gtk+ toolkit. Thoggen is designed to be easy and straight-forward to use. It attempts to hide the complexity many other transcoding tools expose and tries to offer sensible defaults that work okay for most people most of the time. It support the following features:

  • Easy to use, with a nice graphical user interface (GUI).
  • Supports title preview, picture cropping, and picture resizing.
  • Language Selection for audio track (no subtitle support yet though).
  • Encodes into Ogg/Theora video.
  • Can encode from local directory with video DVD files.
  • Based on the GStreamer multimedia framework, which makes it fairly easy to add additional encoding formats/codecs in future.

You can install thoggen as follows:
$ sudo apt-get install thoggen

Fig.06: Thoggen in action

Fig.06: Thoggen in action

= Download thoggen

Other Tools and Back-ends

= You need to install various libraries to use the above mentioned tools such as (yum or apt-get commands will install them automatically for you):

  • libdvdcss2 – Simple foundation for reading DVDs – runtime libraries.
  • libdvdnav4 – DVD navigation library.
  • libdvdread4 – library for reading DVDs.

= mencoder – Personally, I use mencoder to rip my DVDs into .avi files as follows:

mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -vf scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o /nas/videos/my-movies/example/track2.avi

Please note that AcidRip, is a graphical frontend for mencoder.

= VLC – Yes, VLC can rip DVDs too.

= Transcode is a suite of command line utilities for transcoding video and audio codecs, and for converting between different container formats. Transcode can decode and encode many audio and video formats. Both K9Copy and dvd::rip are a graphical frontend for transcode.

= Wine – It is an open source software for running Windows applications on other operating systems. You can use popular MS-Windows application such as DVDFab to rip encrypted DVD’s and DVD Shrink to shrink them to smaller size. I do not *recommend* and encourage this option as it goes against the FOSS philosophy. The following screenshot based on trial version of DVDFab:

Fig.07: Running DVDFab under Wine v1.2.2

Fig.07: Running DVDFab under Wine v1.2.2

See also:

Have a favorite Linux DVD ripper software or ripping tip? Let’s hear about it in the comments below.

Featured Articles:

Tags:

FAQ Updates – Feb/07/2010

/* Posted February 7th, 2011 at 8:18am [Comments: none]    */
/* Filed under Linux    */

Our FAQ section is updated in last few days with new howtos:

  1. HowTo: Upgrade Debian 5.0 (Lenny) To Debian 6.0 (Squeeze)
  2. regionset: Linux Set / Change DVD Region Code
  3. HowTo: Check Ram Size From Redhat Linux Desktop System
  4. Linux / UNIX: TZ Environment Variable
  5. Screen Command: Set Baud Rate [ Terminal Communication ]
  6. UNIX / Linux: Rsnapshot Restore Backups
  7. UNIX: Read a File Line By Line
  8. Debian Linux: Set a Serial Console
  9. Linux: Find Out My Group Name [ Group Memberships ]
  10. Howto: Call Shell Script function In echo statement
  11. Bash Infinite Loop Examples
  12. PHP: ? ? Tags Not Working in PHP 5.3.x under UNIX / Linux
  13. Linux / UNIX: Software Update Vs Upgrade – What’s the Difference?
  14. Linux: phpinfo() system’s timezone error date.timezone
  15. Explains: Linux linux-gate.so.1 Library / Dynamic Shared Object [ vdso ]
  16. Linux: rsync Copy Directories Structures Tree Only
  17. Debian Linux Configure Wireless Networking With WPA2
  18. HowTo: Upgrade Debian Lenny to Squeeze
  19. Linux: Check Network Connection Command
  20. Linux / UNIX: Kill User Session
  21. Linux exec-notify: Find Out Shell Escaping Applications [ Security Monitoring ]
  22. Linux / UNIX: Kill Unresponsive SSH Session
  23. Linux / UNIX: Speed up SSH X11 Forwarding
  24. Ubuntu: SIOCADDRT: File exists Error and Solution
  25. Mediawiki Fix Internal Server Host Names / Redirection In shared Hosting or Proxy Setup
  26. Linux / UNIX: mplayer Play mp3s From a Playlist File
  27. Linux: Block Port With IPtables
  28. nginx: Create HTTP 503 Maintenance Custom Page

FAQ Howtos RSS Feed

Get intimated about our new howtos / faqs as soon as it is released via RSS feed.

nixCraft is on Facebook!

Not our Fan yet? We suggest you become one right away! Just visit our Facebook Page. Click on the “like” button.

Featured Articles:

Tags:

HowTo: Configure Vbulletin To Use A Content Delivery Network (CDN)

/* Posted February 5th, 2011 at 8:18am [Comments: none]    */
/* Filed under Linux    */

The last time I wrote about CDN, I wrote about how to configure CDN for wordpress to speed up your wordpress blog to display content to users faster and more efficiently. However, a few regular readers like to know how to configure the Amazon CDN or other CDN network to use with Vbulletin forum software. In this quick tutorial, I will explains how to configure Vbulletin, Apache/Lighttpd webserver, Bind dns server to use a CDN to distribute your common files such as css, js, user uploaded files and lighten load on your web server.

Our Sample Forum Setup

  1. Forum URL : http://nixcraft.in/ - This is hosted on your own server using Apache, Lighttpd, or Nginx.
  2. Origin Pull URL : http://cdn-origin.nixcraft.in/ – This is hosted on your own server. You need to configure your web server, vbulletin and dns server to use this. This is called as “Origin Pull Host” which is a CDN method by which content is pulled from your web server.
  3. CDN URL : http://cdn.nixcraft.in/ – This is a cdn url hosted by your CDN provider such as Amazon. This url always point to an edge server via proprietary DNS hacks. cdn.nixcraft.in must be set as CNAME records which will point to domain names of CDN server.
  4. CDN DNS CNAME : cdn.nixcraft.in.example.com - example.com is your CDN provider. This is must be set as CNAME for cdn.nixcraft.in

Step # 1: Purchase CDN Service

As I said earlier the cost varies between CDN providers. Check CDN service providers website for more information. Next, you need to use service providers “control panel” to configure an “Origin Pull Host” for each domain. In other words configure cdn.nixcraft.in in origin pull mode. The control panel will also provide your an option to setup CDN dns CNAME. You need to use same CNAME in step # 2. Once the configuration is active and the CNAME is resolving, calls to cdn.nixcraft.in will be cached from cdn-origin.nixcraft.in.

Step # 2: Update Your DNS Server

I’m assuming that you are using BIND dns server edit your zone file and add entry as follows (you can skip this step and use your ISP’s dns hosting providers control panel to setup CNAME and origin host):

; CDN CNAME mapping for cdn.nixcraft.in
cdn                 3660       IN CNAME cdn.nixcraft.in.example.com.
; Your cdn-origin url (note nixcraft.in is also hosted on same server IP 123.1.2.3)
cdn-origin        3600       IN A 123.1.2.3

Save and close the file. Reload named:
# rndc reload tail -f /var/log/messages
To keep your configuration simple use the same web server for origin pull domain and main domain i.e. host both cdn-origin.nixcraft.in and nixcraft.in on same web server. This allows you to directly upload and map files to the CDN server.

Step # 3: Configure Origin Pull Web Server

You need to configure cdn-origin.nixcraft.in as follows:

  1. Origin pull DocumentRoot: /home/httpd/cdn-origin.nixcraft.in – All your .css, .js and uploaded files are hosted here.
  2. Server Forum DocumentRoot: /home/httpd/nixcraft.in – All your vbulletin files are hosted here.
  3. MaxAge: Set cache-lifetime headers for static files for cdn network.
  4. Etags: An ETag (entity tag) is part of HTTP, the protocol for the World Wide Web. It is a response header that may be returned by an HTTP/1.1 compliant web server and is used to determine change in content at a given URL. When a new HTTP response contains the same ETag as an older HTTP response, the client can conclude that the content is the same without further downloading.

Sample Apache Configuration

VirtualHost cdn-origin.nixcraft.in 
	ServerAdmin webmaster@nixcraft.in
	DocumentRoot /home/httpd/cdn-origin.nixcraft.in
	ServerName files.nixcraft.in
	ServerAlias file.nixcraft.in
	ErrorLog /var/logs/httpd/cdn-error_log
	CustomLog /var/logs/httpd/cdn-access_log common
 
	# Files in this directory will be cached for 1 week only.
	# After 1 week, CDN server will check if the contents has been modified or not.
	# If not modified, Apache will send 304 "Not Modified" header
	Directory "/userimages"
		Header set Cache-Control "max-age=604800, must-revalidate"
	/Directory
 
	# Disable ETag as we are on cluster Apache server
	Directory "/pdfs"
		Header unset ETag
		FileETag None
	/Directory
 
	# Do not cache
	Directory "/patches"
		Header Set Cache-Control "max-age=0, no-store"
	/Directory
/VirtualHost

Sample Lighttpd Configuration

# Configure ETags
etag.use-inode = "enable"
etag.use-mtime = "enable"
etag.use-size = "enable"
static-file.etags = "enable"
 
###### CDN FILES via WordPress Upload ##############
$HTTP["host"]  == "cdn-origin.nixcraft.in"{
        server.document-root = "/home/httpd/cdn-origin.nixcraft.in"
        accesslog.filename         = "/var/log/lighttpd/cdn.access.log"
	#  Set max age
        $HTTP["url"] =~ "^/" {
            expire.url = ( "" = "access 60 days" )
        }
}

Adjust documentroot as per your setup.

Step # 4: Create Required Directories

You need to configure files for cdn-origin.nixcraft.in:
# mkdir -p /home/httpd/cdn-origin.nixcraft.in
# cd /home/httpd/cdn-origin.nixcraft.in

Next, soft link your .css, .js, images, clientscripts files against original forum documentroot (i.e. /home/httpd/nixcraft.in/) as follows:
# ln -s ../nixcraft.in/clear.gif .
# ln -s ../nixcraft.in/clientscript/ .
# ln -s ../nixcraft.in/customavatars/ .
# ln -s ../nixcraft.in/customprofilepics/ .
# ln -s ../nixcraft.in/images/ .
# ln -s ../nixcraft.in/signaturepics/ .

Again, feel free to adjust paths according to your setup. Test your new cdn urls:
http://cdn.nixcraft.in/clientscript/vbulletin_important.css

Step # 5: Configure Vbulletin To Use a CDN Server

You need to edit your vbulletin style. Open admincp by visiting http://nixcraft.in/admincp/ Select Styles Templates Replacement Variable Manager:

Fig.01: Vbulletin Editing Styles And Templates

Fig.01: Vbulletin Editing Styles And Templates

Click on [Add New Replacement Variable] link and set it as follows:

  • Set Search for Text to href=”clientscript
  • Set Replace with Text to href=”http://cdn.nixcraft.in/clientscript

Sample outputs:

Fig.02: Vbulletin Adding Replacement Variable For CDN

Fig.02: Vbulletin Adding Replacement Variable For CDN

You need to repeat this step for images, javascript and other shared media as follows:

Avatars Pictures – Storage Type

Visit Avatars Storage Type and set them as follows to match your above CDN rules by moving all of them to file systems:

  • Avatars are currently being served from the filesystem at ./customavatars
  • Profile pictures are currently being served from the filesystem at ./customprofilepics
  • Signature pictures are currently being served from the filesystem at ./signaturepics

How Do I Test Images And Other Media Files Are Cached Or Not By CDN?

Use curl to test HTTP headers (look for Etags, max-age and Expires headers):
$ curl -I 'http://cdn.nixcraft.in/clientscript/vbulletin_important.css?v=385'
$ curl -I http://cdn.nixcraft.in/customavatars/avatarx_y.gif

Conclusion

The forum home page loading (rendering) time went from 8.5 seconds to 2.2 seconds and average thread loading time went from 14.3 seconds to 5 seconds:

Fig.03 Speed Improvements With CDN

Fig.03 Speed Improvements With CDN

See 6 tools to test web site speed for more information.

Recommend readings:

Featured Articles:

Tags:

The Story Behind The Largest Distributor Of The Linux Operating System

/* Posted February 3rd, 2011 at 8:17am [Comments: none]    */
/* Filed under Linux    */

Interesting read and I wasn’t aware of some of the facts behind the open-source entrepreneur Bob Young. From the BBC article:

Bob Young is a self-confessed contrarian with a strong desire to change the world by allowing people to share and collaborate. The approach has served him well and has helped turn the Canadian into a multi-millionaire. Bob YoungFrom the outset, his software company Red Hat bucked the trend set by the big players like Microsoft which stubbornly guarded every line of code and charged whopping fees to maintain it.


And don’t forget to check out the video which explains how Red Hat got its name.

Featured Articles:

Tags:

HowTo: Speed Up Linux Software Raid Building And Re-syncing

/* Posted February 1st, 2011 at 1:34am [Comments: 1]    */
/* Filed under Linux    */

It is no secret that I am a pretty big fan of excellent Linux Software RAID. Creating, assembling and rebuilding small array is fine. But, things started to get nasty when you try to rebuild or resync large size array. You may get frustrated when you see it is going to take 22 hours to rebuild the array. You can always increase RAID resync performance using the following technique.

Recently, I build a small NAS server running Linux for one my client with 5 x 2TB disks in RAID 6 configuration for all in one backup server for Mac OS X and Windows XP/Vista clients computers. Then whey I cat /proc/mdstat it reported that md0 is created and resync is in progress. The resync speed was around 4000K/sec and resync will complete in approximately in 22 hours. I wanted to finish this early.

/proc/sys/dev/raid/{speed_limit_max,speed_limit_min}

The /proc/sys/dev/raid/speed_limit_min is config file that reflects the current “goal” rebuild speed for times when non-rebuild activity is current on an array. The speed is in Kibibytes per second, and is a per-device rate, not a per-array rate . The default is 1000.

The /proc/sys/dev/raid/speed_limit_max is config file that reflects the current “goal” rebuild speed for times when no non-rebuild activity is current on an array. The default is 100,000.

To see current limits, enter:
# sysctl dev.raid.speed_limit_min
# sysctl dev.raid.speed_limit_max

To increase speed, enter:

 
echo value  /proc/sys/dev/raid/speed_limit_min
 

OR

 
sysctl -w dev.raid.speed_limit_min=value
 

In this example, set it to 50000 K/Sec, enter:
# echo 50000 /proc/sys/dev/raid/speed_limit_min
OR
# sysctl -w dev.raid.speed_limit_min=50000
If you want to override the defaults you could add these two lines to /etc/sysctl.conf:

dev.raid.speed_limit_min = 50000
dev.raid.speed_limit_max = 200000

Bitmap Option

Bitmaps optimize rebuild time after a crash, or after removing and re-adding a device. Turn it on by typing the following command:
# mdadm --grow --bitmap=internal /dev/md0
Once array rebuild or fully synced, disable bitmaps:
# mdadm --grow --bitmap=none /dev/md0

Result

My speed went from 4k to 51k:
cat /proc/mdstat
Sample outputs:


Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md5 : active raid1 sde2[2](S) sdd2[3](S) sdc2[4](S) sdb2[1] sda2[0]
      530048 blocks [2/2] [UU]

md0 : active raid6 sde3[4] sdd3[3] sdc3[2] sdb3[1] sda3[0]
      5855836800 blocks level 6, 64k chunk, algorithm 2 [5/5] [UUUUU]
      [============........]  resync = 61.7% (1205475036/1951945600) finish=242.9min speed=51204K/sec

References:

  • man page md and mdadm

Featured Articles:

Tags:

List: Linux Compatible USB Wireless Adapter (WUSB)

/* Posted January 30th, 2011 at 1:34am [Comments: none]    */
/* Filed under Linux    */

A regular question from my mailbag:

I am in the process of up grading my computer. Where can I get a list of the WUSB for Linux?

Wireless USB adapters are pretty popular for desktop and laptop usage in home. It is capable of sending 480 Mbit/s at distances up to 3 meters and 110 Mbit/s at up to 10 meters. Newer N series can work at 270Mbit/s at up to 300 meters. However, 50-100 meters are acceptable ranges. Unfortunately, finding Linux compatible USB wireless adapter is a big challenge due to driver issues. Over a past few years, I’ve used and installed various USB wireless adapters and created my own small HCL for it. In this quick blog post I will list all working USB wireless adapter.

Buffalo WLI-UC-G300N

Buffalo’s Wireless-N WLI-UC-G300 compact USB 2.0 adapter is fully compatible with Linux. Currently I’m using this device with Ubuntu Linux 10.4 and it works out of box. No driver installation is required. Simply add your wireless WPA2 password and you will be hooked up to wireless network. The driver in latest version of Ubuntu kernel is broken and you need to install the driver from source code. (Driver Link for RT2870)

Asus USB-N13

Asus USB-N13 802.11n/g/b network adapter supports USB 2.0 wireless and speed up to 300Mbps Wireless data rates. I get superb connection speed upto 270Mbps and it was auto detected by Linux. (Driver Link for RT2870)

Belkin F5D8053 N Wireless USB Adapter (ver 3)

Belkin F5D8053 version 3 also works with Linux. It supports USB 2.0 wireless and speed up to 300Mbps at up to 300 meters. I’ve tested this one with Fedora Linux. (Driver Link for RT2870)

AboCom WU-5204

AboCom WU-5204 is another compact adapter which is fully compatible with Linux. It complies with IEEE 802.11n draft 3.0 and IEEE 802.11 b/g standards and works with USB 2.0/1.1. interface. This one worked and detected, however after some time it started to drop traffic for multimedia stuff. If possible avoid this one due to poor performance.

D-Link DWA-140

The D-Link RangeBooster NUSB Adapter (DWA-140) is a 802.11n compliant wireless client for your Linux desktop or notebook PC. I’ve tested this one with Fedora and Debian Linux. Like all other adapter it supports WPA and WPA2 security features. (Driver Link for RT2870)

EDIMAX EW-7718Un

EW-7718Un complies with 802.11n draft 2.0, the next generation wireless standard. With the advanced MIMO technology, it can support the data transmission rate up to 300Mbps. EW-7718Un stable wireless connection and high bandwidth enable you enjoying the network applications without any interruption with Linux based systems. (Driver Link for RT2870 #2 # 2 link)

TRENDNET TEW 664UB

TEW-664UB is 300Mbps dual band wireless N USB adapter. It is compliant with IEEE 802.11n standard and backwards compatible with IEEE 802.11g, IEEE 802.11b and IEEE 802.11a devices. It supports both WPA and WPA2 security.

SMC WUSBS-N3

The EZ Connect N 150Mbps Wireless USB2.0 Adapter (SMCWUSBS-N3) enables wireless connectivity to your desktop or notebook computer and provides improved throughput and range while maintaining full backwards compatibility with the Wireless-G (802.11g) and Wireless-B (802.11b) standards.

ZyXEL NWD-211AN and NWD-270N

ZyXEL NWD-211AN and NWD-270N both works with Linux operating systems. It complies with 802.11n (2.4GHz and 5GHz) and backwards compatible with IEEE 802.11a/b/g. It supports wireless security transmission with WPA/WPA2 and 802.1x.

Sparklan WUBR-501

Sparklan WUBR-501 use USB 2.0 interface and speed up to 300Mbps. It support WPA and WPA2 security.

AirLink101 AWLL6090

AWLL6090 Wireless 300N USB Adapter delivers speeds up to 300Mbps. This USB adapter is fully backward compatible with 802.11b/g and RoHS compliant.

ConnectGear WU260N

ConnectGear WU260N Wireless N USB Adapter 802.11n/g/b supports speed upto 300Mbps with USB 2.0 or 1.1 ports. It’s also backward compatible with the existing IEEE802.11g and 802.11b standards for existing wireless networks. Both WPA and WPA2 are supported by this device.

Notes

Most of the above devices are automatically installed. If not try updating your kernel version. I hope this post will save some time for readers while purchasing USB wireless adapter for Linux operating systems.

The list is for information and ready references only. Please do your own research before purchasing any device listed here.

See also:

Featured Articles:

Tags:

HowTo: Migrate / Move MySQL Database And Users To New Server

/* Posted January 28th, 2011 at 1:34am [Comments: none]    */
/* Filed under Linux    */

I already wrote about how to move or migrate user accounts from old Linux / UNIX server to a new server including mails and home directories. However, in reality you also need to move MySQL database which may host your blog, forum or just your data stored in MySQL database. The mysqldump command will only export the data and the table structure but it will not include a users grants and privileges. The main function of the MySQL privilege system (which is stored in mysql.user table) is to authenticate a user who connects from a given host and to associate that user with privileges on a database such as SELECT, INSERT, UPDATE, and DELETE.

Our Sample Setup

  +-----+
  | db1 | ------------------------- -+
  +-----+                             |
   old mysql server                   |
   (192.168.1.8)                      |
  +-----+                             |        ///////////////////////////////
  | db2 | ------------------------- -+------ // Internet (ISP router      //
  +-----+                             |        // with port 80 forwarding)  //
   new mysql server                   |        ///////////////////////////////
   (192.168.1.10)                     |
  +-----+                             |
  | www1| ------------------------- -+
  +-----+
    Apache web server
    (192.168.1.5)

You need to move db1 server database called blogdb and its users to db2 server.

Install MySQL On DB2

Use the apt-get or yum command to install mysql on DB2 server:
$ sudo apt-get install mysql-server mysql-client
$ sudo service mysql start
# set root password for new installation
$ mysqladmin -u root password NEWPASSWORD

OR
$ sudo yum install mysql-server mysql
$ sudo chkconfig mysql on
$ sudo service mysql start
# set root password for new installation
$ mysqladmin -u root password NEWPASSWORD

Make sure OpenSSH server is also installed on DB2.

Get Current MySQL, Usernames, Hostname, And Database Names

Type the following command at shell prompt to list username and hostname list, enter:

mysql -u root -B -N -p -e "SELECT user, host FROM user" mysql

Sample outputs:

vivek	192.168.1.5
tom	192.168.1.5
blog	192.168.1.7
root	localhost
	db1.vm.nixcraft.net.in
root	db1.vm.nixcraft.net.in

The first column is mysql username and second one is network host names. Now, type the following command to get exact details about grants and password for each user from above list:

mysql -u root -p -B -N -e"SHOW GRANTS FOR 'userName'@hostName"
mysql -u root -p -B -N -e"SHOW GRANTS FOR 'vivek'@192.168.1.5"

Sample outputs:

GRANT USAGE ON *.* TO 'vivek'@'192.168.1.5' IDENTIFIED BY PASSWORD 'somePasswordMd5'
GRANT ALL PRIVILEGES ON `blogdb`.* TO 'vivek'@'192.168.1.5'

Where,

  • vivek – MySQL login username
  • 192.168.1.5 – Another server or workstation to access this mysql server
  • somePasswordMd5 – Password stored in mysql database which is not in a clear text format
  • blogdb – Your database name

Now, you’ve all info and you can move database and users to a new server called db2 as follows using the combination of OpenSSH ssh client and mysql clients as follows:

ssh user@db2 mysql -u root -p'password' -e "create database IF NOT EXISTS blogdb;"
ssh user@db2 mysql -u root -p'password' -e "GRANT USAGE ON *.* TO 'vivek'@'192.168.1.5' IDENTIFIED BY PASSWORD 'somePasswordMd5';"
ssh user@db2 mysql -u root -p'password' -e "GRANT ALL PRIVILEGES ON `blogdb`.* TO 'vivek'@'192.168.1.5';"
mysqldump -u root -p'password' -h 'localhost' blogdb | ssh user@db2 mysql -u root -p'password' blogdb

You can test it as follows from Apache web server:
$ mysql -u vivek -h 192.168.1.10 -p blogdb -e 'show tables;'

A Note About Web Applications

Finally, you need to make changes to your application to point out to new a database server called DB2. For example, change the following from:

 
        $DB_SERVER = "db1.vm.nixcraft.net.in";
        $DB_USER = "vivek";
        $DB_PASS = "your-password";
        $DB_NAME = "blogdb";
 

To:

 
        $DB_SERVER = "db2.vm.nixcraft.net.in";
        $DB_USER = "vivek";
        $DB_PASS = "your-password";
        $DB_NAME = "blogdb";
 

A Sample Shell Script To Migrate Database

#!/bin/bash
# Copyright (c) 2005 nixCraft project http://cyberciti.biz/fb/
# This script is licensed under GNU GPL version 2.0 or above
# Author Vivek Gite vivek@nixcraft.com
# ------------------------------------------------------------
# SETME First - local mysql user/pass
_lusr="root"
_lpass="MySQLPassword"
_lhost="localhost"
 
# SETME First - remote mysql user/pass
_rusr="root"
_rpass="mySQLPassword"
_rhost="localhost"
 
# SETME First - remote mysql ssh info
# Make sure ssh keys are set
_rsshusr="vivek"
_rsshhost="db2.vm.nixcraft.net.in"
 
# sql file to hold grants and db info locally
_tmp="/tmp/output.mysql.$$.sql"
 
#### No editing below #####
 
# Input data
_db="$1"
_user="$2"
 
# Die if no input given
[ $# -eq 0 ]  { echo "Usage: $0 MySQLDatabaseName MySQLUserName"; exit 1; }
 
# Make sure you can connect to local db server
mysqladmin -u "$_lusr" -p"$_lpass" -h "$_lhost"  ping /dev/null || { echo "Error: Mysql server is not online or set correct values for _lusr, _lpass, and _lhost"; exit 2; }
 
# Make sure database exists
mysql -u "$_lusr" -p"$_lpass" -h "$_lhost" -N -B  -e'show databases;' | grep -q "^${_db}$" ||  { echo "Error: Database $_db not found."; exit 3; }
 
##### Step 1: Okay build .sql file with db and users, password info ####
echo "*** Getting info about $_db..."
echo "create database IF NOT EXISTS $_db; "  "$_tmp"
 
# Build mysql query to grab all privs and user@host combo for given db_username
mysql -u "$_lusr" -p"$_lpass" -h "$_lhost" -B -N 
-e "SELECT DISTINCT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') AS query FROM user" 
mysql 
| mysql  -u "$_lusr" -p"$_lpass" -h "$_lhost" 
| grep  "$_user" 
|  sed 's/Grants for .*/#### /'  "$_tmp"
 
##### Step 2: send .sql file to remote server ####
echo "*** Creating $_db on ${rsshhost}..."
scp "$_tmp" ${_rsshusr}@${_rsshhost}:/tmp/
 
#### Step 3: Create db and load users into remote db server ####
ssh ${_rsshusr}@${_rsshhost} mysql -u "$_rusr" -p"$_rpass" -h "$_rhost"  "$_tmp"
 
#### Step 4: Send mysql database and all data ####
echo "*** Exporting $_db from $HOSTNAME to ${_rsshhost}..."
mysqldump -u "$_lusr" -p"$_lpass" -h "$_lhost" "$_db" | ssh ${_rsshusr}@${_rsshhost} mysql -u  -u "$_rusr" -p"$_rpass" -h "$_rhost" "$_db"
 
rm -f "$_tmp"
 

How Do I Use This Script?

Download the above script and edit it to set the following as per your setup:

# SETME First - local mysql DB1 admin user/password
_lusr="root"
_lpass="MySQLPassword"
_lhost="localhost"

# SETME First - remote mysql DB2 admin user/password
_rusr="root"
_rpass="mySQLPassword"
_rhost="localhost"

# Remote SSH Server (DB2 SSH Server)
# Make sure ssh keys are set
_rsshusr="vivek"
_rsshhost="db2.vm.nixcraft.net.in"

In this example, migrate a database called wiki with wikiuser username:
$ ./script.sh wiki wikiuser

Server moved – 14/July/2010

Dear User,

In the last two days nixcraft moved to the new server (details about our older setup are here). No data is lost and most of the stuff is back as usual. The new server is much more stable. However, required libraries for RSS feed and PDF file generation code are not installed. I will fixed it ASAP. If any one see any other errors or 404 errors, please send me an email at vivek@nixcraft.com. Please ignore rss feed which is currently showing all old entires in your feed. My apologies for the temporary inconvenience and flooding your rss feed and inbox. The IPv6 AAAA entries will be published later on this weekend.

Thanks for all your support!

–Vivek Gite

Featured Articles:

Tags:

Page 4 of 81234567...Last »