In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
We may sometimes operate the server in batches, such as uploading a file on the server in batches, installing software, executing a command and script, restarting the service, restarting the server, etc., which is particularly cumbersome and a waste of manpower if we go to one server by hand.
At this point, we can use expect to send instructions to the target server to implement batch operations.
The following example will bulk copy a file to another service provider on centos and execute the corresponding command
1. Install expectyum install expect2. Net on centos. Write expect script copyfilebatch.sh
The following script will copy a rc.local file to the server whose intranet IP is 192.168.0.102 to 192.168.0.112 respectively. After the copy is successful, execute the chmod command to restart the server respectively.
#! / usr/bin/expect-fset password rootpasswordfor {set I 102} {$I
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.