Script to Print Disk Usage as per Used/Free ...

Here is the Magic....Just copy & paste @ command Prompt :-
===================================================

clear;echo "=========================================";echo "Disk Usage As per Partition MAX/MIN Size";echo "=========================================";df -Ph | awk -F" " '{print $6 "  " $2}'|grep -v shm|sed '1d'| sed -e :a -e '$b;N;s/\n/,/;ba' | sed 's/^/(/' | sed 's/$/)/';echo;df -Ph | awk -F" " '{print $6 "  " $3}'|grep -v shm|sed '1d'| sed -e :a -e '$b;N;s/\n/,/;ba' | sed 's/^/(/' | sed 's/$/)/';echo;echo;

hacking-rpms-with-rpmrebuild

rpmrebuild is good tool to perform reverse engineer the files installed on an older Fedora system back into its original RPM package. Rpmrebuild is able to reconstruct an RPM by looking up the information about it on the RPM database that is part of every RPM-based distribution like Fedora. But rpmrebuild doesn’t stop there; you can also modify actual RPM packages without needing access to its SRPMS or even knowing much about SPEC files. Although this may not be recommended when dealing with core/base Linux system RPMS, it is incredibly useful for developers, release engineers, and system administrators who needs to create internal RPMs for their organizations.
For example, it is common practice for release engineers to have a “back out strategy” in case a release does not meet requirements during installation. With rpmrebuild, the version and release numbers of an RPM that may be replaced by a new one can be tweaked so that in case there is a failure and the ”back out” RPM is needed, the release engineers can simply install the back out RPMs over the new RPMs. Then the back out RPMs will have higher version and/or release numbers on them, so a tool like up2date or yum can automatically pick up on the changes.
Rpmrebuild is currently available for Fedora 10 and 11. To install:
yum install rpmrebuild
To rebuild an installed package in your system into an RPM:
rpmrebuild packagename
While rebuilding a package, rpmrebuild will let you know if files have been modified from their original state. If they have, it will give you the option to continue or halt the rebuilding of the package, and it will ask you if you want to change the release number of the package.
Example:
[root@dhcp227-94 SOURCES]# rpmrebuild httpd
Processing files: httpd-2.2.3-7.el5
Wrote: /usr/src/redhat/RPMS/i386/httpd-2.2.3-7.el5.i386.rpm
result: /usr/src/redhat/RPMS/i386/httpd-2.2.3-7.el5.i386.rpm
My favorite feature of rpmrebuild is the ability to modify its spec file on the fly. By that I mean that you can actually edit the spec of an existing RPM without having to rebuild from source. Why is this useful? Well, you can modify RPM package requirements, change logs, descriptions, and other fields on the spec without having to go through the entire build process again. It can save you a lot of time if you are in the business of building RPMs and don’t necessarily use auto-builders like koji or buildbot.
Here how’s it done:
rpmrebuild -e -p –no-test-install package.rpm
  • -e tells rpmrebuild you want to edit the whole spec file
  • -p is used because we are editing an actual RPM file
  • –notest-install stops rpmrebuild from auto-testing your RPM, just in case you are building an RPM on a workstation that does not have all required RPMs for that package
Rpmrebuild also offers certain shortcuts and plugins. Below I will change the release number of an RPM file without having to open up its spec file. This is a great for automating release numbering processes.
[root@dhcp227-94 i386]# rpmrebuild --release=99 -p --notest-install httpd-2.2.3-7.el5.i386.rpm
Processing files: httpd-2.2.3-99
Wrote: /usr/src/redhat/RPMS/i386/httpd-2.2.3-99.i386.rpm
result: /usr/src/redhat/RPMS/i386/httpd-2.2.3-99.i386.rpm
Notice that the httpd package went from release #7 to #99.
Not as recommended, but useful for your organization’s internal applications, you can modify the version number of an RPM as well:
rpmrebuild --change-spec-preamble='sed -e "s/^Version:.*/Version:1\.3\.1\.0\.1/"' --release=99 -p –notest-install  some-package-1.3.1-11.noarch.rpm
This command will rebuild your RPM and produce some-package-1.3.1.0.1-99.noarch.rpm.
Some other things to keep in mind about rpmrebuild are:
1.Once an RPM is rebuilt, it will lose its original signature (if signed).
2.You need to be root to rebuild a package only if there are root-protected files in that package.
3.Rpmrebuild will respect your RPM “home” building location, so if you have .rpmmacros set up in your home dir, your rebuilt RPMs will show up there.
The authors of rpmrebuild, Eric Gerbier and Valery Reznic, point out that even though the newer versions of RPM have a repackage option, they still require the user to uninstall that package from their system, which sometimes is not necessarily easy because of the dependencies on that package.
If you want to rebuild an old RPM that is not easily available on the Internet anymore, or if you need to tweak packages for your organization’s internal releases, or even if all you want to do is study and learn a bit more about RPM packaging, rpmrebuild is a great tool to have.

