Python full stack _day10_nfs and scheduled Tasks

Source: Internet
Author: User

1. nfs1.1 Installation

Yum Install Rpcbind nfs-utils-y

1.2 Configuration

Configuration file path:/etc/exports

NFS Configuration file Format:

< shared directory > < client 1> (options) < client 2> (option)

Shared directory: The directory that the NFS server shares to the client

Client: The network can access the shared host, multiple clients use a space separate

Options: Set permissions for the directory, user mappings, and so on. Multiple options are separated with commas.

Common options include:

Sync: Performs the input and output actions of the file system in a synchronous manner.      Async: Performs an asynchronous file system input and output action in an unsynchronized manner.      RO: Loaded in read-only mode. RW: Load in read/write mode.
Defaults: Use the default options.      The default options are RW, suid, dev, exec, Anto Nouser, and async.      Atime: Each access updates the Inode's access time, the default setting, and the Cancel option is noatime. Noatime: The Inode's access time is not updated on each access. Example:/share 192.168.16.185 (Rw,sync) 1.3 start

Systemctl Start Rpcbind

Systemctl Start NFS

1.4 Client Mount

Mount service-side IP: Shared directory destination Directory

2. Scheduled Tasks

Crond services are divided into system scheduled tasks and user scheduled tasks.

System-Level Scheduled tasks: Modify the configuration file/etc/crontab file to create a scheduled task.

User-level Scheduled tasks: Normal users edit their own scheduled tasks directly using the CRONTAB-E command. The root administrator can use crontab-e-u [user name] To modify a user's scheduled tasks. All user-defined crontab files are saved in the/var/spool/cron directory.

3) crontab file format: Both user-level and system-level file formats are the same.

# Example of Job definition:
#.----------------minute (0-59)//min (0-59)
# |.-------------hour (0-23)//h (0-23)
# | |.----------DAY of Month (1-31)//Date (1-31)
# | | |.-------month (1-12) OR jan,feb,mar,apr ... Month (1-12) or use the English abbreviation of the Month
# | | | |.----DAY of Week (0-6) (sunday=0 or 7) or Sun,mon,tue,wed,thu,fri,sat//days of the Week (0-6) or English shorthand for the use of the week
# | | | | |
# * * * * * * user-name command to be executed//username: Who will perform this task command to be executed: the command to execute

4) crontab Command parameters:

-U: Specify user

-E: Editing a user scheduled task

-L: Displays the contents of a user's scheduled tasks

-R: Delete a user's scheduled tasks

-I: Prompt for confirmation when deleting user files

Python full stack _day10_nfs and scheduled Tasks

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.