In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what is synchronizing the online server code to the web node script". The content of the article is simple and clear, and it is easy to learn and understand. Please follow Xiaobian's train of thought to study and learn what the synchronization online server code to the web node script is.
Shell provides a way for you to communicate with the operating system. This communication can be performed interactively (typed from the keyboard with an immediate response) or as shell script (non-interactive). Shell script is a string of shell and operating system commands placed in a file that can be reused. Essentially, shell script is a simple combination of command-line commands into a single file.
Record a small example of a shell script, and the online server synchronizes the code to the web node script.
#! / bin/bash#author:21yunwei c = "$1"; if ["$c"! = "1"]; then echo "EXIT"; exit;fi
# define web node pool
Webnode= (21yunwei-web121yunwei-web221yunwei-web321yunwei-web4)
# synchronize data cyclically, updating from the test site directory to the official site directory
For host in ${webnode [@]} doecho "rsync data to $host" rsync-avz-P-e ssh / wwwroot/21yunwei-prelive/* $host:/wwwroot/21yunwei/doneret=$?if [$ret-eq 0] then echo "$1 synchronization completed" else echo "$1 synchronization failed, please check" fi "
Suppose the script name is: rsync_to_web.sh
Usage
. / rsync_to_web.sh 1 Thank you for reading, the above is the content of "synchronizing online server code to web node script". After the study of this article, I believe you have a deeper understanding of the problem of synchronizing online server code to web node script, and the specific usage still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.