creating-vpns-with-ipsec-and-ssltls

VPN (Virtual Private Network) is a technology that provides secure communication through an insecure and untrusted network (like the Internet). Usually, it achieves this by authentication, encryption, compression and tunneling. Tunneling is a technique that encapsulates the packet header and data of one protocol inside the payload field of another protocol. This way, an encapsulated packet can traverse through networks it otherwise would not be capable of traversing. Currently, the two most common techniques for creating VPNs are IPsec and SSL/TLS. In this article, I describe the features and characteristics of these two techniques and present two short examples of how to create IPsec and SSL/TLS tunnels in Linux and verify that the tunnels started correctly. I also provide a short comparison of these two techniques.

IPsec and Openswan

IPsec (IP security) provides encryption, authentication and compressionat the network level. IPsec is actually a suite of protocols, developed by the IETF (Internet Engineering Task Force), which have existed for a long time. The first IPsec protocols were defined in 1995 (RFCs 1825–1829). Later, in 1998, these RFCs were depreciated by RFCs 2401–2412. IPsec implementation in the 2.6 Linux kernel was written by Dave Miller and Alexey Kuznetsov. It handles both IPv4 and IPv6. IPsec operates at layer 3, the network layer, in the OSI seven-layer networking model. IPsec is mandatory in IPv6 and optional in IPv4. To implement IPsec, two new protocols were added: Authentication Header (AH) and Encapsulating Security Payload (ESP). Handshaking and exchanging session keys are done with the Internet Key Exchange (IKE) protocol. The AH protocol (RFC 2404) has protocol number 51, and it authenticates both the header and payload. The AH protocol does not use encryption, so it is almost never used.

ESP has protocol number 50. It enables us to add a security policy to the packet and encrypt it, though encryption is not mandatory. Encryption is done by the kernel, using the kernel CryptoAPI. When two machines are connected using the ESP protocol, a unique number identifies this connection; this number is called SPI (Security Parameter Index). Each packet that flows between these machines has a Sequence Number (SN), starting with 0. This SN is increased by one for each sent packet. Each packet also has a checksum, which is called the ICV (integrity check value) of the packet. This checksum is calculated using a secret key, which is known only to these two machines. IPsec has two modes: transport mode and tunnel mode. When creating a VPN, we use tunnel mode. This means each IP packet is fully encapsulated in a newly created IPsec packet. The payload of this newly created IPsec packet is the original IP packet.

Figure – 1: Basic VPN Tunnel

Figure – 2: An IPSec ESP Tunnel Packet

Figure 2 shows that a new IP header was added at the right, as a result of working with a tunnel, and that an ESP header also was added. There is a problem when the endpoints (which are sometimes called peers) of the tunnel are behind a NAT (Network Address Translation) device. Using NAT is a method of connecting multiple machines that have an “internal address”, which are not accessible directly to the outside world. These machines access the outside world through a machine that does have an Internet address; the NAT is performed on this machine—usually a gateway. When the endpoints of the tunnel are behind a NAT, the NAT modifies the contents of the IP packet. As a result, this packet will be rejected by the peer because the signature is wrong. Thus, the IETF issued some RFCs that try to find a solution for this problem. This solution commonly is known as NAT-T or NAT Traversal. NAT-T works by encapsulating IPsec packets in UDP packets, so that these packets will be able to pass through NAT routers without being dropped. RFC 3948, UDP Encapsulation of IPsec ESP Packets, deals with NAT-T (see Resources).

