linux poison RSS
linux poison Email
2

Philosophy of free software (Video) by Richard Stallman

 
Download video of Richard Stallman in 2009  FLISOL - here
The video lasts 28 minutes and this format ogv (free technology for video compression)
Read more
0

Reducing load on web server by using reverse proxy - squid

Many large organizations use caching proxy servers to save on network bandwidth utilization (and costs) and improve browsing response times. In fact, an entire industry has grown up around caching proxy appliances. But in the open source world, we’ve had one of the most advanced proxy servers for many, many years. Squid (http://www.squid-cache.org) is to caching proxy servers as Apache is to web servers.

A quick-win method of reducing load on a Web site is to use a reverse proxy, which intercepts requests from clients and then proxies those requests on to the Web server, caching the response itself as it sends it back to the client.

This is useful because it means that for static content the proxy doesn't have to always contact the Web server, but can often serve the request from its own local cache. This in turn reduces the load on the Web server. This is especially the case when the Web server also serves dynamic content, since the Web server hardware can be less tuned to static content (when it is cached by a front-end proxy) and more tuned to serving dynamic content. It is also sometimes the case that although the Web server is serving dynamically created pages, these pages are cachable for a few seconds or maybe a few minutes. By using a reverse proxy, the serving of these pages speeds up dramatically.

Reverse proxying in this manner can also be used alongside the simple load balancing system, where static and dynamic content are split across separate servers. Obviously the proxy would be used on only the static content Web server.

Squid Configuration for Reverse Proxy:
The reverse proxy has to intercept every request, in order to compare it with its cache content. Let's assume we have two machines:

    * Web server serving http://www.example.net/ (192.168.0.1)
    * squid.example.net (192.168.0.2)

In squid.conf file we begin with the IP addresses, and tell it to listen for incoming requests on port 80.
http_port       192.168.0.2:80 vhost vport
http_port       127.0.0.1:80
icp_port        0
cache_peer      192.168.0.1 parent 80 0 originserver default
A reverse proxy for a public Web server has to answer requests for everybody so we need to add some ACL.
acl         all src 0.0.0.0/0.0.0.0
acl         manager proto cache_object
acl         localhost src 127.0.0.1/255.255.255.255
acl         reverseproxy dst 192.168.0.1 192.168.0.2
http_access allow reverseproxy
http_access allow manager localhost
http_access deny manager
http_access deny all
deny_info   http://www.example.net/ all
You can change your configuration as per your needs.
Read more
3

Next Generation of the Fastest P2P Program - FrostWire (OpenSuSe)

FrostWire is a peer-to-peer file sharing program for the Gnutella and BitTorrent protocols. FrostWire is written in Java, and is a fork of LimeWire, another popular Gnutella client. Released under the GNU General Public License, FrostWire is free software.

Features:

    * As with LimeWire, FrostWire is written in Java, and is therefore capable of supporting multiple platforms.
    * While LimeWire is available in both free and paid versions, FrostWire is released only as a free version, the Windows version of which comes bundled with the Ask.com toolbar. FrostWire includes much of the functionality of LimeWire's free version, as well as a few of LimeWire Pro's payment based upgrades.
    * FrostWire provides a chatroom, which is absent in LimeWire. However, LimeWire includes an instant messenger using the Jabber protocol and allows the user to share with individual friends in the messenger which is a feature not found in FrostWire. Starting from version 4.13.1.7, the chat feature of displays advertising to help pay for the required servers.[1]
    * FrostWire's interface was originally nearly identical to that of LimeWire. However, LimeWire 5.0 has a re-designed interface which has not been implemented by FrostWire. FrostWire's skin may be changed to a variety of different colors which is no longer an option in LimeWire 5.0.


Installation:
1) Download FrostWire (tar) - here
2) After sucessfull download, untar the package: tar -zxvf frostwire-4.18.0.noarch.tar.gz
3) Go inside the directory and run command: ./runFrostwire.sh to start the installation process

4) Configure your share folder location


Finally, after few more screens you should able to complete the installation to lunch the application

Read more
0

(R)ecovery (I)s (P)ossible Linux rescue system

Recovery Is Possible (RIP) is a Slackware-based CD boot/rescue/backup/maintenance system. It has support for a lot of filesystem types (Reiserfs, Reiser4, ext2/3, iso9660, UDF, XFS, JFS, UFS, HPFS, HFS, MINIX, MS DOS, NTFS, and VFAT) and contains a bunch of utilities for system recovery. It also has IDE/SCSI/SATA, PCMCIA, RAID, LVM2, and Ethernet/DSL/cable/PPP/PPPOE network support.

