Feb 27, 2011

NFS Server Configuration in AIX

 
NFS Server Configuration in AIX
Release:
AIX 5.3

Problem:
Need to configure the NFS server in AIX 5.3

Solution:

Server Side Configuration:

         First check the nfs  server and client filesets are installed or not

# lslpp –L | grep bos.net*
bos.net.nfs.client          5.3.9.1    A     F    Network File System Client
bos.net.nfs.server         5.3.8.0    C     F    Network File System Server

         Create a NFS export directory using the mknfsexp command. It will automatically create the exported directory entry in /etc/exports file.

#  mknfsexp -d /tmp/test2 -t rw

Note: In this example, the mknfsexp command exports the /tmp/test2 directory with read-write permission.

         Check the /etc/exports file to confirm /tmp/test2 directory is exported or not.

# cat /etc/exports
/tmp/test2 -rw

Note: The purpose of the /etc/exports file is, the server automatically exports the listed directories each time the NFS daemon is started.

         List all the exported directory in the server by using the below command

# showmount –e
export list for Server:
/tmp/test2  (everyone)

         Start the NFS and portmap daemon

# startsrc –g nfs
# startsrc –s 


Client Side Configuration:

         Start the NFS and portmap daemon

# startsrc –g nfs
# startsrc –s portmap

         Mount the exported directory using the below command.

# mount server:/tmp/test2 /mnt

Feb 13, 2011

Add SSH Service to Xinetd in RHEL


Add SSH Service to Xinetd in RHEL


Release:
RedHat Enterprise Linux

Problem:
Add the ssh service to xinted in RedHat Enterprise Linux Server.

Solution:

1)      First need to check the services file, for weather ssh is defined on port 22  or not.

                        # grep ssh /etc/services
                 
            ssh   22/tcp            # SSH Remote Login Protocol
            ssh   22/udp            # SSH Remote Login Protocol

Note: If not defined means add the above entries in the services file.

2)      Create a file ssh inside /etc/xinetd.d directory for add ssh service into xinetd service.

                        # cd /etc/xinetd.d
            # vi ssh
           
            service ssh
            {
                    socket_type            = stream
                    protocol               = tcp
                    wait                   = no
                    port                   = 22
                    user                   = root
                    server                 = /usr/sbin/sshd
                    server_args            = -i
                    disable                = no
            }
                       
Note: Here “Server” indicates, where your openssh installed location.

3)      Now restart the xinetd service

                        # service xinetd restart

4)      Now check with netstat command, weather port number is listening or not

                        # netstat -an | grep 22
           
            tcp        0      0 :::22        :::*      LISTEN

Note: Using this we can add any service (like ftp) to the internet service daemon (inetd).