Original: http://www.cnblogs.com/kerrycode/p/3595724.htmlWhen I think of the Linux system modified hostname is already very familiar with, today encountered a few problems, these questions give me a good lesson, a lot of knowledge points, when you think you have mastered, in fact, you know is only fur. Technical work, do not taste the stop!Lab Environment: Red Hat Enterprise Linux Server release 5.7 (Tikanga), other versions of Linux may be different. Please take the actual circumstances as the
When I think of the Linux system modified hostname is already very familiar with, today encountered a few problems, these questions give me a good lesson, a lot of knowledge points, when you think you have mastered, in fact, you know is only fur. Technical work, do not taste the stop!Lab Environment: Red Hat Enterprise Linux Server release 5.7 (Tikanga), other versions of Linux may be different. Please take the actual circumstances as the subject.In fact, I have modified hostname many times, gen
(such as the Mandrake distribution), some of the files referenced here are in a different directory or have other names. However, the net effect is the same as the actual effect? Pass the network information stored in a series of configuration files to the script, and then initialize the interfaces and network routes with scripts.Key files that involve initializing and configuring the network interface are:? /etc/hosts (map host name to IP address)? /etc/sy
Redhat environment, there are three kinds of configuration methods
Method One: Configure in the/etc/sysconfig/network configuration file:
The code is as follows:Default via 192.168.3.1 dev eth0 #192.168.3.1 gateway address for eth0 network card10.211.6.0/24 via 192.168.3.1 Dev eth010.0.0.0/8 via 10.212.52.1 Dev eth1 #10.212.52.1 gateway address for ETH1 network cardNote: This configuration notation also supports writing to the/etc/
#!/bin/bash#bycaosm #time 20161122ipaddr () {echo "=============== Configure IP Address and host name ===========" read-p "Please enter your IP address:" IPADDR read-p "Please enter your subnet mask:" NETMASK read-p "Please enter your gateway address:" GATEWAY read-p "Please enter your DNS1:" DNS1sed-i '/^ipaddr.*$/d ' /etc/sysconfig/ network-scripts/ifcfg-eth0sed-i '/^netmask.*$/d ' /etc/sysconfig/network-
After cloning a virtual machine, I usually use these two scripts to help rapid deployment. One is to modify the host name and the other is to modify the IP address (IP address modification is suitable for virtual machines that only use one network card, modify the IP address of eth0 ).Suitable for Redhat 6 and centos 6 operating systems.Modify host name:#! /Bin/bash# Ivan Liao-version 0.1Clear# ---- Prompt for new hostname, current hostname is default ----Oldname = 'hostname-S'Read-P "Enter new
Relative and absolute paths of linux knowledge point Review, linux knowledge point2.6 relative and absolute paths
Each file has a file starting from the root. All files have their own paths starting from the root. They are absolute paths, no matter which directory you are in, you can use the path to find the file path. The absolute path is not started by the root. Relative to the path in your location, it is called the relative path, which is relative to the current directory.
[Root @ aminglinux
: Host Routing-net: Network RoutingRoute Del-net 10.0.0.0/8Route Del-net 0.0.0.0Route del DefaultChanges made to restart the Network service or host after the failure;route-n: Digitally display information about each host or port3. After modifying the configuration file , restart the service generated address:(after the configuration file does not take effect, after the service restarts)3.1. File Address:/etc/sysconfig/networkNetwork interface Profile
When I feel that the Linux system changes hostname already very familiar with the time, encountered a few problems, these questions give me a good lesson, a lot of knowledge points, when you think you have mastered, in fact, you know is only fur. Technical work, do not taste the stop!Lab environment: Red Hat Enterprise linux Server release 5.7 (Tikanga), other Linux versions may be different. Please take the actual circumstances as the subject.In fact, I have modified hostname many times, genera
(0, I-1);} snkedir = dir. RIGHT ;}
The core of the next step should be the snake movement method. A large part of my code still needs to be improved. My method is to merge multiple operations into one method, make changes by yourself
Public void move () {Point head = new Point (body. get (0 ). x, body. get (0 ). y); switch (snail Kedir) {case UP: head. x --; break; case DOWN: head. x ++; break; case LEFT: head. y --; break; case RIGHT: head. y ++; break;} int canvas_width =
requirement is that the default route goes through the business address (192.168.3.0/24), the firewall segment goes through the 10.211.6.0/24 business address, and all the 10.0.0.0/8 addresses go through the management address segment.
Ii. redhat static route Configuration
There are three configuration methods in the redhat Environment
Method 1: Configure in the/etc/sysconfig/network configuration file:
The Code is as follows:
Default via 192.168.3.1
. Execute the following statement before restarting firewall[Email protected] sysconfig]# firewall-cmd--permanent--add-port=3690/tcpsuccess[[email protected] sysconfig]# Systemctl Restart Firewalld.service2) Uninstall the firewall, install the Iptables service, and then open the SVN 3690 port.[[emailprotected]sysconfig]#systemctlstopfirewalld.service[[emailprotec
, in the preceding example, if both eth1 and eth2 use the e1000 module, you must specify hwaddr.You can specify the hwaddr variable in/etc/sysconfig/network-scripts/ifcfg-eth *.
[root@Think ~]# grep 'HWADDR' /etc/sysconfig/network-scripts/ifcfg-eth*/etc/sysconfig/network-scripts/ifcfg-eth1:HWADDR=00:C2:89:fQ:b7:55/etc/sysconf
at the same time, for example, in the preceding example, both eth1 and eth2 use the e1000 module, you must specify the HWADDR variable. You can specify [plain] [root @ Think ~] in/etc/sysconfig/network-scripts/ifcfg-eth *. # Grep 'hwaddr '/etc/sysconfig/network-scripts/ifcfg-eth */etc/sysconfig/network-scripts/ifcfg-eth1: HWADDR = 00: C2: 89: fQ: b7: 55/etc/
, complete monitoring of local state and communication on the monitor side
Mmm_control: A script that provides commands for the Mmm_mond process
Second, the caseLab Environment:Six Centos6, two master MySQL (Master01, Master02), two from MySQL (SLAVE01, SLAVE02), one monitor (Mmm_mond), one read/write scheduler (Amoeba)Deploy primary master (Master01 and MASTER02) replication firstMaster011. Preparatory workvim /etc/sysconfig/network-scripts/
Reprint: http://blog.gesha.net/archives/221/ Linux system time and hardware clock issues (date and Hwclock) summarize Hwclock, this is easy to faint:
1/etc/sysconfig/clock file, only valid for the Hwclock command, and only useful when the system starts and shuts down (modifies utc=true to Utc=false before and after, and executes Hwclock (–UTC, or –localtime ) have not changed and will not take effect until the system is restarted;2/etc/rc.d/rc.sysinit
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.