RIPLinux come with lots of tools:

    * Programas like fetchmail , curl, wget, ssh/sshd, mutt, links, msmtp, tmsnc, slrn, lftp, Firefox
    * Includes packages like cdrwtool, mkudffs and pktsetup for writing backups & files to optical media.
    * system monitoring: lshw, atop, htop, dmesg, dmidecode, mount utility (of course, these tools come with most of the Linux distros today but they could be useful to detect I/O errors, BIOS warnings, damaged partitions)
    * partitioning: fdisk, cfdisk, Ghost For Linux, GParted, Grub, Partimage, Testdisk (the list of supported partition types includes EXT4, Reiser4 and NTFS)
    * fsck.reiserfs and 'fsck.reiser4 to check and repair filesystem ReiserFS and Reiser4.
    * xfs_repair to repair a Linux file system xfs.
    * jfs_fsck to check and repair a Linux file system JFS.
    * e2fsck to check and repair a Linux file system ext2 or ext3.
    * ntfsresize for resizing the Windows NTFS without losing data.
    * ntfs-3g to write to Windows NTFS.
    * chntpw can view information and user passwords on Windows systems.
    * cmospwd allows you to retrieve password from CMOS / BIOS.


Download bootable ISO - here

Read more
0

Download/Upload files from torrents/Rapidshare or Videos from Youtube using FatRat download manager

FatRat is an open source download manager for Linux written in C++ and built on top of the Trolltech Qt 4 library. It is rich in features and is continuously extended.

Features:
    * HTTP(S)/FTP/ downloads
    * FTP uploads
    * RSS feed support + special functions for TV shows and podcasts
    * BitTorrent support (including torrent creating, DHT, UPnP, encryption etc.)
    * Torrent search
    * Support for SOCKS5 and HTTP proxies
    * RapidShare.com FREE downloads
    * RapidShare.com uploads
    * RapidShare.com link verification and folder extraction
    * RapidSafe link decoding
    * MD4/MD5/SHA1 hash computing
    * Remote control via Jabber (!)
    * Remote control via a web interface
    * YouTube video downloading

Installation: Use "1-click" installer to install Fatrat
OpenSuSe 11.1 - here

After sucessfull installation go to: Start >> Application >> Internet >> Data Exchange and start fatrat
 
The graphical interface is very organized and allows you to easily perform the most varied tasks, divided into tabs. FatRat is also very configurable, both in terms of downloading/uploading files, Torent and others. It also got some beautiful graphs which provide the detail view of upload/download speeds ...
Read more
1

Fighting Spam mails

Spam is flooding the Internet with many copies of the same message, in an attempt to force the message on people who would not otherwise choose to receive it. Most spam is commercial advertising, often for dubious products, get-rich-quick schemes, or quasi-legal services. Spam costs the sender very little to send -- most of the costs are paid for by the recipient or the carriers rather than by the sender.

Spammers get your e-mail addresses from webpages, news groups or domain records (if you have your own domain). There are individuals who use robots to extract the addresses, burn them on CDs and sell them very cheap to other Spammers. If you write your e-mail address in clear text onto your homepage today such that programs can extract it, then you will have a major problem in a few months time and you can't stop it. The problem will be growing every day!

Now lets discuss some common filter techniques and how they work. I will not describe how to configure them exactly in each MTA. Instead I suggest you to read the documentation that comes with the MTA that you have installed. Postfix and Exim are well documented

Realtime Block lists:
These are DNS based lists. You check the IP address of the mailserver that wants to send mail to your server against a blacklist of known spammers. Common lists are www.spamhaus.org.  You should however not be too enthusiastic about it and carefully choose the lists since there are also some which block entire IP ranges simply because one spammer had used a dialup connection from this ISP at one point in time.

8 bit characters in subject line:
About 30% of the spam origins in China, Taiwan or other Asian countries these days. If you are sure that you can't read Chinese then you can reject mail which has a lot of 8 bit characters (not ASCII) in the subject. Some MTAs have a separate configuration option for this but you can also use regular expression matching on the header:

      /^Subject:.*[^ -~][^ -~][^ -~][^ -~]/

This will reject email which has more than 4 consecutive characters in the subject line which are not in the ASCII range space to tilde. Both exim and postfix can be compiled with perl regular expression support. This method is quite good and keeps out 20-30% of the spam-mail.

