Nothing Special   »   [go: up one dir, main page]

CN106790507A - A kind of method and system of server cluster simple communication - Google Patents

A kind of method and system of server cluster simple communication Download PDF

Info

Publication number
CN106790507A
CN106790507A CN201611170103.8A CN201611170103A CN106790507A CN 106790507 A CN106790507 A CN 106790507A CN 201611170103 A CN201611170103 A CN 201611170103A CN 106790507 A CN106790507 A CN 106790507A
Authority
CN
China
Prior art keywords
server
main frame
client
slave
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611170103.8A
Other languages
Chinese (zh)
Inventor
肖峰镇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201611170103.8A priority Critical patent/CN106790507A/en
Publication of CN106790507A publication Critical patent/CN106790507A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of method and system of server cluster simple communication, belong to server communication technical field.The method of server cluster simple communication of the invention, the method of the communication is using a server in cluster as main frame server, other servers are used as slave client, task is performed with ssh secure log slaves client, slave client sends task status to main frame server after the completion of task, the task status that main frame server sends according to slave client, is that slave client sends new task.The method and system of the server cluster simple communication of the invention are simple to operate effectively, it is not necessary to additionally install special software, it is not necessary to which additional configuration controls server, reduce cost, improve production efficiency, with good application value.

Description

A kind of method and system of server cluster simple communication
Technical field
The present invention relates to server communication technical field, a kind of method of server cluster simple communication is specifically provided and is System.
Background technology
Computer has information memory capacity big, user obtain information it is convenient and swift the advantages of, be widely applied.It is special It is not the further development recently as society and economy, the level of computer has the raising of matter.Server is relative to general It is higher in the requirement of the aspects such as stability, security for logical computer, it is outstanding in quality and processor data performance, It is widely applied to each large enterprise.During actual production is tested and is disposed, it is often necessary to which server set group synchronization is performed Task(Software etc. is for example installed).Server set group synchronization needs server cluster to be communicated when performing task, server set Safety problem when group is communicated turns into key.But carried out between in the prior art, not ensure that server cluster also The effective ways of security during communication.
Ssh is the abbreviation of secure shell, by the network group of IEIT(Network Working Group)Determine System.Ssh is the security protocol set up on the basis of application layer and transport layer.Ssh is relatively reliable at present, aims at telnet session With the agreement that other network services provide security.Can effectively prevent the information in remote management procedures from letting out using ssh agreements Dew problem.Ssh is initially a program on unix system, is rapidly spread to other operating platforms again later, and ssh correctly makes Used time can make up the leak in network.Security when performing task using ssh settlement servers cluster synchronization in the present invention is asked Topic.
The content of the invention
Technical assignment of the invention is directed to above-mentioned problem, there is provided a kind of simple to operate effective, it is not necessary to extra Special software is installed, it is not necessary to which additional configuration controls server, reduces cost, the server cluster of improve production efficiency simply leads to The method of letter.
Technical assignment of the invention further be to provide it is a kind of can realize above-mentioned server cluster simple communication method be System.
To achieve the above object, the invention provides following technical scheme:
A kind of method of server cluster simple communication, the method for the communication is using a server in cluster as main frame Server, other servers perform task as slave client with ssh secure log slaves client, after the completion of task from Machine client sends the task status that is sent according to slave client to main frame server, main frame server of task status, be from Machine client sends new task.
Preferably, the method for the server cluster simple communication specifically includes following steps:
S1:The installation operation OS on main frame server and slave client;
S2:Configure the IP address of main frame server and slave client;
S3:Ssh is set without cryptographic acess;
S4:Configuration main frame server and slave client;
S5:Communicated between main frame server and slave client.
The operating system of needs is installed according to the actual requirements, in the present invention by taking Redhat6.4 as an example in step S1.
Configuration of IP is come with following script in step S2(By taking main frame server as an example).
cat >/etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
DEVICE=eth0
>
BOOTPROTO=static
TYPE=Ethernet
IPADDR=192.168.1.1
NETMASK=255.255.255.0
EOF
/sbin/service network restart
For convenience, main frame server IP are set to 192.168.1.1.
In step S4, by taking main frame server as an example:
Modification/etc/hosts files
Vim /etc/hosts
Generic-document content is as follows:
127.0.0.1 localhost.localdomain localhost
We add following content below:
192.168.1.1 m01
192.168.1.2 m02
192.168.1.3 m03
All slave client are added to hosts files by the actual conditions according to oneself, and hosts file copies are replaced all Server/etc/hosts,
Other servers are logged in after the completion of work just can directly be performed:
ssh m01。
Preferably, in step S3, a pair of secret keys is produced on client, ssh-keygen orders are performed, it is necessary to be input into Place directly carriage return, export it is as follows:
[user@Client .ssh]$ ssh-keygen -d
Generating public/private dsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_dsa.
Your public key has been saved in /home/user/.ssh/id_dsa.pub.
The key fingerprint is:
22:0c:2e:64:09:2e:a9:f1:37:c5:ee:d9:e5:57:92:b4 user@Client
Now, under/home/user/.ssh catalogues, there are a pair of secret keys id_dsa and id_dsa.pub.As public key id_ Dsa.pub is uploaded on server by any way, such as:[user@Client .ssh]$ scp id_dsa.pub Server:/ home/user is signed in on server, is performed with the cat id_dsa.pub that issue orders>> /home/user/ .ssh/authorized_keys, this completes configuration, main frame server is now logged in by slave client, without input Password.
Preferably, being two-way communication between main frame server and slave client in step S5.
Simplest test script scripts.sh contents are write under client m02/opt catalogues as follows:
#!/bin/bash
sleep 2
ssh m01 “touch /opt/m02”
This script is meant that, postpones 2 seconds, logs in the file of server servers newly-built entitled m02 under/opt catalogues.
Following order line is run in main frame server servers
ssh m02 “ssh /opt/scritps.sh”
If run can successfully find newly-built file m02 under/opt/ catalogues, a communication cycles are completed.
A kind of system of server cluster simple communication, including multiple servers, one of server are main frame Server, other servers are slave client, and task is performed using ssh secure log slaves client, and slave client is complete The task status that is sent according to slave client to main frame server, main frame server of task status is sent after into task, be from Machine client sends new task.
Preferably, being two-way communication between the main frame server and slave client.
Compared with prior art, the method for server cluster simple communication of the invention has beneficial effect following prominent Really:The method of server cluster simple communication of the invention is simple to operate, it is not necessary to additionally install special software, it is not necessary to extra Configuration control server, reduces cost, improve production efficiency, and security during energy settlement server cluster synchronization execution task Problem.
Brief description of the drawings
Fig. 1 is the schematic diagram of the system of server cluster simple communication of the present invention.
Specific embodiment
Below in conjunction with drawings and Examples, the method and system to server cluster simple communication of the invention are made into one Step is described in detail.
Embodiment
The method of server cluster simple communication of the invention, using a server in cluster as main frame server, Other servers perform task, slave client after the completion of task as slave client with ssh secure log slaves client The task status that task status sends to main frame server, main frame server according to slave client is sent, is slave client Send new task.
The method of the server cluster simple communication specifically includes following steps:
S1:The installation operation OS on main frame server and slave client, installs the operating system of needs according to the actual requirements, this In invention by taking Redhat6.4 as an example.
S2:Configure the IP address of main frame server and slave client.
By taking main frame server as an example, cat>/etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
DEVICE=eth0
>
BOOTPROTO=static
TYPE=Ethernet
IPADDR=192.168.1.1
NETMASK=255.255.255.0
EOF
/sbin/service network restart
For convenience, main frame server IP are set to 192.168.1.1.
S3:Ssh is set without cryptographic acess, a pair of secret keys is produced on slave client, perform ssh-keygen orders, need The place directly carriage return to be input into, exports as follows:
[user@Client .ssh]$ ssh-keygen -d
Generating public/private dsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_dsa.
Your public key has been saved in /home/user/.ssh/id_dsa.pub.
The key fingerprint is:
22:0c:2e:64:09:2e:a9:f1:37:c5:ee:d9:e5:57:92:b4 user@Client
Now, under/home/user/.ssh catalogues, there are a pair of secret keys id_dsa and id_dsa.pub.As public key id_ Dsa.pub is uploaded on Server by any way, such as:[user@Client .ssh]$ scp id_dsa.pub Server:/ home/user is signed in on Server, is performed with the cat id_dsa.pub that issue orders>> /home/user/ .ssh/authorized_keys, this completes configuration, server now is logged in from client, need not just input password .
S4:Configuration main frame server and slave client.
By taking main frame server as an example:
Modification/etc/hosts files
Vim /etc/hosts
Generic-document content is as follows:
127.0.0.1 localhost.localdomain localhost
We add following content below:
192.168.1.1 m01
192.168.1.2 m02
192.168.1.3 m03
All slave client are added to hosts files by the actual conditions according to oneself, and hosts file copies are replaced all Server/etc/hosts,
Other servers are logged in after the completion of work just can directly be performed:
ssh m01。
S5:Communicated between main frame server and slave client.
It is two-way communication between main frame server and slave client, writes most simple under client m02/opt catalogues Test script scripts.sh contents it is as follows:
#!/bin/bash
sleep 2
ssh m01 “touch /opt/m02”
This script is meant that, postpones 2 seconds, logs in the file of server servers newly-built entitled m02 under/opt catalogues.
Following order line is run in main frame server servers
ssh m02 “ssh /opt/scritps.sh”
If run can successfully find newly-built file m02 under/opt/ catalogues, a communication cycles are completed.
As shown in figure 1, the system of server cluster simple communication of the present invention, including multiple servers, one of service Device is main frame server, and other servers are slave client, and task, slave are performed using ssh secure log slaves client The task status that task status sends to main frame server, main frame server according to slave is sent after client completion tasks, is Slave client sends new task, is two-way communication between main frame server and slave client.
Embodiment described above, the simply present invention more preferably specific embodiment, those skilled in the art is at this The usual variations and alternatives carried out in the range of inventive technique scheme all should be comprising within the scope of the present invention.

