Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | About

部分 I. System Administrator

目录

3. 获取系统信息
3.1. Distribution information
3.2. System Infomation
3.2.1. Cpu Bit
3.3. shutdown
3.4. Profile
3.4.1. shell
4. Kernel
4.1. 编译安装内核
4.2. sysctl - configure kernel parameters at runtime
4.2.1. sysctl.d
4.2.2. vm.overcommit_memory
4.3. /sys
4.3.1. /sys/class/net/
4.4. /proc
4.4.1. 进程内存监控
4.4.2. ulimit 状态
5. Kernel modules
5.1. modprobe - program to add and remove modules from the Linux Kernel
6. Package Management
6.1. apt-cache
6.1.1. search
6.1.2. depends
6.1.3. policy
6.2. Apt-Get
6.2.1. Search
6.2.2. Installation
6.2.3. Update
6.2.4. Remove
6.2.5. purge
6.3. aptitude
6.4. Automatic Updates
6.4.1. 升级过程中链接中断怎么办?
6.5. dpkg
6.5.1. -i|--install 安装.deb包
6.5.2. -r|--remove 卸载.deb包
6.5.3. -L|--listfiles <package> ... List files `owned' by package(s). 列出包中的文件
6.5.4. -l|--list [<pattern> ...] List packages concisely. 列出.deb包
6.5.5. Status
6.5.6. dpkg-deb - Debian package archive (.deb) manipulation tool
6.5.6.1. -X, --vextract archive directory Extract and display the filenames contained by a package
6.5.6.2. -e, --control archive [directory] Extracts the control information files from a package archive into the specified directory.
6.5.6.3. -b, --build directory [archive|directory]
6.5.7. dpkg-reconfigure
6.6. Upgrading
6.6.1. GUI
6.6.2. CLI
6.6.3. CDROM
6.7. 制作.deb安装包
6.7.1. checkinstall — Track installation of local software, and produce a binary manageable with your package management software.
6.7.2. dh_make - prepare Debian packaging for an original source archive
6.7.3. control
7. Package Manager
7.1. Yum Resource & Yum Mirror
7.1.1. Fedora resource
7.1.1.1. Fedora 5.4
7.1.1.2. Fedora 6.x
7.1.1.3. Fedora 7.x
7.1.2. rpmforge-release
7.1.2.1. CentOS 5.x
7.1.2.2. CentOS 6.x
7.1.2.3. CentALT
7.1.3. atomic
7.1.4. famillecollet
7.1.5. rpmfind.net
7.1.6. pkgs.org
7.1.7. China Resource
7.1.8. 制作本地共享源
7.2. yum - Yellowdog Updater Modified
7.2.1. YUM 源管理
7.2.2. install
7.2.3. localinstall
7.2.4. list
7.2.5. search
7.2.6. update / upgrade
7.2.7. remove
7.2.8. installed
7.2.9. group
7.2.9.1. grouplist
7.2.9.2. groupinfo
7.2.9.3. groupinstall
7.2.9.4. groupremove
7.2.10. 查看包的依赖关系
7.2.11. provides / whatprovides
7.3. rpm - RPM Package Manager
7.3.1. install/upgrade/remove
7.3.1.1. --prefix
7.3.2. query
7.3.2.1. changelog 查看变更日志
7.4. rpmbuild - Build RPM Package(s)
7.4.1. RPM_directory_macros
7.4.2. --define 专递模板变量
7.4.3. defattr
7.4.4. GPG 签名
7.4.5. 使用 CMake3 编译并创建RPM包
7.4.6. FAQ
8. Device information
8.1. dmesg - print or control the kernel ring buffer
8.2. smartctl - Control and Monitor Utility for SMART Disks
8.3. CPU 资源管理
8.3.1. lscpu - display information about the CPU architecture
8.3.2. chcpu - configure CPUs
8.4. lspci - list all PCI devices
8.5. lshw - list hardware
8.5.1. only show a certain class of hardware
8.6. hwinfo - Hardware Information
8.7. dmidecode - DMI table decoder
8.8. ethtool - Display or change ethernet card settings
8.9. usb device
8.10. lsscsi - list SCSI devices (or hosts) and their attributes
8.11. HBA
8.12. lsblk - list block devices
8.13. kudzu - detects and configures new and/or changed hardware on a system
8.14. udev - Linux dynamic device management
9. 区域/语言/时间
9.1. Ubuntu
9.1.1. time zone
9.1.2. to change system date/time
9.1.2.1. NTP Server
9.1.3. Language
9.2. CentOS 区域设置
9.2.1. 时区设置 CentOS 6
9.2.1.1. 查看当前时区 /etc/sysconfig/clock
9.2.1.2. tzselect - select a timezone
9.2.1.3. 时区设置 CentOS 7
9.2.1.4. 修改时区并立即生效
9.2.2. 日期、时间
9.2.2.1. rdate - get the time via the network
9.2.3. 语言
10. console / terminal
10.1. serial console
10.2. console timeout
10.3. TUI (Text User Interface)
10.4. framebuffer
11. Harddisk
11.1. 查看分区分区 UUID
11.2. Label
11.2.1. Ext2
11.2.1.1. 查看卷标
11.2.1.2. 更改卷标
11.3. swap 交换分区
11.3.1. swapon failed: Invalid argument
11.4. Show partition
11.5. Create partition
11.6. Clone partition
11.7. estimate disk / directory / file space usage
11.8. Convert from ext3 to ext4 File system
11.9. GPT
11.9.1. 设置GTP磁盘
11.9.2. 查看分区
11.9.3. 创建分区
11.9.4. 删除分区
11.9.5. 退出
11.9.6. mount
11.10. loop devices
11.10.1. losetup - set up and control loop devices
12. Removable Storage
12.1. usb flash
12.2. CD / DVD
12.2.1. Mount an ISO file
12.2.2. create iso file from CD
12.2.3. burner
12.2.4. ISO Mirror
13. File System
13.1. /etc/fstab
13.1.1. /etc/fstab 例子
13.2. Mount partition
13.2.1. Mount
13.2.2. Umount
13.2.3. bind directory
13.3. ext2
13.4. ext3
13.5. ReiserFS
13.6. EXT4
13.6.1. install
13.6.2. format
13.6.3. label
13.6.4. mount/umount
13.6.5. LVM 卷
13.7. LVM
13.8. Btrfs
13.8.1. /etc/fstab
13.8.2. btrfs
13.8.3. Mount Btrfs
13.8.3.1. Mount Snap
13.8.3.2. fstab
13.8.3.2.1. btrfs-show
13.8.3.2.2. /etc/fstab
13.8.4. subvolumes
13.8.5. snapshot
13.8.6. btrfsctl
13.8.6.1. Resizes the filesystem
13.8.6.2. Snapshot
13.8.7. btrfs-vol
13.8.8. btrfs-convert
13.8.9. btrfsck
13.8.10. btrfs-debug-tree
13.9. zfs
13.10. iSCSI
13.10.1. GFS
13.11. GFS - Cluster Storage
13.12. glusterfs
13.13. RAM FS
13.14. tmpfs
13.15. ftp fs
13.16. SSHFS (sshfs - filesystem client based on SSH File Transfer Protocol)
13.17. davfs2 - mount a WebDAV resource as a regular file system
13.18. redisfs
13.19. File system test
13.19.1. ext4 vs btrfs
13.19.2. xfs vs jfs vs reiserfs
13.19.3. RAID10 (146G*8) vs EMC VNX 5300 (8G Fibre Channel)
13.19.4. Dell 2950(RAID5 500G SATA * 6) vs MD1200
13.20. 磁盘占用100%删除文件后不是放的解决方法
14. Networking
14.1. ping
14.2. ss - another utility to investigate sockets
14.3. hosts
14.3.1. /etc/hostname
14.3.2. hostnamectl - Control the system hostname
14.3.3. /etc/host.conf
14.3.4. /etc/hosts
14.3.5. hosts.allow / hosts.deny
14.3.6. /etc/resolv.conf
14.4. Hostname
14.5. Network adapter
14.5.1. 接口名称
14.6. Ethernet Interfaces
14.6.1. ifquery
14.6.2. DHCP
14.6.3. Static IP
14.7. Mask
14.8. Gateway
14.9. Configuring Name Server Lookups
14.10. IP forwarding(IP转发)
14.11. bonding
14.11.1. Ubuntu
14.12. Finding optimal MTU
14.13. wireless
14.13.1. rfkill - tool for enabling and disabling wireless devices
14.13.2. iwlist - Get more detailed wireless information from a wireless interface
14.13.3. iwconfig - configure a wireless network interface
14.13.4. /proc/net/wireless
14.14. Linux IP And Router
14.14.1. netmask
14.14.1.1. iptab
14.14.1.2. netmask - a netmask generation and conversion program
14.14.2. arp - manipulate the system ARP cache
14.14.2.1. display hosts
14.14.2.2. delete a specified entry
14.14.2.3. /proc/net/arp
14.14.2.4. /etc/ethers
14.14.3. iproute2
14.14.3.1. 添加路由
14.14.3.2. 删除路由
14.14.3.3. 变更路由
14.14.3.4. 替换已有的路由
14.14.3.5. 增加默认路由
14.14.3.6. cache
14.14.4. 策略路由
14.14.5. 负载均衡
14.14.6. MASQUERADE
14.14.7. ip tunnel
14.14.8. VLAN
14.14.9. Zebra
14.15. CentOS 网络配置
14.15.1. Gateway
14.15.2. bonding
14.15.3. brctl
14.15.4. nmtui
15. Logging
15.1. rsyslog
15.1.1. rsyslog.conf
15.2. logrotate - rotates, compresses, and mails system logs
15.2.1. /etc/logrotate.conf
15.2.2. /etc/logrotate.d/
15.2.2.1. 日志配置
15.2.2.2. create 创建日志文件,指定用于与访问权限
15.2.2.3. postrotate
15.3. syslog-ng
15.4. syslog, klogctl - read and/or clear kernel message ring buffer; set console_loglevel
15.4.1. /etc/sysconfig/syslog
15.4.2. /etc/syslog.conf
15.4.3. logger
15.4.4. To Log Messages Over UDP Network
15.5. 挂载日志卷
15.5.1. 子卷挂载
15.5.2. 使用过个子卷
15.5.3. /etc/fstab配置
16. 设备管理
16.1. Debian/Ubuntu
16.1.1. update-rc.d - install and remove System-V style init script links
16.1.2. invoke-rc.d - executes System-V style init script actions
16.1.3. runlevel
16.1.4. sysv-rc-conf
16.1.5. xinetd - replacement for inetd with many enhancements
16.1.5.1. tftpd
16.1.6. Scheduled Tasks
16.1.6.1. crontab - maintain crontab files for individual users
16.1.6.2. at, batch, atq, atrm - queue, examine or delete jobs for later execution
16.1.7. sv - control and manage services monitored by runsv
16.1.7.1. runsv
16.1.7.2. runsvdir
16.2. Services
16.2.1. systemctl
16.2.1.1. rc.local
16.2.1.2. is-enabled 查看当前服务的启用状态
16.2.1.3. 重载 systemd
16.2.1.4. 列出启动失败的服务
16.2.1.5. list-units
16.2.2. service
16.2.2.1. chkconfig
16.2.3. xinetd.d
16.2.3.1. tftpd
16.2.3.1.1. atftp-server
16.2.3.2. rsync
16.2.3.3. rshd
16.2.4. rpcinfo
16.2.5. SELINUX
17. Process
17.1. top - display Linux tasks
17.2. ps - report a snapshot of the current processes
17.2.1. ps axef
17.2.2. ps -eo pid,cmd
17.2.3. ps jax
17.2.4. zombie process
17.3. mpstat
17.4. pstree - display a tree of processes
17.5. pid
17.5.1. pgrep, pkill - look up or signal processes based on name and other attributes
17.5.2. pidof -- find the process ID of a running program.
17.6. jobs
17.6.1. &
17.6.2. Ctrl + Z
17.6.3. jobs
17.6.4. fg / bg
17.6.5. nohup - run a command immune to hangups, with output to a non-tty
17.7. ionice - get/set program io scheduling class and priority
17.8. /proc 目录与进程的关系
17.8.1. /proc/*/fd/ 进程所打开的文件
18. Permission
18.1. User
18.1.1. Add a new user
18.1.2. remove an existed user
18.1.3. usermod - modify a user account
18.1.4. lock / unlock
18.1.4.1. /etc/passwd
18.2. Group
18.2.1. Add a new group
18.2.2. Add a user to the group
18.2.3. /etc/group
18.3. umask
18.4. Access Permissions
18.4.1. chown - change file owner and group
18.4.2. chgrp - change group ownership
18.4.3. chmod - change file access permissions
18.5. chattr - change file attributes on a Linux second extended file system
18.6. su - run a shell with substitute user and group IDs
18.7. runuser - run a command with substitute user and group ID
18.8. sudo, sudoedit - execute a command as another user
18.8.1. /etc/sudoers
18.8.2. /etc/sudoers
18.8.3. 设置示例
18.8.4. NOPASSWD
18.8.5. 允许或禁止命令
18.8.6. Cmnd_Alias 用法
18.8.7. wheel 组
18.8.8. 注意事项
18.9. ACL - Access Control List
18.9.1. getfacl - get file access control lists
18.9.2. setfacl - set file access control lists
18.9.2.1. set
18.9.2.2. default
18.9.2.3. remove
18.9.2.4. backup and restore
19. /etc
19.1. /etc/inputrc
19.2. /etc/shells
20. kickstart
20.1. install kickstart
20.2. ks.cfg
20.3. boot 参数
21. System Utilities 配置工具
21.1. CentOS 6
21.1.1. system-config-date
21.1.2. system-config-firewall
21.1.3. system-config-securitylevel
21.1.4. system-config-language
21.1.5. system-config-keyboard
21.1.6. system-config-network
21.1.7. ntsysv
21.1.8. lokkit
21.1.9. system-config-kdump
21.1.10. system-config-services
21.1.11. authconfig-tui
22. crontab
22.1. /etc/crontab