Lists with "From" addresses of known spammers:
Forget it. This used to work back in 1997. Spammers today use faked addresses or addresses of innocent people.

Reject non FQDN (Fully Qualified Domain Name) sender and unknown sender domain:
Some spammers use non existent addresses in the "From". It is not possible to check the complete address but you can check the hostname/domain part of it by querying a DNS server.
This keeps out about 10-15% of the spam and you don't want these mails anyhow because you would not be able to reply to them even if they were not spam.

IP address has no PTR record in the DNS:
This checks that the IP address from where you get the mail can be reverse resolved into a domain name. This is a very powerful option and keeps out a lot of mail. I would not recommend it! This does not test if the system administrator of the mail server is good but if he has a good backbone provider. ISPs buy IP addresses from their backbone providers and they buy from bigger backbone providers. All involved backbone providers and ISPs have to configure their DNS correctly to make the whole chain work. If somebody in between makes a mistake or does not want to configure it then it does not work. It says nothing about the individual mail server at the end of the chain.

Require HELO command:
When 2 MTAs (mail servers) talk to each other (via smtp) then they first say who they are. Some spam software does not do that. This keeps out 1-5% of the spam.

Require HELO command and reject unknown servers:
You take the name that you get in the HELO command and then you go to DNS and check if this is a correctly registered server. This is very good because a spammer who uses just a temporary dialup connection will usually not configure a valid DNS record for it.
This blocks about 70-80% of all spam but rejects also legitimate mail which comes from sites with multiple mail servers where a sloppy system administrator forgot to put the hostnames of all servers into DNS.

Some MTAs have even more options but the above are quite commonly available in a good MTA. The advantage of all those checks is that they are not CPU intensive. You will usually not need to update your mailserver hardware if you use those checks. 
Read more
0

How to set Cron/At Access Control

Cron stores it's enteries in the crontab (cron table) file. This is generally located in your /etc directory. As well, each user on your system can have their own crontab which would be stored in /var/spool/cron/. To edit a users crontab entry, simply log into your system for that particular user and type crontab -e. The default editor for the 'crontab -e' command is vi. Below is the simple example of crontab entry

0 12  *  *  *  root  php /srv/www/mysar/dump.php >> /dev/null 2>&1

FieldMeaning
1Minute (0-59)
2Hour (2-24)
3Day of month (1-31)
4Month (1-12, Jan, Feb, etc)
5Day of week (0-6) 0 = Sunday, 1 = Monday etc or Sun, Mon, etc)
6Run the command as following user
7Command to execute

Now to control the access to crontab for particular user you need to edit the required configuration file depending upon your requirement, which are mentioned below.

1.  /etc/cron.allow
      If it exists, a user must be listed in this file in order to use crontab.

2. /etc/cron.deny
      If it exists, a user must not be listed in this file in order to user crontab.

Similary for "at" access control, you can edit the following files depending upon your requirement

1. /etc/at.allow
      Same as cron.allow, only for "at".

2. /etc/at.deny
      Same as cron.deny, only for "at".
Read more
5

How to set Access/Restrictions on users logins

Time Based Restrictions
These examples will limit the login times of certain users. See /etc/security/time.conf for more information/examples. In order to place time restrictions on user logins, the following must be placed in /etc/pam.d/login:

account    required    /lib/security/pam_time.so

The remaining lines should be placed in /etc/security/time.conf.

1. Only allow user nikesh to login during on weekdays between 7 am and 5 pm.

      login;*;nikesh;Wd0700-1700

2. Allow users A & B to login on all days between 8 am and 5 pm except for Sunday.

      login;*;A|B;AlSu0800-1700

If a day is specified more than once, it is unset. So in the above example, Sunday is specified twice (Al = All days, Su = Sunday). This causes it to be unset, so this rule applies to all days except Sunday.

Access Based Restrictions
/etc/security/access.conf can be used to restrict access by terminal or host. The following must be placed in /etc/pam.d/login in order for these examples to work:

account    required   /lib/security/pam_access.so

1. Deny nikesh login access on all terminals except for tty1:

      -:nikesh:ALL EXCEPT tty1

2. Users in the group operator are only allowed to login from a local terminal:

      -:operator:ALL EXCEPT LOCAL

3. Allow user A to only login from a trusted server:

      -:A:ALL EXCEPT trusted.somedomain.com