Claims (6)

1. a kind of method of server cluster simple communication, it is characterised in that:The method of the communication is with a clothes in cluster Used as main frame server, other servers perform task to business device as slave client with ssh secure log slaves client, Slave client sends task status to main frame server after the completion of task, and main frame server is according to appointing that slave client sends Business state, is that slave client sends new task.
2. the method for server cluster simple communication according to claim 1, it is characterised in that:The server cluster letter The method of single communication specifically includes following steps:
S1:The installation operation OS on main frame server and slave client;
S2:Configure the IP address of main frame server and slave client;
S3:SSH is set without cryptographic acess;
S4:Configuration main frame server and slave client;
S5:Communicated between main frame server and slave client.
3. the method for server cluster simple communication according to claim 2, it is characterised in that:In step S3, A pair of secret keys is produced on client, ssh-keygen orders is performed, it is necessary to the place directly carriage return of input.
4. the method for server cluster simple communication according to claim 2, it is characterised in that:Main frame in step S5 It is two-way communication between server and slave client.
5. a kind of system of server cluster simple communication, it is characterised in that:Including multiple servers, one of server is Main frame server, other servers are slave client, and task, slave are performed using ssh secure log slaves client The task status that task status sends to main frame server, main frame server according to slave is sent after client completion tasks, is Slave client sends new task.
6. the system of server cluster simple communication according to claim 5, it is characterised in that:The main frame server with It is two-way communication between slave client.
CN201611170103.8A 2016-12-16 2016-12-16 A kind of method and system of server cluster simple communication Pending CN106790507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611170103.8A CN106790507A (en) 2016-12-16 2016-12-16 A kind of method and system of server cluster simple communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611170103.8A CN106790507A (en) 2016-12-16 2016-12-16 A kind of method and system of server cluster simple communication

