My Blog List

Sunday, September 5, 2010

NIS Server

############# To configure NIS Domain. #############

TO NFS Configuretion
1)To configure NFS>
#vim /etc/exports
/home *(rw,sync)

2)To restart the service.
#service portmap restart
#service nfs restart

3)To check the export directory.
#exportfs -rav

1)to configure Hostname & nisdomainname.
#vim /etc/sysconfig/network
HOSTNAME=station1.example.com
NISDOMAINNAME=example.com

HOSTNAME station1.example.com
NISDOMAINNAME example.com

2)To restart the service.
#service network restart

3)TO configure the yp.conf file.
#vim /etc/yp.conf
domain NISDOMAIN server HOSTNAME
domain example.com server server2.example.com

3)To configure the NIS server.
  # cd /var/yp/
  #/usr/lib/yp/ypinit -m
  ctrl+d
  (yes)

4)Restart the services.
#service portmap restart
#service nfs restart
#service ypserv restart
#service yppasswdd restart

5)Create user & update the NIS database file
#useradd vikas
#passwd vikas
#cd /var/yp/
#make


*To Client side configuration.

Install ypbind package.

1)To configure the nis server on client.
#authconfig-tui
enable[*] Use NIS
Domain: example.com
Server: station1.example.com
OK

2)Restart the service.
#service ypbind restart

3)To check.
#ypwhich

4)Mount the partion.
#mount (server ip):/(Servers home partition) /home
#mount 10.0.0.1:/home /home

5)To login by server user From client side.

############### END ################
By Laxman D. Kadam
Ph. No. 9967413230
email:-vikasjk3@gmail.com

Samba Server Configuretion

################# SAMBA ######################

*To configure samba server.

To Server side configuretion.

1)To install package.
#rpm -ivh xinetd* --force --aid
#rpm -ivh samba* --force --aid

2)configure the samba.(conf. file)
#vim /etc/samba/smb.conf

[global]

 workgroup = mac
 server string = Samba Server