Read more
0

How to allow access to the mail server by individual domains - Sendmail

The access database (normally in /etc/mail/access) allows a mail administrator to administratively allow access to the mail server by individual domains. Each database entry consists of a domain name or network number as the key and an action as the value.

Keys can be a fully or partly qualified host or domain name such as host.subdomain.domain.com, subdomain.domain.com, or domain.com. The last two forms match any host or subdomain under the specified domain.

Keys can also be a network address or subnetwork, e.g., 205.199.2.250, 205.199.2, or 205.199. The latter two forms match any host in the indicated subnetwork. Lastly, keys can be user@host.domain to reject mail from a specific user.

Values can be REJECT to refuse connections from this host, DISCARD to accept the message but silently discard it (the sender will think it has been accepted), OK to allow access (overriding other built-in checks), RELAY to allow access including relaying SMTP through your machine, or an arbitrary message to reject the mail with the customized message.

For example, a database might contain:
abc.com REJECT 
sendmail.org RELAY 
spam@buyme.com 550 Spammer

to reject all mail from any host in the abc.com domain, allow any relaying to or from any host in the sendmail.org domain, and reject mail from spam@buyme.com with a specific message.

Note that the access database is a map and just as with all maps, the database must be generated using makemap. For example: makemap hash /etc/mail/access < /etc/mail/access
Read more
0

Create Screencasts on OpenSuSe with recordMyDesktop

A picture is worth a thousand words, especially when you're teaching someone how to do something on a computer, and recordMyDesktop is a great little Linux application for creating screencasts. YouTube is full of recordMyDesktop screencasts showing all kinds of captures, including Compiz in action.

recordMyDesktop is a program that captures audio-video data of a desktop session, producing an ogg-encapsulated theora-vorbis file.

recordMyDesktop tries to be as unobstrusive as possible by processing only regions of the screen that have changed.

The program is separated in two parts; a simple command line tool that performs the basic tasks of capturing and encoding and an interface that exposes the program functionality in a usable way. The frontend comes in two versions. One frontend is written with the gtk toolkit (named gtk-recordMyDesktop) and a more recent one with the Qt toolkit (qt-recordMyDesktop).

recordMyDesktop also offers the ability to record audio through ALSA, OSS or the JACK audio server.

Installation: Use "1-click" installer to install gtkpod
OpenSuSe 11.1 - here

After successful installation go to console and use command: gtk-recordMyDesktop to launch recordMyDesktop application


Running from command line: Hit Ctrl+C to stop recording:

