Download - Linux 操作系统 简介
![Page 1: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/1.jpg)
Acegene IT Co. Ltd. 1
Linux 操作系统 简介 周炯周炯
上海艾基信息技术有限公司上海艾基信息技术有限公司
![Page 2: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/2.jpg)
Acegene IT Co. Ltd. 2
内容提要• Linux 简介• Linux 的安装• SHELL 及常用程序• 文件编辑器 vi• 目录和文件管理• 文件系统管理• 用户管理
• 网络管理• 网络文件系统• 模块安装和配置• 系统管理 • 系统优化• 开发工具• Internet 管理
![Page 3: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/3.jpg)
Acegene IT Co. Ltd. 3
Linux—— 简介 • Linux 操作系统是可以运行在许多不同类型的计算机上的一种操作系统的“内核”。它是提供命令行或者程序与计算机硬件之间接口的软件的核心部分。 Linux 操作系统内核管理以下事情:比如内存、采用什么方法以及在什么时候打开或者关闭文件、哪一个进程或者程序可以获得计算机的中央处理单元 (CPU) 等等。• Linux 操作系统可以说是 UNIX 操作系统的一个克隆体,它最初是在 1991 年 10 月 5 日由它的作者Linus Torvalds 于赫尔辛基大学发布的。
![Page 4: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/4.jpg)
Acegene IT Co. Ltd. 4
Linux 功能• 所有主要的网络协议• 硬盘配额支持• 全部的源代码• 国际化的字体和键盘• 作业控制• 数学协处理器仿真• 内存保护• 多平台
• 多处理器• 多用户• 多任务• 共享的库文件• 支持多种文件系统• 虚拟控制台• 虚拟内存• 其他更多功能
![Page 5: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/5.jpg)
Acegene IT Co. Ltd. 5
GPL 和 Free• Linux 操作系统遵从 GNU 公共许可证( GNU Public License ,简称 GPL )的规定。• Linux 对外的一个重要的特点就是” Free” ,自由和免费。
![Page 6: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/6.jpg)
Acegene IT Co. Ltd. 6
What is Linux?• Linux is an operating system with the
following attributes:– Multi-user– Multi-tasking– Virtual memory system– X-Windows– Compatible with the IEEE POSIX.1
standard– Non-proprietary source code– Source code is available
![Page 7: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/7.jpg)
Acegene IT Co. Ltd. 7
Is Linux the same as UNIX?• The command set is similar• They work the same• They look the same• Linux cannot use the UNIX trademark• Linux is essentially UNIX
![Page 8: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/8.jpg)
Acegene IT Co. Ltd. 8
Is Linux a real OS?• Yes, absolutely• Linux is used
– In mission critical applications– Around the world
• There are many flavors of Linux available– We call them: Distributions
![Page 9: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/9.jpg)
Acegene IT Co. Ltd. 9
Linux 发行版本的概念• 大多数的 Linux 操作系统的发行版本都使用标准的 Linux 内核,但有时候也会稍微加以修改,这个操作系统现在的规模已经变得相当庞大了,因此许多人更愿意购买一张它的 CD-ROM光盘。每一种发行版本彼此之间都稍微有一些差异,这些差异主要表现在它们各自的安装程序包上,还表现在安全性与可用性等方面侧重点的不同。把系统内核、附带的工具程序及应用软件包等等打包在一起,这样组成的一个 Linux 操作系统的集合体就是我们说的某一种发行版本。
![Page 10: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/10.jpg)
Acegene IT Co. Ltd. 10
谁使用 Linux 操作系统• Linux正在逐渐赢得普通用户的青睐。但是它仍然不是一个适用于普通大众的操作系统。对那些习惯了当今鼠标界面操作系统的人们来说, 学习仍是很困难的。需要学习一大套从未接触过的命令,还需要学习与长期形成的概念不相同的那些对待与处理事情的方法。对那些具有 UNIX 操作系统使用经验的人们来说, Linux 可是容易多了。• 专业用户、系统管理员和计算机开发人员通常都会比一般的用户更容易掌握 Linux 操作系统。但就是对这些人来说,这方面的学习与实践也需要有足够的耐心与专心。
![Page 11: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/11.jpg)
Acegene IT Co. Ltd. 11
Enterprise vs. Retail• Retail distributions
– Faster release cycles (4-6 months)– Geared for home/productivity users– Shorter support lifetimes– Examples: RHL9, SuSE Linux 9
• Enterprise level distributions– Slower release cycles (12-18 months)– Longer support lifetimes (3-5 years)– Examples: RHEL3/4, SLES9– Adds performance and scalability enhancements
![Page 12: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/12.jpg)
Linux Distribution Overview• The core parts of a Linux system are:
– Linux kernel– User space utilities and applications
• The kernel and user space programs together make up the complete operating system
![Page 13: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/13.jpg)
Linux Kernel• Core component of the operating system
– Configurable and tunable– Provides main OS functions
• I/O, disk, network, etc.• CPU Scheduling•Memory management
• uname -r shows the kernel version number:# uname -r2.4.9-e.25
![Page 14: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/14.jpg)
Acegene IT Co. Ltd. 14
Kernel concepts• Linux is based on a modular non-
microkernel architecture– All device drivers share the same
memory with the kernel– Device drivers are modular and can be
loaded/unloaded dynamically• Linux is multi-tasking• Linux is a virtual-memory OS• Most kernel parameters can be
modified on the fly
![Page 15: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/15.jpg)
• All components of the operating system are delivered via RPM packages– Kernel– System utilities– Applications
• Both Red Hat and SLES8 distributions use the RPM Package Manager (RPM)– Originally named “Red Hat Package Manager”
Software Packages
![Page 16: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/16.jpg)
Linux Updates• Apply the recommended updates by the distribution vendor:
– Most vendors provide automatic updates•Red Hat Network supplies updates automatically
– up2date
• SuSE uses– YaST2 (Yet Another Setup Tool 2)– you (YaST Online Update)
![Page 17: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/17.jpg)
Linux Enterprise Features• Linux enterprise features support :
– Performance– Scalability– Reliability
![Page 18: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/18.jpg)
Acegene IT Co. Ltd. 18
Symmetric Multiprocessing• Fully multiprocessor capable (SMP)
– RHEL3: 16 processors– SLES8: 32 processors– Uniprocessor configuration supported on both
• Intel Hyperthreading (HT) enabled on IA-32– Physical-to-logical CPU affinity scheduling
![Page 19: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/19.jpg)
Acegene IT Co. Ltd. 19
Improved Memory Utilization• Use more than 4GB of RAM on IA-32
– RHEL 2.1: max 16GB supported– RHEL3: max 64GB supported– SLES8: up to 64GB supported– Some older drivers not capable of accessing
more than 4GB of RAM• May perform “bounce buffering” to compensate• Usually not a concern for enterprise-class drivers
• Kernel memory used more efficiently than before
• Run more processes without swapping
![Page 20: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/20.jpg)
Acegene IT Co. Ltd. 20
Virtual Memory• Each process has a private address space
– Keeps private data in memory secure– Prevents inter-process data corruption– Contiguous view of memory
• Demand-based paging– Pages are “swapped” out when low on RAM– Pages are “swapped” in when accessed again
• Allows the system to use more memory than any single space can address
![Page 21: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/21.jpg)
Virtual Filesystem (VFS)• Linux supports multiple file systems
– OS is file system independent– Multiple file systems can be used simultaneously
• Cross-platform compatibility• Performance
• VFS provides a single filesystem interface
![Page 22: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/22.jpg)
Acegene IT Co. Ltd. 22
Filesystems• Important ones to know:
– ext2/3 - Red Hat default (ext3)– reiserfs - SLES8 default– NFS - Network Filesystem– Procfs - kernel virtual filesystem– ISO 9660 (CD-ROM)– OCFS - Oracle Cluster Filesystem
• ext2/3 and reiserfs are the most common• Use OCFS instead of raw devices in RAC
![Page 23: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/23.jpg)
Acegene IT Co. Ltd. 23
Filesystem Cache• Buffers all filesystem I/O
– All filesystem I/O is copied to/from cache buffers– By default, writes are not immediately flushed
• Hardware I/O is deferred– Reads benefit from previous accesses as well as automatic read-ahead
• May not need to perform a real hardware I/O• Made up of page cache and buffer cache
– Page cache tends to be more heavily used• Reduced automatically when low on RAM
![Page 24: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/24.jpg)
Acegene IT Co. Ltd. 24
Process Disk file
Write
Read
Raw Devices• Have traditionally been considered the high performance solution
– Bypasses the filesystem buffer cache– Moves larger buffers than file system I/Os
• Requires more experienced administration
![Page 25: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/25.jpg)
Acegene IT Co. Ltd. 25
Modular Drivers• Loadable kernel modules (LKM)• Can be unloaded/reloaded without
rebooting• Modules provide:
– Device drivers– File system drivers– System calls– Network drivers– Executable interpreters– Terminal device (TTY) drivers
![Page 26: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/26.jpg)
I/O Modes• Disk I/O can be performed in several
different modes– Asynchronous vs. synchronous – Direct vs. buffered
Process Buffer cache Disk file
Write Flush
![Page 27: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/27.jpg)
Acegene IT Co. Ltd. 27
Storage Infrastructure• Direct-attached storage (DAS)
– IDE, SCSI– e.g., LSI Megaraid
• Network-Attached Storage (NAS)– NFS– e.g., Network Appliance Filer
• Storage Area Networks (SAN)– FibreChannel– e.g., EMC Clariion
![Page 28: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/28.jpg)
Acegene IT Co. Ltd. 28
Linux Clusters• Scalable Shared Storage
– SCSI, SAN (FibreChannel), Firewire (devel.)•Must use raw devices or OCFS
– Network Attached Storage (NFS)– LVM and software RAID (“md”) not cluster-aware
• Linux includes cluster management software
![Page 29: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/29.jpg)
Acegene IT Co. Ltd. 29
Linux Kernel Enhancements• Performance
– Asynchronous I/O– Eliminate kernel locks– Large SGA: > 4 GB– Support more Oracle users
• Stability– Graceful degradation under load
• Manageability– (Remote) Crash Dump Facility– Configuration scripts
![Page 30: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/30.jpg)
Acegene IT Co. Ltd. 32
Summary• Linux is
– An open-source fully featured operating system
– Being adopted in the enterprise arena today
![Page 31: Linux 操作系统 简介](https://reader033.vdocuments.site/reader033/viewer/2022061511/568137e7550346895d9f95bd/html5/thumbnails/31.jpg)
Acegene IT Co. Ltd.
AQ&Q U E S T I O N SQ U E S T I O N SA N S W E R SA N S W E R S