1, installation mode selection
Minimized, Basic installation
2. Software source Settings
/etc/yum.repo.d/
Centos-base.repo set up a network member
Centos-media.repo Setting the Local Disk source
YUM&NBSP, --disablerepo =\*&NBSP, --enablerepo = C6 -media
Http://note.youdao.com/share/?id=a91e2014091efacd44de359f885a0494&type=note
System installation Epel and rpmfushion two software warehouses
CentOS 6
RPM-UVH http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm
(Whenyum appears "Error:cannot retrieve Metalink for Repository:epel. Verify its path and try again "edit the Epel.repo comment mirrorlist line and uncomment the BaseURL line. Run yum clean all && yum Makecache to resolve )
3. Network Settings
Http://note.youdao.com/share/?id=6e361ce7a88dd7ed3d8b5b14d3f0b2c0&type=note
Ifconfig eth0 192.168 ....
IP route add default GW. 192.168
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Vi/etc/sysconfig/network
Vi/etc/resolv.conf
4. iso file mount
Mount–o Loop Linuxsetup.iso/mnt/iso1
Mount-t/dev/cdrom/media/
5. System Configuration Service
Text Ntsysv
Graphical: system-config-services
Command Chkconfig--list
Chkconfig--level 345 ntf off
6. SSH Configuration
Install SCP
Yum Install Openssh-clients-y
SCP [email protected]: [email protected]:
Ssh-keygen-t RSA/DSA
7. NTP server
Update Time Ntpdate 192.168.100.222
Query Ntpq-p 192.168.100.222
Write time to BIOS hwclock-w
Automatic Update time
Edit/etc/crontab
8 * * * root/usr/ntpdate 192.168.100.222;/sbin/hwclock-w
Graphical interface System-config-date
8. Scheduled Tasks
Crontab-l # Viewing Scheduled Tasks
Crontab-e #编辑任务
The format of the schedule table is as follows:
F1 F2 f3 f4 f5 Program
where F1 is expressed in minutes, F2 represents hours, F3 represents the day of the month, F4 represents the month, and F5 represents the day of the one week. Program represents the procedure to be executed.
When F1 is * indicates that every minute the program,f2 is executed, the program is executed every hour, and the remainder of the analogy
when the F1 is a-B, it is executed from the time of the minute to the minute of the hour, and the F2 is a-B indicating that it is executed from the first to the first, and the remainder of the analogy
when F1 is */n, it is performed once every n minutes, and F2 is */n for every n-hour interval, with the remainder of the other analogy
when F1 is a, B, C,... A, B, C,... Minutes to execute, F2 for a, B, C,... The time indicated that the first, B, c ... Hours to execute, and the rest of the analogy
The user can also store all the settings in the file file, using the crontab file to set the time schedule.
Example:
the/bin/ls is performed at the first 0 minutes of every day per month:
0 7 * * */bin/ls
in December, the/usr/bin/backup is performed every 20 minutes in the morning from 6 to 12 hours per day:
0 6-12/3 */usr/bin/backup
Monday to Friday every 5:00 send a letter to [email protected]:
0 * * 1-5 mail-s "HI" [email protected]/dev/null 2>&1
9. Firewall settings
Iptables--list #显示防火墙规则表
Iptables-t filter-a input-s 192.168.100.*/24-j DROP
Iptables-save > Save Script
Iptables-t filter-a input-i-S--dport 22-j ACCEPT
System-config-firewall
Fwbuilder Firewall Tools
L7-filter 7-Layer Filtration
10. Performance monitoring
/proc/cpuinfo Meminfo Loadavg
Uptime
Watch-n-Free Timer view memory
NTOP Network Performance Graph monitoring
Sar-u 3
11. Log Analysis
Webalizer
Tail-f/var/log/access.log
12. Common commands
Yum Install software
1. List all software updates that can be updated
Command: Yum check-update
2. Install all UPDATE software
Command: Yum update
3. Install only the specified software
Command: Yum install <package_name>
4. Update only the specified software
Command: Yum update <package_name>
5. List all the software that can be installed
Command: Yum list
6. Enquiry
Yum Search keyword
5. List all packages installed but not in Yum Repository
Command: Yum list extras
6. List the specified packages
Command: Yum list <package_name>
7. Use Yum to get package information
Command: Yum info <package_name>
8. Listing information for all packages
Command: Yum Info
9. List all updatable package information
Command: Yum info updates
1. Clear the packages under the cache directory (/var/cache/yum)
Order: Yum Clean Packages
13. Desktop
1. Display the components that the system has installed, and the components that can be installed:
#yum grouplist|grep-i "X Window"
2. If the system is installed at the beginning of the installation with minimal installation, Xwindow is not installed, then first install:
#yum groupinstall "X window System"
3. Installing the GNOME desktop environment
Yum groupinstall "GNOME Desktop Environment"
4. Installing the KDE desktop environment
Yum Groupinstall "KDE (K Desktop environment)"
Yum Groupinstall "KDE Desktop"
5. Uninstalling the GNOME desktop ring
Yum groupremove "GNOME Desktop Environment"
6. Uninstalling the KDE desktop environment
Yum Groupremove "KDE (K Desktop environment)"
Turn on the text interface and switch from the text interface to the graphical interface:
Method 1: Run the command
#startx, you need to configure the graphical interface information first
Method 2: Modify the/etc/inittab file in the
Id:3:initdefault, change 3 to 5 and restart the system;
Method 3: Enter the graphical interface: Init 5
Entering the text interface from the graphical interface: Init 3
Restart: Init 6
Shutdown: Init 3
In a real-world environment, the shortcut switches between the graphical interface and the text interface:
Ctrl+alt+f (n), where F (n) is F1-f6, is 6 consoles;
Ctrl+alt+f7;
14. View Hardware
View CPU Status Cat/proc/cpuinfo | grep name | Cut-d:-f2 | Uniq-c
Cat/proc/cpuinfo | grep Physical | Sort-n | Uniq-c
Lsmod|grep "KVM"
This article is from the "Stupid Life" blog, make sure to keep this source http://chuanrensheng.blog.51cto.com/159174/1600012
LINUX Basic Management Content