SShell script wrappers can make the *nix command more transparent to the user. The most common shell scripts are simple wrappers around the third party or system binaries. A wrapper is nothing but a shell script or a shell function or an alias that includes a system command or utility.
Red Hat Enterprise Linux v5.4 has been released and available via RHN for immediate update. The new version includes the kernel-based virtual machine (KVM) virtualization, next generation of developer features and tools including GCC 4.4, a new malloc(). Also included clustered, high-availability filesystem to support Microsoft Windows storage needs on Red Hat Enterprise Linux.
Yesterday, I wrote about a serious Linux kernel bug and fix. However, few readers like to know about patching running Linux kernel. Patching production kernel is a risky business. Following procedure will help you to fix the problem.
Step # 1: Make sure your product is affected
First find out if your product is affected by reported exploit. For example, vmsplice() but only affects RHEL 5.x but RHEL 4.x,3.x, and 2.1.x are not affected at all. You can always obtain this information by visiting vendors bug reporting system called bugzilla. Also make sure bug affects your architectures. For example, a bug may only affect 64 bit or 32 bit platform.
Step # 2: Apply patch
You better apply and test patch in a test environment. Please note that some vendors such as Redhat and Suse modifies or backports kernel. So it is good idea to apply patch to their kernel source code tree. Otherwise you can always grab and apply patch to latest kernel version.
Step # 3: How do I apply kernel patch?
Change directory to your kernel source code:
# cd linux-2.6.xx.yy
Download and save patch file as fix.vmsplice.exploit.patch:
# cat fix.vmsplice.exploit.patch
--- a/fs/splice.c +++ b/fs/splice.c @@ -1234,7 +1234,7 @@ static int get_iovec_page_array(const struct iovec __user *iov, if (unlikely(!len)) break; error = -EFAULT; - if (unlikely(!base)) + if (!access_ok(VERIFY_READ, base, len)) break; /*
I hope this quick and dirty guide will save someones time. On a related note Erek has unofficial patched RPMs for CentOS / RHEL distros.
Recently I’ve noticed that Redhat removed support for following php pear packages:
a) NET/SMTP : An implementation of the SMTP protocol
b) Mail : Class that provides multiple interfaces for sending emails
c) Net/Socke : Network Socket Interface
The simplest solution is downloading and installs these files from php pear repo.
Step # 1: Download files
Use wget command to download all files:
# cd /tmp
# wget http://download.pear.php.net/package/Mail-1.1.14.tgz
# wget http://download.pear.php.net/package/Net_SMTP-1.2.10.tgz
Untar all files:
# tar -zxvf Mail-1.1.14.tgz
# tar -zxvf Net_SMTP-1.2.10.tgz
# tar -zxvf Net_Socket-1.0.8.tgz
Step # 2: Install files
Simply copy file to your webroot such as /www/usr/share/pear or standard location such as /usr/share/pear:
# cd /usr/share/pear
# mkdir Net
# cd Net
# cp /tmp/Net_SMTP-1.2.10/SMTP.php .
# cp /tmp/Net_Socket-1.0.8/Socket.php .
# cd ..
# cp -avr /tmp/Mail-1.1.14/Mail/ .
# cp -avr /tmp/Mail-1.1.14/Mail.php .
Step # 3: Test SMTP email
Now you have required files, all you have to do is send email using authenticated smtp server.
Build 56528 is a release build of VMware Server 1.0.4. It is a maintenance bug fix release to address security issues. Upgrading VMWare server is a piece of cake under Redhat Enterprise Linux / CentOS Linux version 5.0.
Please note that following instructions are tested on RHEL 4.5, 5.0 and CentOS Linux 5.0 only. You can use tar ball based package to upgrade vmware under Debian Linux.
Find out current VMware server version
First find out current vmware server version, enter:
# vmware -v
VMware Server 1.0.3 build-44356
You can download the latest version from official site.
Shutdown all VMWARE guest oses / vps
Login to each running VM and bring down (halt) guest operating system. You can also use vmware server console or web based interface for the same purpose.
Stop VMWARE Server:
# /etc/init.d/vmware stop
Stopping VMware services: Virtual machine monitor [ OK ] Bridged networking on /dev/vmnet0 [ OK ] Virtual ethernet [ OK ]
Stop VMWARE Webbased interface:
# /etc/init.d/httpd.vmware stop
Shutting down http.vmware: [ OK ]
Download VMWARE Server
Use wget the ultimate command line downloader
# cd /tmp
# wget http://download3.vmware.com/software/vmserver/VMware-server-1.0.4-56528.i386.rpm
# wget http://download3.vmware.com/software/vmserver/VMware-mui-1.0.4-56528.tar.gz
Upgrade VMWARE server
Use rpm command to upgrade VMWARE server, enter:
# rpm -Uvh VMware-server-1.0.4-56528.i386.rpm
Preparing... ########################################### [100%] 1:VMware-server ########################################### [100%]
Reconfigure VMWARE Server
Just reconfigure Vmware server with old values/options:
Just accept accept the End User License Agreement and press CTRL+C. Now configure server with old values:
# vmware-config.pl -d
aking sure services for VMware Server are stopped. Stopping VMware services: Virtual machine monitor [ OK ] Bridged networking on /dev/vmnet0 [ OK ] Virtual ethernet [ OK ] Configuring fallback GTK+ 2.4 libraries. In which directory do you want to install the mime type icons? [/usr/share/icons] What directory contains your desktop menu entry files? These files have a .desktop file extension. [/usr/share/applications] In which directory do you want to install the application's icon? [/usr/share/pixmaps] Trying to find a suitable vmmon module for your running kernel. ........... ... ..... *** Output truncated ***
Upgrade VMware Server Web-based management interface
The VMware Server Web-based management interface. Install on your VMware Server system to enable control from a Web browser. Untar and install the same:
# tar -zxvf VMware-mui-1.0.4-56528.tar.gz
# cd vmware-mui-distrib/
# perl vmware-install.pl
Just follow on screen instructions to install Web-based management interface. Finally just start all guest oses.
New Linux user often get this error. Let us say you haved downloaded the RPM file from net and saved to /tmp, you may get error – no no such file or directory – when the file is really downloaded and ls command can show the same.
Answer is pretty simple rpm command needs the full path to RPM command. Use pwd command to get full path and type the following commands:
Now install the rpm file:
rpm -ivh myrpm.rpm
or use full path:
rpm -ivh /tmp/myrpm.rpm
Running query on uninstalled rpm package
However if you run query on uninstalled package you will get an error:
# rpm -qi /tmp/bandwidth-0.12-1.el5.rf.x86_64.rpm
package bandwidth-0.12-1.el5.rf.x86_64.rpm is not installed
To query an uninstalled package pass -p option to rpm command.
# rpm -qip /tmp/bandwidth-0.12-1.el5.rf.x86_64.rpm
Name : bandwidth Relocations: (not relocatable) Version : 0.12 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ Release : 1.el5.rf Build Date: Sat 28 Jul 2007 03:27:28 PM CDT Install Date: (not installed) Build Host: lisse.leuven.wieers.com Group : Applications/Internet Source RPM: bandwidth-0.12-1.el5.rf.src.rpm Size : 30905 License: GPL Signature : DSA/SHA1, Sat 28 Jul 2007 03:31:11 PM CDT, Key ID a20e52146b8d79e6 Packager : Dag Wieers
URL : http://home.comcast.net/~fbui/bandwidth.html Summary : Artificial benchmark for measuring memory bandwidth Description : bandwidth is an artificial benchmark for measuring memory bandwidth, useful for identifying a computer's weak areas.
CentOS / Fedora Core / RHEL 5 uses yum for software management. Yum allows you to add a new repository as a source to install binary software.
Understanding yum repository
yum repository configured using /etc/yum.conf file. Additional configuration files are also read from the directories set by the reposdir option (default is /etc/yum.repos.d and /etc/yum/repos.d.
Usually repository carries extra and useful packages. RPMforge is one of such repository. You can easily configure RPMforge repository for RHEL5 just by running following single RPM command:
# rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
For 64 bit RHEL 5 Linux, enter:
# rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Now you can install software from RPMforge.
How do I install 3rd party repository manually?
Let us say you would like to install 3rd party repository from foo.nixcraft.com. Create a file called foo:
# cd /etc/yum.repos.d
# vi foo
Append following code:
name=Foo for RHEL/ CentOS $releasever - $basearch
Save and close the file.
- [foo] : Repository name i.e. The [main] section must exist for yum to do anything.
- name=Foo for RHEL/ CentOS $releasever – $basearch : A human readable string describing the repository name
- baseurl=http://foo.nixcraft.com/centos/$releasever/$basearch/ : Must be a URL to the directory where the yum repositoryâ€™s â€˜repodataâ€™ directory lives
- enabled=1 : Enabled or disabled repo. To disable the repository temporarily, set the enabled to 0
- gpgcheck=1 : Security feature, use GPG key
- gpgkey=http://foo.nixcraft.com/RPM-GPG-KEY.txt : GPL file location
Also you need to import the gpg key for the repository as follows:
# rpm --import http://foo.nixcraft.com/RPM-GPG-KEY.txt
Now you are ready to install software from foo repository. For further information refer to yum.conf man page:
$ man yum.conf
$ man yum
Hope this tip will help you to configure repository as and when required.
In this tutorial yo0u will learn about Installing SSL Certificate (Secure Server Certificate) to secure communication between Postfix SMTP server and mail client such as Outlook or Thunderbird.
Here is one of the most frequently asked questions from my mailbag:
Hey I need to know how much ram memory I have in my Ubuntu Linux computer. Under Windows XP I can find out memory by visiting Start > Control Panels > System in control panel. So how do I find out RAM information under Linux PC?
Almost all new Linux wanna be guru (read as users who want to switch to Linux) asks a question:
I want to switch to Linux completely from Windows XP SP2. Which Linux version will be best – Redhat, SuSE, or other? I use my PC for:
Watching DVD / MP3
Iâ€™m also willing to spend a small amount of money if required to purchase Linux version.
Short answer is none. I canâ€™t suggest *distro* name.
Linux is all about choice and freedom. There are different Linux distribution exists with different goals. It is good idea to define your goals and select Linux distribution as per your requirements.
I like Redhat and Debian for server as they are rock solid stable and comes with good binary packaging system. Some will swear up by Knoppix Live CD.
Some people like Suse and other recommends Ubuntu. There are others who like to compile everything from scratch (Gentoo).
- Consider following factors while selecting Linux:
- Your Linux skill level
- Linux as server / network admin workstation
- Running Linux on a new Hardware / Laptop
- Running Linux on an older machine (486/PI/PII/Celeron)
- Multilingual support (Hindi / Japanese language user interface)
- Running Linux on Office PC for email and office work
- Community support
- Commercial support
- More on Linux distribution
- Comparison of Linux distributions
- Choosing a desktop Linux distro (another good article)
- Linux Distribution Chooser
Surely, there are dozens of other reasons to select specific distro, so please do share your views and suggestions 😀