Publications (1)

Publication Number Publication Date
CN106790507A true CN106790507A (en) 2017-05-31

Family

ID=58893330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611170103.8A Pending CN106790507A (en) 2016-12-16 2016-12-16 A kind of method and system of server cluster simple communication

Country Status (1)

Country Link
CN (1) CN106790507A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110611621A (en) * 2019-09-26 2019-12-24 上海依图网络科技有限公司 Tree-structured multi-cluster routing control method and cluster forest

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200036A (en) * 2013-04-08 2013-07-10 国电南瑞科技股份有限公司 Automated configuration method of electrical power system cloud computing platform
CN104579853A (en) * 2015-02-10 2015-04-29 浪潮电子信息产业股份有限公司 Method for network testing of server cluster system
CN104580217A (en) * 2015-01-09 2015-04-29 浪潮电子信息产业股份有限公司 Method for achieving ssh password-less batch access of nodes of Rack cabinet
CN105471675A (en) * 2015-11-20 2016-04-06 浪潮电子信息产业股份有限公司 Method and system of testing nodes in batches
CN105677411A (en) * 2016-01-04 2016-06-15 山东超越数控电子有限公司 Device, system and method for installing colony assembly
CN105740152A (en) * 2016-02-04 2016-07-06 浪潮电子信息产业股份有限公司 Pressure testing method for multi-node batch deployment system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200036A (en) * 2013-04-08 2013-07-10 国电南瑞科技股份有限公司 Automated configuration method of electrical power system cloud computing platform
CN104580217A (en) * 2015-01-09 2015-04-29 浪潮电子信息产业股份有限公司 Method for achieving ssh password-less batch access of nodes of Rack cabinet
CN104579853A (en) * 2015-02-10 2015-04-29 浪潮电子信息产业股份有限公司 Method for network testing of server cluster system
CN105471675A (en) * 2015-11-20 2016-04-06 浪潮电子信息产业股份有限公司 Method and system of testing nodes in batches
CN105677411A (en) * 2016-01-04 2016-06-15 山东超越数控电子有限公司 Device, system and method for installing colony assembly
CN105740152A (en) * 2016-02-04 2016-07-06 浪潮电子信息产业股份有限公司 Pressure testing method for multi-node batch deployment system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110611621A (en) * 2019-09-26 2019-12-24 上海依图网络科技有限公司 Tree-structured multi-cluster routing control method and cluster forest
CN110611621B (en) * 2019-09-26 2020-12-15 上海依图网络科技有限公司 Tree-structured multi-cluster routing control method and cluster forest