Openswan is an open-source project that provides an implementation of user tools for Linux IPsec. You can create a VPN using Openswan tools (shown in the short example below). The Openswan Project was started in 2003 by former FreeS/WAN developers. FreeS/WAN is the predecessor of Openswan. S/WAN stands for Secure Wide Area Network, which is actually a trademark of RSA. Openswan runs on many different platforms, including x86, x86_64, ia64, MIPS and ARM. It supports kernels 2.0, 2.2, 2.4 and 2.6. Two IPsec kernel stacks are currently available: KLIPS and NETKEY. The Linux kernel NETKEY code is a rewrite from scratch of the KAME IPsec code. The KAME Project was a group effort of six companies in Japan to provide a free IPv6 and IPsec (for both IPv4 and IPv6) protocol stack implementation for variants of the BSD UNIX computer operating system. KLIPS is not a part of the Linux kernel. When using KLIPS, you must apply a patch to the kernel to support NAT-T. When using NETKEY, NAT-T support is already inside the kernel, and there is no need to patch the kernel. When you apply firewall (iptables) rules, KLIPS is the easier case, because with KLIPS, you can identify IPsec traffic, as this traffic goes through ipsecX interfaces. You apply iptables rules to these interfaces in the same way you apply rules to other network interfaces (such as eth0). When using NETKEY, applying firewall (iptables) rules is much more complex, as the traffic does not flow through ipsecX interfaces; one solution can be marking the packets in the Linux kernel with iptables (with a setmark iptables rule). This mark is a member of the kernel socket buffer structure (struct sk_buff, from the Linux kernel networking code); decryption of the packet does not modify that mark. Openswan supports Opportunistic Encryption (OE), which enables the creation of IPsec-based VPNs by advertising and fetching public keys from a DNS server.

OpenVPN

OpenVPN is an open-source project founded by James Yonan. It provides a VPN solution based on SSL/TLS. Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer (SSL), are cryptographic protocols that provide secure communications data transfer on the Internet. SSL has been in existence since the early ’90s. The OpenVPN networking model is based on TUN/TAP virtual devices; TUN/TAP is part of the Linux kernel. The first TUN driver in Linux was developed by Maxim Krasnyansky. OpenVPN installation and configuration is simpler in comparison with IPsec. OpenVPN supports RSA authentication, Diffie-Hellman key agreement, HMAC-SHA1 integrity checks and more. When running in server mode, it supports multiple clients (up tp 128) to connect to a VPN server over the same port. You can set up your own Certificate Authority (CA) and generate certificates and keys for an OpenVPN server and multiple clients. OpenVPN operates in user-space mode; this makes it easy to port OpenVPN to other operating systems.

Example: Setting Up a VPN Tunnel with IPsec and Openswan

First, download and install the ipsec-tools package and the Openswan package (most distros have these packages). The VPN tunnel has two participants on its ends, called left and right, and which participant is considered left or right is arbitrary. You have to configure various parameters for these two ends in /etc/ipsec.conf (see man 5 ipsec.conf). The /etc/ipsec.conf file is divided into sections. The conn section contains a connection specification, defining a network connection to be made using IPsec. An example of a conn section in /etc/ipsec.conf, which defines a tunnel between two nodes on the same LAN, with the left one as 192.168.0.89 and the right one as 192.168.0.92, is as follows:

conn linux-to-linux
#
# Simply use raw RSA keys
# After starting openswan, run:
# ipsec showhostkey --left (or --right)
# and fill in the connection similarly
# to the example below.
left=192.168.0.89
leftrsasigkey=0sAQPP...
# The remote user.
#
right=192.168.0.92
rightrsasigkey=0sAQON...
type=tunnel
auto=start

You can generate the leftrsasigkey and rightrsasigkey on both participants by running:

ipsec rsasigkey --verbose 2048 > rsa.key

Then, copy and paste the contents of rsa.key into /etc/ipsec.secrets. In some cases, IPsec clients are roaming clients (with a random IP address). This happens typically when the client is a laptop used from remote locations (such clients are called Roadwarriors). In this case, use the following in ipsec.conf:

right=%any

instead of:

right=ipAddress