[vikas]
      comment = lax friend`s stuf
      path = /karan
      valid users = l1 l2
      public = yes
      writable = yes
      printable = no
      create mask = 0765

3)To create the directory.
# mkdir /karan

4)To give full the permition.
#chmod 777 /karan/

5)To create the user.
#useradd l1
#useradd l2

6)To create the password.
#smbpasswd -a l1
#smbpasswd -a l2

7)To restart the service.
#service smb restart

8)To check.
#testparm

To client side configuretion.

1)To check connectivity.
#ping (IP)

2)To check by ftp method.
#smbclient //(ip)/(Share folder name) -U (user)

############### END ################
By Laxman D. Kadam
Ph. No. 9967413230
email:-vikasjk3@gmail.com

FTP Server Configuretion

################## FTP SERVER ######################

1)To install the package.
#rpm -ivh vsftpd-2.0.5-10.el5.i386.rpm

2)To configure the configuretion file.
#vim /etc/vsftpd /vsftpd.comf

anonymous_enable=YES   --- For defoult user.

local_enable=YES   --- For local user

anon_mkdir_write_enable=YES  --- for write permition

ftpd_banner=Welcome to avera FTP service.  --- For banner.

chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list  --- to creat the above file for blocking the user into his home directory.

3)To create the file under this path.(for blocking)
#vim /etc/vsftpd/chroot_list
u1
u2


4)To block the user for login.
# vim /etc/vsftpd/ftpusers

# Users that are not allowed to login via ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
u1


5)To restart the service.
#service vsftpd restart
#/etc/init.d/vsftpd restart

6)To create users
#useradd u1
#useradd u2
#passwd u1
#passwd u2

7)Login by the users.
#ftp 10.0.0.36  ----(ftp server ip)
name ftp   --- defoult user
name u1    --- other users

############### END ################
By Laxman D. Kadam
Ph. No. 9967413230
email:-vikasjk3@gmail.com

Basic Networking Configuretion

################## BASIC NETWORKING ####################

1)what is FQDN?
# Fully Qualified Domain Name.
ex. NAME + DOMAINNAME = FQDN
    server1 + example.com = server1.example.com

2)assigne hostname
#hostname
#hostname server1.example.com

3)Assigning Hostname - Permanent
#vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server1.example.com

4)Assigning IP address - Temporary
#ifconfig eth0 netmask
#ifconfig eth0 10.0.0.1 netmask 255.0.0.0

5)Assigning IP address - Permanent
#netconfig
#service network restart

OR

(graphically)

#neat
#system-config-network

6)Assigning Virtual IP address
#netconfig --device :
#netconfig --device eth0:1
#service network restart

7)To check whether NIC is detected
#ethtool
#ethtool eth0/eth1/eth2....

8)Enabling Network Interface
#ifup eth1

9)Disabling Network Interface
#ifdown eth1

10)IP address locations.
#cd /etc/sysconfig/network-scripts
#vi ifcfg-eth0

virtual IP address
#vi ifcfg-eth0:1

For Primary DNS
#vim /etc/resolv.conf
nameserver 10.0.0.1

############### END ################


By Laxman D. Kadam
Ph. No. 9967413230
email:-vikasjk3@gmail.com

DHCP Server Configuretion

############# To server side configuration. ##############

1)To install the package.
#yum install dhcpd*

2)To configure the dhcp server.
#vim /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

# --- default gateway
        option routers                  192.168.0.253;
        option subnet-mask              255.255.255.0;

        option nis-domain               "domain.org";
        option domain-name              "yahoo.com";
        option domain-name-servers      192.168.1.254;

        option time-offset              -18000; # Eastern Standard Time
#       option ntp-servers              192.168.1.1;
#       option netbios-name-servers     192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#       option netbios-node-type 2;

        range dynamic-bootp 192.168.0.1 192.168.0.24;
        default-lease-time 21600;
        max-lease-time 43200;

        # we want the nameserver to appear at a fixed address
        host server1 {
                next-server server2.yahoo.com;
                hardware ethernet 00:1D:60:65:4F:1F;
                fixed-address 192.168.0.1;
        }
}


3)To start the service
#service dhcpd start


4)To start the service
#service dhcpd restart



*TO CLIENT SIDE CONFIGURETION.


Install package dhclient.
#yum install dhclient.

#netconfig OR dhclient
Check the box `use dynamic ip configuration`

Restart the service.
#service network restart.

############### END ################
By Laxman D. Kadam
Ph. No. 9967413230
email:-vikasjk3@gmail.com

Apachi Web Server Configuretion

############## To configure apache server. ###############

1)To configuration file

#vim /etc/httpd/conf/httpd.conf

normal configuration:-
line no.264:-ServerName www.example.com:80
line no.280:-DocumentRoot "/var/www/html"
line no.305:-
line no.390:-DirectoryIndex index.html index.html.var

2)vertual web hosting.

line no.971:-
NameVirtualHost *:80 - uncomment the line.

---------------------------------------------------------------

############## name base #####################

    ServerAdmin root@server1.example.com
    DocumentRoot /var/www/html/yahoo
    ServerName www.yahoo.com
    Directoryindex yahoo.html
    ErrorLog logs/www.yahoo.com-error_log
    CustomLog logs/www.yahoo.com-access_log common


################ ip based #############################

    ServerAdmin root@server1.example.com
    DocumentRoot /var/www/html/rediff
    ServerName www.rediff.com
    Directoryindex rediff.html
    ErrorLog logs/www.rediff.com-error_log
    CustomLog logs/www.rediff.com-access_log common


############### port base ###############################

LISTEN 3000


    ServerAdmin root@server1.example.com
    DocumentRoot /var/www/html/india
    ServerName www.india.com
    Directoryindex india.html
    ErrorLog logs/www.india.com-error_log
    CustomLog logs/www.india.com-access_log common

-------------------------------------------------------------

3)To create the directory under this path

#cd /var/www/html
mkdir yahoo
mkdir rediff
mkdir india

4)To create html file under this path.

#vim /var/www/html/index.html
#vim /var/www/html/yahoo/yahoo.html
#vim /var/www/html/rediff/rediff.html
#vim /var/www/html/india/india.html

5)To configure the flat dns.

vim /etc/hosts
11.0.0.1        www.example.com
11.0.0.1        www.yahoo.com
11.0.0.4        www.rediff.com
11.0.0.5        www.india.com

6)To check.(by using firefox or elinks by text mode)

www.example.com
www.yahoo.com
www.rediff.com
http://www.india.com:3000/


############### END ################
By Laxman D. Kadam
Ph. No. 9967413230
email:-vikasjk3@gmail.com