Similar Documents

Publication Publication Date Title
US11983082B2 (en) Server clustering in a computing-on-demand system
US11122023B2 (en) Device communication environment
US10547710B2 (en) Device gateway
WO2017162173A1 (en) Method and device for establishing connection of cloud server cluster
US20200213209A1 (en) Device state management
US8910129B1 (en) Scalable control system for test execution and monitoring utilizing multiple processors
US10205760B2 (en) Task coordination in distributed systems
WO2019184164A1 (en) Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
CN103840994B (en) A kind of user terminal accesses the system and method for Intranet by VPN
US9716728B1 (en) Instant data security in untrusted environments
KR20100130981A (en) Efficient and transparent remote wakeup
CN104301316A (en) Single sign-on system and implementation method thereof
US8515996B2 (en) Secure configuration of authentication servers
JP4721082B1 (en) VPN connection system
CN104580217A (en) Method for achieving ssh password-less batch access of nodes of Rack cabinet
US10721719B2 (en) Optimizing caching of data in a network of nodes using a data mapping table by storing data requested at a cache location internal to a server node and updating the mapping table at a shared cache external to the server node
CN103731308A (en) Virtual machine public network management method
CN102333098A (en) Implementation method for security private cloud system
WO2022214019A1 (en) Method and apparatus for deploying network device, and device, system and storage medium
WO2022121492A1 (en) File transmission method and apparatus, computer device, and storage medium
CN104253792A (en) Substrate management controller virtual system and method
CN106790507A (en) A kind of method and system of server cluster simple communication
CN112068929A (en) Unified management method for accessing multi-architecture cloud platform to third-party web service
Wei et al. A VDI system based on cloud stack and active directory
US8065561B1 (en) Method and apparatus for automating device recovery using device configuration information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531