$ recordmydesktop --no-sound -o newtest.ogg
Initial recording window is set to:                      
X:0   Y:0    Width:1152    Height:864                    
Adjusted recording window is set to:                     
X:0   Y:0    Width:1152    Height:864                    
Your window manager appears to be KWin
....
^C
*********************************************
Cached 42 MB, from 3189 MB that were received.
Average cache compression ratio: 98.7 %
*********************************************
Saved 840 frames in a total of 1123 requests
Shutting down......
STATE:ENCODING
Encoding started!
This may take several minutes.
Pressing Ctrl-C will cancel the procedure (resuming will not be possible, but
any portion of the video, which is already encoded won't be deleted).
Please wait...
Output file: newtest.ogg.ogv
[100%]
Encoding finished!
Wait a moment please...

Done.
Written 6587308 bytes
(6587308 of which were video data and 0 audio data)

Cleanning up cache...
Done!!!
Goodbye!
The result is an ogg theora-encoded video file named newtest.ogg, and it should be playable in most Linux media players, such as Kaffeine, VLC, and MPlayer.
Read more
0

Transferring audio/video to iPod on OpenSuSe

gtkpod is a Graphical User Interface (GUI) for Apple's iPod. It supports the first to fifth iPod generations including the iPod mini, iPod Photo, iPod Shuffle, iPod nano, and iPod Video.

It allows you to import your existing iTunes database, add songs, podcasts, videos and cover art, and to edit ID3 tags.

The latest version has added a raft of new features including: preliminary support gapless playback for MP3 files, multi-threaded on-the fly conversion of WAV, FLAC and OGG files to formats the iPod understands, background-copying of tracks to the iPod, display of album art, and the downloading of album art.

Features include:
    * Remove and export tracks from the iPod
    * Import and export Visio VDX files
    * Read an existing iTunesDB ( import the existing contents of an iPod including playcounts, ratings and on-the-go playlists)
    * Write the updated iTunesDB and added songs to the iPod
    * Add MP3, WAV, M4A (non-protected AAC), M4B (audio book), podcasts, and various video files (single files, directories or existing playlists) to the iPod
    * Normalize the volume of tracks (uses mp3gain or the replay-gain tag)
    * Create and modify playlists, including smart playlists
    * View, add and modify Cover Art
    * Browse the contents of a local harddisk by album/artist/genre by adding all your songs to the 'local' database
    * Extract tag information (artist, album, title...) from the filename
    * Detect duplicates when adding songs (optional)
    * Modify & refresh ID3 tags
    * Synchronize directories
    * Work offline and synchronize new playlists / songs with the iPod at a later time.
    * Export korganizer, kaddressbook, Thunderbird, evocalendar, Evolution etc data to the iPod
    * Choose the character set the ID3 tags are encoded in from within gtkpod

Installation: Use "1-click" installer to install gtkpod
OpenSuSe 11.1 - here
OpenSuSe 11.0 - here

After successful installation go to Start >>  Application >> Multimedia >> Administration and launch gtkpod application

 
Now after connecting ipod launch gtkpod and you will find you ipod listed in the leftmost pane of the application.

 
Now to add audio/video to your ipod just drag the respective file/folder into ipod's playlist and press the save changes button and the files should be loaded properly in the ipod.
Read more
0

Deluge BitTorrent client - OpenSuSe

Deluge is a full-featured BitTorrent client for Linux, Unix and Windows. It uses libtorrent in it's backend and PyGTK for it's user interface.

Deluge features a rich plugin collection; in fact, most of Deluge's functionality is available in the form of plugins.

Deluge was created with the intention of being lightweight and unobtrusive. It is our belief that downloading shouldn't be the primary task on your computer and therefore shouldn't monopolize system resources.

Features:
    * Web UI
    * BitTorrent Protocol Encryption
    * Mainline DHT
    * Local Peer Discovery (aka LSD)
    * FAST protocol extension
    * µTorrent Peer Exchange
    * UPnP and NAT-PMP
    * Proxy support   
    * Private Torrents
    * Global and per-torrent speed limits
    * Password protection
    * And much more!

Installation: Use "1-click" installer to install Deluge
OpenSuSe 11.1 - here

After sucessfull installation go to start >> Application >>  Internet >> Data Exchange and select deluge to open the deluge.

Deluge is easy to use. For example, I wanted to try out Linux Mint 4.0 for Xfce, so I went to the site and clicked on the appropriate torrent link. After confirming the download, Deluge started getting my download with no fuss. You can also add a torrent directly by clicking on File >> Add Torrent From URL and entering its URL.


There are dozens of BitTorrent clients available, but if you're looking for one that both is powerful and has a small footprint, consider Deluge.
Read more
0

Gmail Notifier - OpenSuSe

CheckGmail is a system tray application that checks a Gmail account for new mail. When new mail is present the tray icon changes, an optional animated popup is displayed and a tooltip displays the number and details of new messages. Each message can be opened directly in a browser window, and many common Gmail operations (marking as read, archiving, deleting or reporting as spam) can be carried out on messages directly within CheckGmail, without the need to use the Gmail web interface.

Configuration of CheckGmail is GUI-based and the application is designed to be simple, elegant and unobtrusive.

Features:
    * Small, fast and elegant
    * Open messages, mark as read, archive, delete, or report as spam directly from the popup window
    * Get and display the full text of messages in the notification window
    * Supports multiple languages     
    * Can be run in multiple instances to check different mail accounts
    * Can run commands (eg play a sound, turn on a LED) when new mail is present
    * Supports Gmail hosted domains
    * Optional password security
    * Supports proxy servers

Installation: Use "1-click" installer to install CheckGmail
OpenSuSe 11.1 - here
OpenSuSe 11.0 - here

After successful installation, go to  Start >> Application >> Internet >> E-Mail and open KCheckGmail and you will observe that a new tray icon got added, right click on the icon and select "Configure"

 
Click on "continue" to configure username and password and other very useful settings


After sucessfull configuration you should see something like ...

Read more
0

Monitoring DNS server on OpenSuSe - dnstop

dnstop is a great tool when maintaining a DNS server. Log file can give out required information but dnstop is just like top command for monitoring dns traffic. It is a small tool to listen on device or to parse the file savefile and collect and print statistics on the local network's DNS traffic. You can see information about all DNS clients, DNS queries and much more with this tool.

Installation: Use "1-click" installer to install dnstop
OpenSuSe 11.1 - here
OpenSuSe 11.0 - here

After successful installation, go to console and use command: dnstop eth0, this will show you the output from where (client ip address) you are getting the request on interface "eth0"



now press "2" to get the detail information about the domain-name that was resolved by your dnsserver


There many more option to provide detailed view of current, traffic, just type ? to view help for all run time options:

 s - Sources list
 d - Destinations list
 t - Query types
 o - Opcodes
 r - Rcodes
 1 - 1st level Query Names      ! - with Sources
 2 - 2nd level Query Names      @ - with Sources
 3 - 3rd level Query Names      # - with Sources
 4 - 4th level Query Names      $ - with Sources
 5 - 5th level Query Names      % - with Sources
 6 - 6th level Query Names      ^ - with Sources
 7 - 7th level Query Names      & - with Sources
 8 - 8th level Query Names      * - with Sources
 9 - 9th level Query Names      ( - with Sources
Read more
0

Monitoring Bandwidth Usage - iftop

iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts.

Overview of IFTOP
* iftop (interface top) derives the name from the standard unix top command. top command displays real-time CPU Usage. iftop command displays real-time network bandwidth usage.
* iftop displays the network usage of a specific interface on the host.
* Using iftop you can identify which host is responsible for slowing down your network.
* To find out which process is causing the problem, note down the port number from the iftop and use netstat -p to identify the process.
* iftop monitors your network activity, and displays a table of current bandwidth.

Installation:
OpenSuSe user can use "1-click" installer to install iftop
OpenSuSe 11.1 - here
OpenSuSe 11.0 - here

Others:
Download the source code form the iftop website - here and compile/install iftop using following commands
# tar -zxvf iftop-0.17.tar.gz
# cd iftop-0.17
# ./configure
# make
# make install
Using:
Go to your cosole and use command: iftop to start monitoring the bandwidth usage.
you can also specify a particular interface with the -i option: iftop -i eth1, some other options ..
* -p Enables promiscuous mode, so the traffic on any interface (if there is more than once) is checked and counted

* -P Shows also the port that connection is using both on both side

* -N Do not resolve port names, which is the default behavior when you enable the -P option, so it will shows you :www or :80



Read more
0

Monitoring Apache Server on OpenSuSe - apachetop

Apachetop is a curses-based realtime utility to display information from a running copy of Apache.

It is modelled after the standard 'top' utility, and displays information such as the requests pers second, bytes per second and the most popular URLs displayed.

It must be run from a machine running Apache, as it works by processing the logfiles found in /var/log/apache

Installation: use "1-click" installer to install apachetop
OpenSuSe 11.1 - here
OpenSuSe 11.0 - here

Using Apachetop:
ApacheTop watches a logfile generated by Apache (in standard common or combined logformat, and generates human-parsable output in realtime.

-f logfile
    Select which file to watch. Specify this option multiple times to watch multiple files.
-H hits | -T time
    These options are mutually exclusive. Specify only one, if any at all. They work as follows. ApacheTop maintains a table of information internally containing all the relevant information about the hits it's seen. This table can only be a finite size, so you need to decide how big it's going to be. You have two options. You can either: Use -H to say "remember hits" or      Use -T to say "remember all hits in seconds"
    The default (at the moment) is to remember hits for 30 seconds. Setting this too large (whichever option you choose) will cause ApacheTop to use more memory and more CPU time. My experimentation finds that remembering no more than around 5000 requests works well.
-q
    Instructs ApacheTop to keep the querystrings, not remove them.
-l
    Instructs ApacheTop to lowercase all URLs, thus /FOO and /foo are treated as the same and accumulate the same statistics.
-s segments
    Instructs ApacheTop to only keep the first parts of the path. Trailing slashes are kept if present. Statistics are then merged for each truncated url.
-p
    Instructs ApacheTop to keep the protocol (http:// usually) at the front of its' referrer strings. Normal behaviour is to remove them to give more room to more useful information.
-r secs
    Set default refresh delay, in seconds.


Example: apachetop -f /var/log/apache2/access_log

Read more
2

Installing Ubuntu without external media

The below method is only applicable if you alread have Linux (any) running, here I am using OpenSuSe 11.1 to install ubuntu-9.04 (Jaunty Jackalope) also you need a seperate partition to install ubuntu. you can also use gparted to create some space for ubuntu.

The benefits of installing without external media are that it can save you time if you are already familiar with the process, and you get a very usable system upon booting into the installer because it is running from a hard drive rather than a CD.

Note: you need to be root on your existing Linux system to use any of the below mentioned command

1) Download ubuntu iso - here

Note: I got my OpenSuSe 11.1 installed on /dev/sda2 and I want to install ubuntu on /dev/sda6, so check you device and move on.

2) Copy the iso contents using the command :
mkdir /tmp/iso
mount ubuntu-9.04-desktop-i386.iso -o loop /tmp/iso
mkdir /installer
mount /dev/sda6 /installer
cp -r /tmp/iso/* /installer
cp -r /tmp/iso/.disk /installer
umount /tmp/iso
3) Edit your grub configuration file (/etc/grub.conf or /boot/grub/menu.lst) to boot ubuntu.

title           Ubuntu installer
root            (hd0,5)
kernel        /casper/vmlinuz boot=casper root=/dev/ram ramdisk_size=1048576 rw
initrd          /casper/initrd.gz


The first line after the title tells grub which partition contains the installer. hd0 stands for "first hard disk," and the 5 following it standards for sixth partition. You will need to change this if your installer partition is different from /dev/sda6.

4) Reboot, and choose "Ubuntu installer" from the grub boot menu, and continue as if you were installing from CD.
Read more
0

Monitoring MySQL servers using mytop on OpenSuSe & Others

MySQL is one of the most important programs on a server, unfortunatly it is also pretty resource intensive. One a server it is not uncommon for a single user or even a query to take up the bulk of the servers cpu cycles. Mytop is a very useful program to see what queries a server is currently processing as well as which user is executing them. Think of mytop as top for mysql. If you see a lot from a user that means they are probably the hog. Mytop can also be useful for figuring out exactly which queries are causing the problem in the case of a self-designed website. The following is how to install mytop on the server and run it.

Installation: use "1-click" installer to install mytop
OpenSuSe 11.1 - here
OpenSuSe 11.0 - here

Others: Download the latest version of mytop - here and follow the below instruction to compile and install mytop
tar -zxvf mytop-.tar.gz
  cd mytop-
  perl Makefile.PL
  make
  make test
  make install
Using mytop:
You can directly use the mytop by typing “mytop” on your console screen initially you will get a message that “Unable to connect to Mysql” you will need to provide the host name, database name, username, password

To connect to the MySql database using Mytop you will need to give all your MySql details as a parameter:

-u - username of the database
-p - password for connecting to the database
-h - Host Name
-d - database name

Example: mytop -u root -p password -h localhost -d test

Instead of always using bulky command-line parameters, you can also use a config file in your home directory (~/.mytop). If present, mytop will read it automatically. It is read before any of your command-line arguments are processed, so your command-line arguments will override directives in the config file.

Here is a sample config file ~/.mytop which implements the defaults described above.
  user=root
  pass= xxxx
  host=localhost
  db=mysar
  delay=5
  port=3306
  socket=
  batchmode=0
  header=1
  color=1
  idle=1
Using a config file will help to ensure that your database password isn't visible to users on the command-line. Just make sure that the permissions on ~/.mytop are such that others cannot read it., now go to console and type command: # mytop and you should see something like ...

Read more
0

Find and Remove "orphaned" packages from your OpenSuSe system

The rpm packaging system is a very good tool (compared to tar.gz), but when you want to install a software foo, you often have to install some libraries too (libfoo1, libfoo2 ). Now when you remove the foo package, librairies are often forgotten, and the disk space is decreasing ...

Another case : when you upgrade your linux box, you will also see forgotten packages (check with rpm -qa --last command !)

rpmorphan finds "orphaned" packages on your system. It determines which packages have no other packages depending on their installation, and shows you a list of these packages. It intends to be clone of deborphan debian tools for rpm packages.

It will try to help you to remove unused packages, for exemple :
    * after a distribution upgrade
    * when you want to suppress packages after some tests

several tools are also provided :
    * rpmusage : display rpm packages last use date
    * rpmdep : display the full dependency of an installed rpm package
    * rpmduplicates : find programs with several version installed


Installation: use "1-click" installer to install the package
OpenSuSe 11.1 - here
OpenSuSe 11.0 - here

After successful installation, for a quick start, try the following command: # rpmorphan --gui --all 

Read more
Related Posts with Thumbnails