UbuntuNFS instance Configuration Guide

Source: Internet
Author: User
Story: I have two servers 122,123 and set up a tomcat cluster. Because the development environment is different from the official environment configuration, I need to leave a configuration file for the official environment on the official environment server, during the release, these reserved configuration files are used to overwrite the project configuration files that the two servers use, I don't want to maintain these reserved configuration files on both servers. On the 122 server, I created a webapps/backupConfig folder to share the configuration files with 123

Story:I have two servers.122,123,Set upTomcatCluster,Because the development environment is different from the official environment,I need to leave it on the official environment Server Configuration file of the official environment,Released,Use these reserved configuration files to overwrite them.

Because the project configuration files used by the two servers are the same,I don't want These reserved configuration files are maintained on both servers.

In122Of I have createdWebapps/backupConfigFolder,Let123Share

Operating System:Ubuntu, 122 (nfsServer), 123 (nfsClient)

TheIpAddress for reference only

Procedure:

1.122InstallNfs

Sudo apt-get install nfs-kernel-server

2.122SetWebapps/backupConfigFolder sharing

Sudo vim/etc/exports

Add

/Home/appuser/webapps/backupConfig 172.88.88.123(Rw, sync, no_root_squash)

Note:172.88.88.123Yes123 (nfsClient Server)

3.122Create a rebootNfsOfShell Restart-nfs.sh

#! /Bin/bash

# Echo "create by jinxin 2012-06-30"

 

Echo "restart nfs"

Sudo/etc/init. d/nfs-kernel-server restart

Sudo/etc/init. d/portmap restart

3.1SetShRun permission And run

Chmod + x *. sh

 

/Restart-nfs.sh

4.So far122 nfsThe server has been configured

123Client,InstallNfs-common

Sudo apt-get install nfs-commmon

5.123CreatedMount shellMount-backup-config.sh

#! /Bin/bash

# Echo "create by jinxin 2012-06-30"

 

Echo "mount-backup-config.sh"

 

Echo "mkdir-p webapps/backupConfig"

Mkdir-p webapps/backupConfig

Echo "sudo mount 172.88.88.122:/Home/appuser/webapps/backupConfig"

Sudo mount 172.88.88.122:/Home/appuser/webapps/backupConfig

5.1SetShRun permission And run

Chmod + x *. sh

 

./Mount-backup-config.sh

This completes the configuration.

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.