A simple problem with Integers
Time limit:5000 Ms
Memory limit:131072 K
Total submissions:62228
Accepted:19058
Case time limit:2000 ms
Description
You haveNIntegers,A1,A2 ,...,An. You need to deal
'///Modify machine IP, mask, Gateway, workgroup, machine name
Sub Wmitoip (t)
Strcomputer= "."
strmask= "255.255.255.0"
Dim lt,rt ' variable
Dim Ipv,gateway,lan ' IP, Gateway, workgroup
Lt=cint (Left (t,1)) ' Machine number 1 digit value
Rt=cint (Right (t,2)) ' machine number two digits value
If Lt=1 or lt=2 then ' Judge Gateway
Gateway= "192.168.1.254"
Else
Gateway= "192.168.3.254"
End If
If Lt=1 then ' No. 1th Room
Lan= "S01"
Cint (t) Inputon = t' return the required computer nameExit functionEnd ifEnd ifWendEnd function
'// Modify the machine ip address, mask, gateway, working group, and machine nameSub wmitoip (t)StrComputer = "."Strmask = "255.255.255.0"Dim lt, rt 'variableDim ipv, gateway, lan ip, gateway, workgroupLt = cint (left (t, 1) 'value of the first digit on the left of the host numberRt = cint (right (t, 2) 'machine number right two-digit Value
If lt = 1 or l
named value is DisabledComponents, and then the value is FFFFFFFF (16 binary)Effective after rebootDisablecomponents Value Definition:0, enable all IPV 6 components, default settings0xFFFFFFFF, disable all IPV 6 components, except IPV 6 loopback interface0x20, use IPv 4 instead of
static IP address, and that the network is not in the IPv6 access, Therefore, the decision to disable the IPv6 and tunnel adapters is as follows:Disabling IPv6 is simple, go to Control Panel \ Network and internet\ Network and Sharing Center Click "Change Adapter Settings" on the right side of the panel to enter the network connection interface, select the connection you want to set, right-click the attribute, and cancel Internet protocol version 6 (TCP/IPV6) The previous selection box is OK. T
On the basis of the LVS NAT mode1. Clear the Ipvsadm ruleIpvsadm--ln2. Clear the Iptables ruleIptables-t nat-f3. Modify the RS network adapter configuration, modify the back gatewayvi/etc/sysconfig/network-scripts/ifcfg-eth0 restart Eth0ifdown eth0; ifup eth04.dir NICIfdown eth1dirip:192.168.1.118 rs1ip:192.168.1.116 rs2ip:192.168.1.115 is considered an extranet IP.Add a virtual ip,vip above dirvim/usr/local/sbin/lvs_dr.sh#! /bin/Bashecho1>/proc/sys/net/ipv4/IP_FORWARDIPV=/sbin/IPVSADMVIP=192.16
Entries generated by the system in different steps:
1) The inventory module generates the following entries for receiving:Borrow: material procurement (purchase Unit Price X order quantity)Loan: accrued liabilities (purchase Unit Price X order quantity)
2) The entries generated by the inventory module during inspection and warehouse receiving are:Borrow: raw materials (depending on the sub-stock subject settings) (system cost X order quantity)Loan: material procurement (purchase Unit Price X or
4 Servers Required First2 dir respectively is Dirmaster Dirslave2 RS run Nginx test service respectivelyDir192.168.186.129192.168.186.135Rs192.168.186.130192.168.186.132
First Build LVS-DR ServiceA.dir above installation Ipvsadm
Yum Install IpvsadmB. Changing the Ipvsadm configuration filevim/etc/usr/local/sbin/lvs_dr.sh#! /bin/bashecho 1 >/proc/sys/net/ipv4/ip_forward #dir服务器行开启路由转发功能Ipv=/sbin/ipvsadmvip=192.168.186.110rs1=192.168.186.1
version of the upgradeThe same profile provided does not directly overwrite the old version of the configuration file, and the new version of the file is renamed (filename.rpmnew) after the retention1. The sum of all positive integers within 100#!/bin/bashRead-p "First Number:" ARead-p "second number:" B[$a-ge $b] echo "sum is" seq-s+ $b $a | BC ' "| | echo "Sum is" seq-s+ $a $b | BC ' "[Email protected] bin]# bash shushu.shFirst Name is A:2Second name is b:100sum= 50492, through the ping comm
without this file, just new one) add the following to the inside
Echo 1 >/proc/sys/net/ipv4/ip_forward
Ipv=/sbin/ipvsadmvip=192.168.1.110rs1=192.168.1.113rs2=192.168.1.133Ifconfig eth0:0 DownIfconfig eth0:0 $VIP broadcast $VIP netmask 255.255.255.255 upRoute add-host $vip Dev eth0:0$IPV-C$IPV-A-t $VIP: 80-s WRR$IPV-A
, we can modify the default page of Nginx for the sake of partition: Rs1: Echo "Rs1rs1" >/usr/share/nginx/html/index.html RS2: Echo "Rs2rs2" >/usr/share/nginx/html/index.html 3. LVS/DR Configuration Three machines: Director (eth0192.168.31.166, VIP eth0:0: 192.168.31.110) Real Server1 (eth0 rip:192.168 31.100, VIP lo:0:192.168.31.110) Real Server2 (eth0 rip:192.168.31.101, VIP lo:0:192.168.31.110) Director on vim/usr/local/sbin/lvs_dr.sh//increase #! /bin/bash Echo 1 >/proc/sys/net/ipv4/ip_forwa
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.