The %any keyword is used to specify an unknown IP address. The type parameter of the connection in this example is tunnel (which is the default). Other types can be transport, signifying host-tohost transport mode; passthrough, signifying that no IPsec processing should be done at all; drop, signifying that packets should be discarded; and reject, signifying that packets should be discarded and a diagnostic ICMP should be returned. The auto parameter of the connection tells which operation should be done automatically at IPsec startup. For example, auto=start tells it to load and initiate the connection; whereas auto=ignore (which is the default) signifies no automatic startup operation. Other values for the auto parameter can be add, manual or route. After configuring /etc/ipsec.conf, start the service with:

service ipsec start

You can perform a series of checks to get info about IPsec on your machine by typing ipsec verify. And, output of ipsec verify might look like this:

Checking your system to see if IPsec has installed and started correctly:
Version check and ipsec on-path [OK]
Linux Openswan U2.4.7/K2.6.21-rc7 (netkey)
Checking for IPsec support in kernel [OK]
NETKEY detected, testing for disabled ICMP send_redirects [OK]
NETKEY detected, testing for disabled ICMP accept_redirects [OK]
Checking for RSA private key (/etc/ipsec.d/hostkey.secrets) [OK]
Checking that pluto is running [OK]
Checking for 'ip' command [OK]
Checking for 'iptables' command [OK]
Opportunistic Encryption Support [DISABLED]

You can get information about the tunnel you created by running:

ipsec auto –status

You also can view various low-level IPSec messages in the kernel syslog. You can test and verify that the packets flowing between the two participants are indeed esp frames by opening an FTP connection (for example), between the two participants and running:

tcpdump -f esp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes

You should see something like this:

IP 192.168.0.92 > 192.168.0.89: ESP(spi=0xd514eed9,seq=0x7)
IP 192.168.0.89 > 192.168.0.92: ESP(spi=0x3a1563b9,seq=0x6)
IP 192.168.0.89 > 192.168.0.92: ESP(spi=0x3a1563b9,seq=0x7)
IP 192.168.0.92 > 192.168.0.89: ESP(spi=0xd514eed9,seq=0x8)

Note that the spi (Security Parameter Index) header is the same for all packets; this is an identifier of the connection. If you need to support NAT traversal, add nat_traversal=yes in ipsec.conf; nat_traversal=no is the default. The Linux IPsec stack can work with pluto from Openswan, racoon from the KAME Project (which is included in ipsec-tools) or isakmpd from OpenBSD.

Example: Setting Up a VPN Tunnel with OpenVPN

First, download and install the OpenVPN package (most distros have this package). Then, create a shared key by doing the following:

openvpn --genkey --secret static.key

You can create this key on the server side or the client side, but you should copy this key to the other side in a secured channel (like SSH, for example). This key is exchanged between client and server when the tunnel is created. This type of shared key is the simplest key; you also can use CA-based keys. The CA can be on a different machine from the OpenVPN server. The OpenVPN HOWTO provides more details on this (see Resources). Then, create a server configuration file named server.conf:

dev tun
ifconfig 10.0.0.1 10.0.0.2
secret static.key
comp-lzo

On the client side, create the following configuration file named client.conf:

remote serverIpAddressOrHostName
dev tun
ifconfig 10.0.0.2 10.0.0.1
secret static.key
comp-lzo

Note that the order of IP addresses has changed in the client.conf configuration file. The comp-lzo directive enables compression on the VPN link. You can set the mtu of the tunnel by adding the tun-mtu directive. When using Ethernet bridging, you should use dev tap instead of dev tun. The default port for the tunnel is UDP port 1194 (you can verify this by typing netstat -nl | grep 1194 after starting the tunnel). Before you start the VPN, make sure that the TUN interface (or TAP interface, in case you use Ethernet bridging) is not firewalled. Start the vpn on the server by running openvpn server.conf and running openvpn client.conf on the client. You will get an output like this on the client:

OpenVPN 2.1_rc2 x86_64-redhat-linux-gnu [SSL] [LZO2] [EPOLL]
built on
Mar 3 2007
IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
LZO compression initialized
TUN/TAP device tun0 opened
/sbin/ip link set dev tun0 up mtu 1500
/sbin/ip addr add dev tun0 local 10.0.0.2 peer 10.0.0.1
UDPv4 link local (bound): [undef]:1194
UDPv4 link remote: 192.168.0.89:1194
Peer Connection Initiated with 192.168.0.89:1194
Initialization Sequence Completed

You can verify that the tunnel is up by pinging the server from the client (ping 10.0.0.1 from the client). The TUN interface emulates a PPP (Point-to-Point) network device and the TAP emulates an Ethernet device. A user-space program can open a TUN device and can read or write to it. You can apply iptables rules to a TUN/TAP virtual device in the same way you would do it to an Ethernet device (such as eth0).

IPsec and OpenVPN—a Short Comparison

IPsec is considered the standard for VPN; many vendors (including Cisco, Nortel, Check Point and many more) manufacture devices with built-in IPsec functionalities, which enable them to connect
to other IPsec clients. However, we should be a bit cautious here: different manufacturers may implement IPsec in a noncompatible manner on their devices, which can pose a problem. OpenVPN is not supported currently by most vendors. IPsec is much more complex than OpenVPN and involves kernel code; this makes porting IPsec to other operating systems a much heavier task. It is much easier to port OpenVPN to other operating systems than IPsec, because OpenVPN runs entirely in user space and is not involved with kernel code. Both IPsec and OpenVPN use HMAC (Hash Message Authentication Code) to authenticate packets. OpenVPN is based on using the OpenSSL library; it can run over UDP (which is the default and preferred protocol) or TCP. As opposed to IPsec, which runs in kernel, it runs in user space, so it is heavier than IPsec in terms of performance. Configuring and applying firewall (iptables) rules in OpenVPN are usually easier than configuring such rules with Openswan in an IPsec-based tunnel.

Resources

OpenVPN: openvpn.net
OpenVPN 2.0 HOWTO: openvpn.net/howto.html
RFC 3948, UDP Encapsulation of IPsec ESP Packets: tools.ietf.org/html/rfc3948
Openswan: www.openswan.org
The KAME Project: www.kame.net

using-windows-ntfs-fat-partitions-from-linux-fedora-core

With some space available on your disk, when you go to install Linux, consider adding a small FAT16 or FAT32 partition (maybe 2GB) on your disk. Every x86 operating system (Linux, Windows 95, NT, 2000, XP, Vista and DOS) supports those types. With that added, you will be able to freely exchange files between your Linux and Windows system on the FAT16 partition. With FAT partitions, however, keep in mind that there are limitations. FAT is limited to between 2GB and 4GB file sizes. Also, FAT16 doesn't support long file names. Total partition size for FAT file systems is 32GB. After you have installed Linux in the space freed up by the previous procedure, you should be able to choose between Linux and Windows when the Fedora or RHEL boot screen appears during boot time. Press any key to go to the GRUB boot screen. Then move the arrow key to choose to boot Linux or Windows.

The first time you boot Windows, you might be asked to check your disk (because your Windows partition will be a different size than expected). After that, there should be no change in how you use your Windows system. Your disk space will just be smaller. Now, when you boot up Linux, if you have a lot of documents, digital images, music, or other content on your Windows partition, you probably want to be able to use that content from Linux. To do that, you need to:

• Determine which partition is your Windows partition.
• If you didn't do so during installation, add support for the file system type of your

Windows partition to Linux. Since VFAT is already built in, that means adding NTFS support if that is the file system type.
• Mount the Windows partition on your Linux file system.

The following procedure describes how to do those things.

1. Check partitions. To determine which partition contains your Windows file system, use
the fdisk command as follows:

# fdisk -l     
Disk /dev/sda: 60.0 GB, 60011642880 bytes  
16 heads, 63 sectors/track, 116280 cylinders  
Units = cylinders of 1008 * 512 = 516096 bytes      
Device Boot
Start
End
Blocks
Id
System
/dev/sda1       *
1
41725
21029053+
7
HPFS/NTFS
/dev/sda2
106741
116280
4808160
12
Compaq diagnostics
/dev/sda3
41725
41932
104422+
83
Linux
/dev/sda4
41932
106734
32660145
5
Extended
/dev/sda5
41932
106718
32652081
8e
Linux LVM
     
