current time date. The preceding section describes how to synchronize time. 7: run common centos commands to view the hard disk and partition DF-hfdisk-l. You can also view the partition Du-Sh. You can see all the space occupied by DU/etc-Sh. You can see the size of this directory: use common centos commands to view installed software packages. view the software package cat-N/root/install installed during system installation. logmore/root/INS Tall. log | WC-l view the software packages that hav
software packages and the software packages installed during system installation.
cat -n /root/install.logmore /root/install.log | wc -l
Check the software packages that have been installed.
rpm -qarpm -qa | wc -lyum list installed | wc -l
But it is strange that the number of installation packages I query through rpm and yum is not the same. No reason is found.
View the keyboard layout using common CentOS commands
cat /etc/sysconfig/keyboardcat /etc/
partitions.Du-SHThe occupied space is displayed.DU/etc-SHThe directory size is displayed.
8. Use common centos commands to view installed software packages
View the software packages installed during system installationCat-N/root/install. LogMore/root/install. log | WC-lCheck the software packages that have been installed.Rpm-QaRpm-Qa | WC-lYum List Installed | WC-lBut it is strange that the number of installation packages I query through rpm and yum is not the same. No reason is found.
9. view
without/sbin/ifupAdd a configuration file to the script:/Etc/sysconfig/network,/Etc/sysconfig/network-scripts/ifcfg-eth0
Released: Debian Linux 3.0Optional DHCP Client: dhclientDHCP Client startup without/sbin/ifupAdd a configuration file to the script:/Etc/network/interfaces,/Etc/dhclient. conf
Release: Mandrake Linux 9.1Optional DHCP clients: dhclient dhcpcd, dhcpxd, pumpDHCP Client startup:/sbin/ifupAdd
Bond related information
View Server Bond info: # cat/proc/net/bonding/*
How to set the bond script
If you encounter the following error message, you can use the following methods:Bringing up interface Bond0:device BOND0 does no seem to be present, delaying initialization.Workaround:# modprobe Bonding# lsmod |grep BondingAfter executing these two lines, you can support bond.# cat/etc/rc.d/network.sh//Add this scripts to/etc/rc.local for automatic start======================#!/
Record Centos commands on 192.168.0.148. view cpugrep quot; modelname quot;/proc/cpuinfo2. check whether the cpu is 32-bit or 64-bit getconfLONG_BIT3. view the current linux version cat/etc/redhat-release ~~~ CentOSrelease5.8 (Fi records the Centos command of the host 192.168.0.148 1. view cpu grep "model name"/proc/cpuinfo 2. check whether the cpu is 32-bit or 64-bit getconf LONG_BIT 3. view the current linux version cat/etc/redhat-release ~~~ CentOS release 5.8 (Final )~~~ 4. view kernel ver
MTU indicates the maximum transmission unit. MTU values are not necessarily the same for different local networks. for Ethernet, MTU sets the Linux command line to modify the IP address, Gateway, and DNS methods.
Method 1:
Ifconfig eth0 192.168.1.18 netmask 255.255.255.0
Note: This method can make changes take effect immediately, and will be restored to the original IP address after restart.
Method 2:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Record Centos commands on 192.168.0.148. view cpu grep "model name"/proc/cpuinfo 2. check whether the cpu is 32-bit or 64-bit getconf LONG_BIT 3. view the current linux version cat/etc/redhat-release ~~~ CentOS release 5.8 (Final )~~~ 4. view kernel version uname-r uname-a 5. view memory grep MemTotal/proc/meminfo | cut-f2-d: free-m | grep "Mem" | awk '{print $2}' 6. view the hard disk and partition df-h fdisk-l. You can also view the partition du-sh to see all occupied space du/etc-sh and the s
]#du-sh
The occupied space is displayed.
[root@CentOShome]#du/var/www-sh
The directory size is displayed.
8. View installed software packages
View the software packages installed during system installation
cat-n/root/install.log
more/root/install.log|wc-l
Check the software packages that have been installed.
[root@CentOShome]#rpm-qa
.......................
.......................
.......................
.......................
.......................
[ro
-shThe occupied space is displayed.Du/etc-shThe directory size is displayed.
8. Use common CentOS commands to view installed software packagesView the software packages installed during system installationCat-n/root/install. logMore/root/install. log | wc-lCheck the software packages that have been installed.Rpm-qaRpm-qa | wc-lYumlistinstalled | wc-lBut it is strange that the number of installation packages I query through rpm and yum is not the same. No reason is found.
9. view the keyboard lay
It is necessary to configure the Iptables firewall under CentOS. Let's learn how to configure!
Set up firewalls in Linux, take CentOS as an example, and open the Iptables configuration file:
Default
Vi/etc/sysconfig/iptablesQuery for open 80 ports through the/etc/init.d/iptables status command if there are no two ways to handle:
1. Modify the Vi/etc/sysconfig/iptables command to add the firewall to open
[target directory][-][~]Action commandsEnter the system root directory[[email protected] ~]# CD/[Email protected]/]#[Email protected]/]# pwd/Go to the previous directory, which is the home directory of root[[email protected] ~]# CD/[Email protected]/]# cd/root/[[email protected]/]# pwd //show current working path /rootOr[[email protected]/]# CD ~ //~ represents the home directory of the current user [Email protected] ~]#[Email protected]/]# pwd/rootOr[Email protected]/]# CD $! // is to switch t
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
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
commands to view the current Linux version
More/etc/redhat-release
Cat/etc/redhat-release
V: Use CentOS common commands to view the kernel version
Uname-r
Uname-a
VI: Use CentOS common commands to view the current time
Date above describes how to sync time.
Seven: Use CentOS common command to view hard disk and partition
Df-h
Fdisk-l
You can also view partitions
Du-sh
You can see all the space occupied
Du/etc-sh
You can see the size of this directory
Eight: Use CentOS common com
process will not modify the MA-1 settings, so no matter how the main and standby relationships in MA-1, will be shielded at the ma-n level, will not affect the subsequent related extensions and portingCase: repcached+magent+monit+memcached
Case: magent+memcached Cluster
Host
system
IP
Network card
Software
Magent_1
Centos 6.7 64Bit
192.168.1.10
Vmnet1 (bridge Connection)
Magent, keepalived
Linux first week study notes (+)2.6 , relative and absolute paths( 1 ) . Path: is the place where a file is stored, as long as you type the path of the file system can only directly find the location of the file, so find a file needs to enter the path of this file. ( 2 ) . Absolute Path: the path from the root is all absolute (that is, the absolute path starts at the root and then a file branch followed by another, until it reaches the destination directory or file. What is called the root direc
) and 2 client, or the same network segment VMS , there is no value in the experiment without having to configure both client computers to communicate. Experimental process:Client Win7 ConfigurationClient Win7 network address configuration see attachment map win7networkClient win7hosts folders also need to be configured // Configuration DNS resolves the domain name, which is DNS The early days were all in this hosts Configuration in FilesDNS , we do experiments for the first use of this, see an
systemOneModify IP Address1. IP configuration fileModify the IP address profile of the corresponding NIC/etc/sysconfig/network-scripts/ifcfg-In Redhat, the configuration file for the system network settings is saved in the/etc/sysconfig/network-scripts directory. Ifcfg-eth0 represents the configuration information for the first NIC, and ifcfg-eth1 represents the configuration information for the second NIC
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.