NIS + NFS + autofs

Source: Internet
Author: User

Install the NIS Service

Network Information Service is a network product that centrally controls several systems for database management.

  1. Related services: ypserv (NIS Server), ypbind (NIS client), and yppassword (when changing the password. Communication between the client and the server through this service)

  2. Port: Portmap: 111 because NIS and NFS depend on the Portmap service

  3. Related packages: ypserv (required for NIS servers) ypbind (required for NIS clients, installed by default), YP-tools (commonly used NIS tools, installed by default)

     

    NIS Server: 192.168.100.114 hostname: localhost

    NIS client: 192.168.100.115 hostname: linux211

     

    Server Installation

    [[Email protected] ~] # Yum install ypserv

    [[Email protected] ~] # Mkdir/opt/nishome

    Specify the NIS domain for the NIS Server

    [[Email protected] # Vim/etc/sysconfig/Network

    Hostname = localhost. localdomain
    Nisdomain = a.com

    View NIS Domains

    [[Email protected] # nisdomainname

    Add to NIS domain

    [[Email protected] # nisdomainname a.com

    Add to NIS domain at startup

    [[Email protected] # echo "/bin/nisdomainname a.com">/etc/rc. Local

    Start ypserv

    [[Email protected] # service ypserv start

    [[Email protected] #/usr/lib/yp/ypinit-M # generate an NIS database. After each user is added, the NIS database must be regenerated.

    [[Email protected] # cd/var/yp will have a directory named by the domain name to generate Hui

    Restart ypserv Service

     

    On the server side of NIS

    Share the NIS home directory using NFS

    [[Email protected] # vi/etc/exports
    /Opt/nishome * (RW)

     

    NIS client

    Set the shared directory to auto mount

    [[Email protected] ~] # Vi/etc/auto. Master


    /Opt/nishome/etc/auto. Misc

    /Net-hosts

    [[Email protected] ~] # Vi/etc/auto. Misc
    *-Fstype = NFS 192.168.100.114:/opt/nishome/& # The home directory is automatically mounted to everyone. You can also specify the user)
    [[Email protected] ~] #/Etc/init. d/autofs restart # restart the service


This article is from the "Linux" blog, please be sure to keep this source http://weihong.blog.51cto.com/6655355/1539420

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.