In this example, the Windows partition is on device /dev/sda1 and is an NTFS file system. (The other common type of Windows file system is VFAT.)
2. Get NTFS support. If you have a VFAT file system, you can skip this step. If you have an NTFS file system, and NTFS support is not already installed, you can install the necessary drivers and tools to be able to mount and use your NTFS file system in Linux by running the following yum command as root user from a Terminal window:

# yum install ntfsprogs ntfs-3g

Assuming you have an active connection to the Internet, this will install the NTFS support you need to access your NTFS partitions from Linux.
3. Mount Windows file system. You can access your Windows file system from Linux using the mount command. Assuming your Windows partition is an NTFS file system on /dev/sda1 (as in the example above), you could type the following to create the Windows mount point and mount the file system there:

# mkdir /mnt/win
# chmod 755 /mnt/win
# mount -oro -t ntfs /dev/sda1 /mnt/win
# chmod 755 /mnt/win
# ls /mnt/win

The -oro option to mount will mount the file system read-only. Read/write support is not considered to be stable (so if you remove the -oro option to mount read/write, you do so at your own risk). Replace the ntfs with vfat if your Windows partition is a VFAT file system. The ls command is just to find out if you can see the contents of your Windows partition. You can have the mount occur permanently by adding an entry to the /etc/fstab file. Here’s an example of the line you could add to /etc/fstab to have the partition mounted every time the system reboots:

/dev/sda1 /mnt/win ntfs ro 0 0

At this point, you can use the files from your Windows partition as you would any other files on your system. You can open a folder or change directories to the /mnt/win directory to see the contents. Then use any applications you choose to open your documents (OpenOffice.org), music (Rhythmbox), images (Gimp), or any other content type you want to use from your Windows partition in Linux.

