/rc.d/rc.sysinit this script is responsible for setting the system hostname, it reads/etc/sysconfig/network this text file, Redhat's hostname is set in this file.Therefore, if you want to permanently modify the Redhat hostname, modify the/etc/sysconfig/network file, the hostname in the line to change into Hostname=newname, Where newname is the hostname you want to set up.The hostname configuration file for
In this article, assuming that mini Linux mounts in the host's/mnt/boot and/mnt/sysroot, some of the script in this paper is simplified, just to achieve our goal, the Linux workflow is more complex than imaginedNow that we have a mini Linux available, let's make some extensions to it
Re-mount the root file system for read-writeFirst, provide Minlinux with a fstab configuration file, which reads as follows:650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/84/45/wKiom1eLJ8_RsolJA
have this file, but by/etc/rc.d/rc.sysinit this script is responsible for setting the system hostname, it reads/etc/sysconfig/network this text file, Redhat's hostname is set in this file. Therefore, if you want to permanently modify the Redhat hostname, modify the/etc/sysconfig/network file, the hostname in the line to change into Hostname=newname, Where newname is the hostname you want to set up. The
FileZilla is a free open source FTP software, divided into client version and server version, with all the features of FTP software. The controllable, structured interface and streamlined way to manage multiple sites makes the FileZilla client version a convenient and efficient FTP client tool, while FileZilla server is a small and reliable FTP server software that supports FTPAMP;SFTP. FileZilla is a fast and reliable FTP client and server-side open source program, with a variety of features,
filterWe're having a look.The code is as follows:[Email protected] ~]# iptables-l-NChain INPUT (Policy ACCEPT)Target prot opt source destination Target prot opt source destination Target Prot opt source destinationNothing at all, and we did not start the firewall when installing Linux is the same. (in advance, these configurations are like using commands to configure the IP, the restart will lose its effect), how to save.The code is as follows:[Email protected] ~]#/etc/rc.d/init.d/iptables Save
Method One:Modify the/etc/sysconfig/i18n fileChange the lang= "en_US" inside to GB2312.To restart the machine.Without restarting the method, directly# lang= "GB2312"And then we can.Modify i18n just to restart the activeMethod Two:#vi ~/.bash_profileLang=zh_cn. GB18030Language=zh_cn.gb18030:zh_cn.gb2312:zh_cnExport LANG LANGUAGEThis will be able to input and display the Chinese in the terminal, and the shell script in the original Chinese display garbl
Linux hostname is a kernel variable that can be viewed by hostname commands to view native hostname. You can also view it directly cat/proc/sys/kernel/hostname.#hostname#cat/proc/sys/kernel/hostnameThe above two output results are the same.Modifies the hostname of the runtime Linux system, i.e. no need to restart the systemHostname command to set the hostname of the system#hostname newnameNewName is the new hostname to be set, it takes effect immediately after the system restarts, but if you wan
destination Nothing at all, it's the same as when we installed Linux without a boot firewall. (in advance, these configurations are like using commands to configure the IP, the restart will lose its effect), how to save. [email protected] ~]# /etc/rc.d/init.d/iptables SaveThis will allow you to write to the/etc/sysconfig/iptables file. Remember to re-start the firewall after writing to make it work.[email protected] ~]# service iptables restartNow th
times +:1 or more times{m}: matches M-Times{M,n}: At least m, up to N timesLocation anchoring:^: Beginning of the line\\>, \b: The end of the languageGroup: () Back reference: \1, \2, ...Or: A|b c|cat:c or Cat (c|c) At:cat or catRegular expressions for this chapter focus on personal understanding of regular expressions the flexibility of regular expressions requires the use of regular expressions to write the expressions that correspond to the different requirements of the search cause everyone
One, hand-bound network card
Dual network card binding implementation is to use two network card virtual to become a network card, the aggregation of equipment appears to be a separate Ethernet interface equipment, popular point is that two network cards have the same IP address and parallel link aggregation into a logical link work. Depending on the functionality that the switch can support, the most common is the dual NIC bindings that are set as the primary standby mode.First, new Ifcfg-bond
IP address, DNS, gateway settings
[A]dns setting
Modify File vi/etc/resolv.confModify ContentNameServer 114.114.114.114NameServer 8.8.8.8
[Two]IP settings
Modify File: Vi/etc/sysconfig/network-scripts/ifcfg-eth0Modify ContentDevice=eth0 #描述网卡对应的设备别名, for example, Ifcfg-eth0 in a file that is eth0Bootproto=static #设置网卡获得ip地址的方式, possible options for STATIC,DHCP or BOOTP, respectively corresponding to statically specified IP address, IP address obta
Divided into system routing, network card routing (redhat8 above), static routing
System routing can be set in/etc/sysconfig/network
Network card routing can be set in/ETC/SYSCONFIG/NEWORK-SCRIPT/IFCFG-ETHX
Static routing in/etc/sysconfig/networking/device/can be set in Ethx.route, static route as the name implies, is fixed, set up the general will not easily cha
After the Linux system is installed, configure the network card IP via command mode.Configuration files are usually/etc/sysconfig/network-scripts/ifcfg-interface-name
1. Configure the network card IP address
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
#第二块网卡: Vi/etc/sysconfig/network-scripts/ifcfg-eth1
Device=eth0 #物理设备名ipaddr=192.168.1.10 #IP地址netmask=255.25
modify the IP, need to edit which configuration file, after modifying the configuration file, how to restart the network card, so that the configuration takes effect?A: Use the VI or Vim editor to edit the NIC configuration file/etc/sysconfig/network-scripts/ifcft-eth0 (if the eth1 file is named Ifcft-eth1), the following:Device=eth0Hwaddr=00:0c:29:06:37:baType=ethernetUuid=0eea1820-1fe8-4a80-a6f0-39b3d314f8daOnboot=yesNm_controlled=yesBootproto=stat
PUSHD switch to the specified pathPOPD back to the last directory======================================PUSHD can switch to the path specified later,Accumulate stack directories by the wayStack: This is called a stack of pushd-accumulating directories[Email protected] etc]# pushd/etc/sysconfig/network-scripts//etc/sysconfig/network-scripts/etcThese two directories are cumulative stacksAccumulate a stack dire
installation packages I've queried through RPM, and Yum, is not the same. No reason was found.Nine: View the keyboard layoutCat/etc/sysconfig/keyboardCat/etc/sysconfig/keyboard | grep KEYTABLE | Cut-f2-d=Ten: View selinux statusSestatusSestatus | Cut-f2-d:Cat/etc/sysconfig/selinux11: View Ip,mac AddressIn the Ifcfg-eth0 file you can see Mac, Gateway and other in
/root/install.log More/root/install.log | Wc-l See which packages are now installed Rpm-qa Rpm-qa | Wc-l Yum List Installed | Wc-l But strangely enough, the number of installation packages I've queried through RPM, and Yum, is not the same. No reason was found. Nine: View the keyboard layout Cat/etc/sysconfig/keyboard Cat/etc/sysconfig/keyboard | grep KEYTABLE | Cut-f2-d= Ten: View selinux status Sestatus S
/sbin/ntpdate 5 is/sbin/ntpdate
5, modify IP address, gateway, host name, DNS #eth0 network card settings
Mv/etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/network-scripts/ifcfg-eth0.bak
Vi/etc/sysconfig/ Network-scripts/ifcfg-eth0
Device=eth0 #NIC device name
Hwaddr=00:0c:29:d0:c7:b5 #corresponding physical address of the Ethernet dev
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.