Posts

Showing posts from 2010

How To Configure Apache Web Server

Apache is the most widely used web server in the world and one of the most reliable one.
To install the Apache first of all you should have the yum configured so that you can install all the packages have dependencies with it.
Than use the following command to install the Apache
#yum install httpd*        //it will install the Apache and its related packages

Than go to the main directory of the Apache Web server and create a index.html file there so that server can read this file and can show it as our first page
#vi /var/www/html/index.html

Write any information in this file which you want to show by going to insert mode and than saving it.

Now open the main configuration file of the Apache so that we can make entry in that file about the changes which we want to take effect.
#vi /etc/httpd/conf/httpd.conf

Go to the following line and do the entry of your ip from which you want to run the web server
 972 NameVirtualHost 172.168.0.26:80

972 is the line no, uncomment it by removing the…

Important Port No's in Linux and similar OS

these are the port nos which are generally asked when you face an interview or a system administrator should know them, The respective service run on these port no's

15-Netstat
21-FTP
22-SSH
23-Telnet
25-SMTP
42-Whois service
53-DNS
68-DHCP
80-HTTP
88-Kerbores
101-POP3
109-POP2
143-IMAP4
220-IMAP3
443-HTTPS
2049-NFS

Insert Key in RPM Packages

There are case in Linux that when you install the rpm on your system the error comes that it is unable to find the required key in that case use the following commands to run your rpm so that it does not give the error again...

rpm --import /etc/pki/rpm-gpg/*
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-auxiliary
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release



This will import the keys in your system and packages will run.
It will also work when your YUM Server would also require the keys for installation.

Configuring YUM Server

YUM Server is used to install the RPM in your system in such a way that it resolve the dependencies it self.
A YUM Server can be configured in local system by storing the packages in your system it self or by accessing the though the remote location by the help of ftp.
these are the following steps while configuring it..

Go to the yum directory in
#cd /etc/yum.repos.d/

Copy the main configuration file in other file so that we can use the original file in case of any mistake. The name of the new file which i have put here is server.repo, you can put it anything you like
#cp rhel-debuginfo.repo server.repo

Go to the server.repo file so that we can edit the contant
#vi server.repo

In the file make the changes similar to these one according to your requirment.
[server.repo] //name of the file which you have put
name=Red Hat Enterprise Linux server //name of the server you want
baseurl=file:///home/Server //address where your rpm is stored
enabled=1 //enable it to 1 from 0
gpgcheck=1 //do …

Configure Host name of System without DNS

If you want to configure the host name of your system so that you can ping it by its host name as well as other systems than follow the following steps..

First of all keep note down your ip as it would be required, use this command
#ifconfig

Go to the main hosts configuration file and add your and other systems host name and ip which you want to ping
#vi /etc/hosts

In the file do these type of similar changes
# Do not remove the following line, or various programs     //default
# that require network functionality will fail.                         //default
127.0.0.1               localhost.localdomain localhost                //default
#::1            localhost6.localdomain6 localhost6                      //default
172.24.0.26     system26.example.com                                  //your hostname & ip
172.24.0.27     system27.example.com                                  //other system hostname & ip which you want ping

Save this file by pressing esc than :wq!

Now go to th…