NOTE: If your Linux system uses an ext2 or ext3 file system (as Fedora typically does), you can do the
reverse of what was just described as well: access your Linux partition from Windows. For information on how to do this, see the Ext2 Installable File System for Windows (http://www.fs-driver.org).

mod-bandwidth-for-apache-control-your-website-bandwidth

It is used to limit bandwidth utilization of your normal and virtual hosts.
Home Page: http://ivn.cl/files/source/mod_bw-0.8.tgz System /. OS : CentOS 5
You will need  httpd-devel should be installed.
cd ~
wget http://ivn.cl/files/source/mod_bw-0.8.tgz
tar xzf mod_bw-0.8.tgzcd mod_bw
apxs -i -a -c mod_bw.c
...
...

chmod 755 /usr/lib/httpd/modules/mod_bw.so

[activating module `bw' in /etc/httpd/conf/httpd.conf]
You should be able to see the LoadModule command in your httpd.conf . You can restart apache
at this time.
# grep bw /etc/httpd/conf/httpd.conf
LoadModule bw_module          /usr/lib/httpd/modules/mod_bw.so
service httpd restart
In Virtual Host section:-
We will restrict all downloads of files larger than 500kb, to a speed of 50kb/s. 
   
BandwidthModule On   
ForceBandWidthModule On    
# Unlimited Bandwidth for all (except for large files, see below):- 
BandWidth all 0   
# No one should be able to open more than 5 simultaneous connections at one time :-    
MaxConnection all 5   
# Limit files greater than 500kb to 50kb/s:-   
LargeFileLimit * 500 50000   
ServerAdmin webmaster@yourdomain.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it
This e-mail address is being protected from spambots. You need JavaScript enabled to view it 

DocumentRoot /var/www/vhosts/yourdomain.com/httpdocs   
ServerName yourdomain.com   
ServerAlias ftp.yourdomain.com www.yourdomain.com......

Restart Apache web service.

service httpd restart 

Vlc Package...

Download RPM from here :-
====================

RHEL-5
http://packages.sw.be/vlc/vlc-0.9.9a-7.el5.rf.i386.rpm
http://packages.sw.be/vlc/vlc-0.9.9a-7.el5.rf.x86_64.rpm
http://packages.sw.be/vlc/vlc-devel-0.9.9a-7.el5.rf.i386.rpm

http://packages.sw.be/vlc/vlc-devel-0.9.9a-7.el5.rf.x86_64.rpm

RHEL-6
http://packages.sw.be/vlc/vlc-1.1.5-2.el6.rf.i686.rpm
http://packages.sw.be/vlc/vlc-1.1.5-2.el6.rf.x86_64.rpm

http://packages.sw.be/vlc/vlc-devel-1.1.5-2.el6.rf.i686.rpm
http://packages.sw.be/vlc/vlc-devel-1.1.5-2.el6.rf.x86_64.rpm

Note:-
http://rpm.pbone.net/index.php3/stat/4/idpl/1113588/com/fribidi0-0.10.4-0.i586.rpm.html

How to setup Zabbix on Linux ?


Setup Zabbix with mysql support with in 5 minutes

Step 1

Install Apache and MSSQL server

#yum install mysql-server httpd
#service mysqld start
#service httpd start


Set Mysql root password
Default root password is null


Step 2
 

Install Zabbix server , web, agent packages through yum repository. 



#yum install zabbix-server-mysql  zabbix-web-mysql.noarch zabbix-agent

#cd /usr/share/doc/zabbix-server-mysql-x.x.x/

#mysql -uroot -psqlpassword
mysql > create database zabbix character set utf8;
mysql > quit;
#cd create/schema
#cat mysql.sql | mysql -uroot -psqlpassword  zabbix
#cd ../data
#cat data.sql | mysql -uroot -psqlpassword  zabbix
#cat images_mysql.sql | mysql -uroot -psqlpassword  zabbix

Edit the below mentioned files
Configure /etc/zabbix/zabbix_agent.conf
Configure /etc/zabbix/zabbix_agentd.conf
Configure /etc/zabbix/zabbix_server.conf


#service zabbix-server start
#service zabbix-agent start

Step 3

Go to web interface and  http://localhost/zabbix
And follow the instructions mentioned there
Zabbix frontend is ready! Default user name is Admin, password zabbix.


 For more info visit http://www.zabbix.com/documentation/1.8/manual/installation/installation_from_source
-------------------------------------------------------------------------------------

Reliance DataCard on Ubuntu

First of all create a file /etc/wvdial.conf
vi /etc/wvdial.conf

[Modem0]
Modem = /dev/ttyUSB0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
FlowControl = Hardware (CRTSCTS) [Dialer cdma]
Username = 
Password =
Phone = #777
Stupid Mode = 1
Inherits = Modem0
I had connected datacard before booting my system.
(I have enabled root login):
I executed following commands.
#lsusb
It listed many things along with my new reliance usb datacrd.
(
Bus 006 Device 019: ID 12d1:1411 Huawei Technologies Co., Ltd. )
then,
#wvdial cdma
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT 153600
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sat Dec 13 09:04:51 2008
--> Pid of pppd: 6410
--> Using interface ppp0
--> pppd: `?[13] `?[13] ??[13]
--> pppd: `?[13] `?[13] ??[13]
--> pppd: `?[13] `?[13] ??[13]
--> pppd: `?[13] `?[13] ??[13]
--> pppd: `?[13] `?[13] ??[13]
--> pppd: `?[13] `?[13] ??[13]
--> local IP address 220.226.118.181
--> pppd: `?[13] `?[13] ??[13]
--> remote IP address 220.224.135.79
--> pppd: `?[13] `?[13] ??[13]
--> primary DNS address 202.138.103.100
--> pppd: `?[13] `?[13] ??[13]
--> secondary DNS address 202.138.96.2
--> pppd: `?[13] `?[13] ??[13]
Now minimized the terminal and started firefox (work offline has to be disabled). It worked.
(For disconnecting I use ctrl+c in the terminal. can anyone suggest the correct method?)
.
.
If datacard inserted after booting of Ubuntu, command #lsusb didn’t show the datacard.
I executed
#modprobe usbserial
after sometime,
#lsusb 
it worked. (I am not sure ubuntu automatically deteced it or ‘modprobe’ command did it).
Then as usual
#wvdial cdma
You will get the similar output as shown above then minimize the screen and browse internet.

Managing the Oracle Instance

Starting the Instance
Shutting Down the Instance

Starting the Instance


You can use Enterprise Manager to start the instance and open the database by performing the following steps:
1.
Invoke Enterprise Manager from your browser. The Database page is displayed indicating that the instance is down. Click Startup to start the instance.
Move your mouse over this icon to see the image

2.
The Startup/Shutdown:Specify Host and Target Database Credentials page is displayed. Enter the host credentials and database credentials. Click OK.
Move your mouse over this icon to see the image

3.
The Startup/Shutdown:Confirmation page is displayed. Click Yes to start the instance and open the database.
Move your mouse over this icon to see the image

4.
The Startup/Shutdown:Activity page is displayed.
Move your mouse over this icon to see the image

5.
After the instance is started and the database is open, the Login page is displayed. Enter the username and password to log in to Enterprise Manager Database Control. Click Login.
Move your mouse over this icon to see the image

6.
The Database home page is displayed.
Move your mouse over this icon to see the image

Shutting Down the Instance

You can use Enterprise Manager to shut down the instance and close the database by performing the following steps:
1.
Log in to Enterprise Manager Database Console by opening your browser and specifying the SYS username and password.
Click Login.

2. Click Shutdown on the Database Home page.
Move your mouse over this icon to see the image

3. The Startup/Shutdown:Specify Host and Target Database Credentials page appears. Enter the host credentials and database credentials. Click OK.
Move your mouse over this icon to see the image

4. The Startup/Shutdown:Confirmation page appears. Click Yes to perform the shutdown operation.
Move your mouse over this icon to see the image

5. The Startup/Shutdown:Activity Information page appears. Click Refresh.
Move your mouse over this icon to see the image

6. You can now restart your instance or perform recovery.
Move your mouse over this icon to see the image

 

The initialization parameter file contains a list of configuration parameters for the instance and database. The Oracle database server reads these parameters at database startup and monitors them while the database is running. The values of the parameters are stored in memory and many can be changed dynamically.
Follow the steps below to view the values of the initialization parameters for your database:
1.
Click Administration on the Database Home page to access the Administration property page.
Move your mouse over this icon to see the image

2.
Click All Initialization Parameters in the Instance section.
Move your mouse over this icon to see the image

3.
The Initialization Parameters page appears.
Move your mouse over this icon to see the image

In this section you learn how to view the values of the memory parameters in your database. Memory parameters are the initialization parameters that determine the total size of the system global area (SGA) and its sub-components, and the program global area (PGA). The values of the memory parameters can affect the performance of your database.
If the Oracle server advises you of a performance problem relating to the size of the SGA or PGA, you can use the memory advisor to help you determine appropriate new settings. The memory advisor can model the effect of parameter changes. Refer to Chapter 10 for information on using the memory advisors.
Perform the steps listed below to view the values of the memory parameters:
1.
Click Administration on the Database Home page to access the Administration property page.
Move your mouse over this icon to see the image

2.
Click Memory Parameters in the Instance section.
Move your mouse over this icon to see the image

3.
The Memory Parameters page appears.
Move your mouse over this icon to see the image

Oracle 11g – Starting the Oracle Enterprise Manager Console

1. startup db
[oracle@isc ~]$ ORACLE_SID=isc; export ORACLE_SID
[oracle@isc ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 – Production on Sun Nov 9 22:52:26 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 1389391872 bytes
Fixed Size 1299848 bytes
Variable Size 838863480 bytes
Database Buffers 536870912 bytes
Redo Buffers 12357632 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
2. listener start
[oracle@isc ~]$ ORACLE_SID=isc; export ORACLE_SID
[oracle@isc ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.1.0.6.0 – Production on 09-NOV-2008 22:52:00
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 11.1.0.6.0 – Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/isc/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=isc.localdomain)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 – Production
Start Date 09-NOV-2008 22:52:03
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/isc/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=isc.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
3. Oracle Enterprise Manager start
[oracle@isc ~]$ ORACLE_SID=isc; export ORACLE_SID
[oracle@isc ~]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://isc.localdomain:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ………… started.
——————————————————————
Logs are generated in directory /u01/app/oracle/product/11.1.0/db_1/isc.localdomain_isc/sysman/log
4. Test
browser : https://isc.localdomain:1158/em/
isc.localdomain : 172.20.141.78
em01
em02