Linux Partitions - gozips.uakron.edu

Download Report

Transcript Linux Partitions - gozips.uakron.edu

2440: 141
Web Site Administration
Server Installation
Instructor: Joseph Nattey
Prepare the Server for Installation
 Before you install the OS on your server, you need to
perform a variety of tasks to prepare for the installation.
 Make sure all of your hardware components are compatible
with the OS before you start installing
 You should also document your findings for future reference.
Server Installation
2
Prepare the Server for Installation
 Although there are few problems with hardware compatibility if you
pick a server from a major manufacturer, you have to check for
compatibility for Windows or Unix/Linux.
 You can have problems upgrading old servers because sometimes
they had components such as RAID controllers that are not supported
anymore.
Server Installation
3
Prepare the Server for Installation
 A typical installation is from CD
 Production systems use a single-boot system meaning only
one OS is on a computer
 You can put all described OSs on a single computer which is a
multi-boot
4
Prepare the Server for Installation
 Production systems only have a single operating system on a hard
drive
 but in development environments and in student labs, often a single hard drive
has multiple operating systems that you can select when you start the
computer.
 Educational or training systems usually use multi-boot systems
 Multi-booting is the act of installing multiple operating systems on
a computer, and being able to choose which one to boot when
starting the computer.
Server Installation
5
Prepare the Server for Installation…
 To install two OS on one hard disk, you need to plan the installations carefully
 Most OSs are designed to control the master boot record (MBR)
 The Master Boot Record (MBR) is the information in the first sector of any hard
disk that identifies how and where an operating system is located so that it can
be boot(loaded) into the computer's main storage or random access memory.
 The MBR also holds the information on how the logical partitions, containing file
systems, are organized on that medium.
 When you turn on a multi-boot computer, a menu appears listing the operating
systems available on the computer; you then select which one you want to use.
Server Installation
6
Prepare the Server for Installation…
 Linux has a few bootloaders to choose from.
 Usually, Linux administrators leave the distro's default bootloader
installed.
 The bootloader starts an operating system or another bootloader (this
is called Chainloading).
 Chainloading is usually used when a computer has many installed
operating systems (multi-booting) and the primary bootloader cannot
initiate one or more of the operating systems.
 For instance, some of the Linux bootloaders cannot boot-up Windows.
 Instead, these bootloaders start another bootloader that can handle
Windows or some other system.
Server Installation
7
Prepare the Server for Installation…
 Linux uses either the GRUB or LILO boot loaders




LILO (LInux LOader) was once the default bootloader for many Linux
distributions before GRUB (another bootloader) became popular.
The advantages LILO has over many bootloaders is it is not filesystem
specific.
This means that the operating system can exist on any filesystem (NTFS,
EXT4, BTRFS, FAT32, HFS+, UFS, JFS, etc.) and it will still be initiated.
LILO can handle up to sixteen operating systems.
Server Installation
8
Prepare the Server for Installation…
 GRUB (GRand Unified Boot Loader) –

is a boot loader package developed to support multiple operating systems
Grub has a graphical interface where a user can select, the desired
operating system from the menu.

Supports booting from a network

GRUB is written in Assembly and C.

Server Installation
9
Prepare the Server for Installation…
 For multi-boot systems, you may want to install
Windows first before Linux
 The Linux boot method will allow both operating systems to
coexist on the same hard disk
Server Installation
10
Checking Hardware Compatibility
 Typically there are fewer problems when using hardware
designed for a server from major manufacturers
 Make sure the latest drivers for SCSI (Small Computer System Interface) and
RAID controllers are available
 Today’s Linux distributions include virtually all the current video
drivers
 With video adapters and NICs, it is best to use ones from major
vendors
Server Installation
11
System Documentation
(ksa)
 Documentation would have to be amongst the most despised word in the IT
industry.
 If you ask most people, they would dive into a situation head first and deal
with the consequences as they arise.
 But reality is, it is a very useful document.
 Some major forms of documentation include:







Requirements Documents.
Hardware and Software Registers.
Technical Software Specifications.
Network Documentation.
User and Systems Help Files.
Practice Rules and Procedures.
Risk Management Procedures.
Server Installation
12
System Documentation
(ksa)
 The key to good documentation is that it is clear and concise, so that
anybody other than the author can pick it up and understand it easily.
 Should be detailed enough for inexperienced network administrator
to be able to reinstall and configure the server.
 System documentation is an ongoing process
 Changes occur over the life of the server
 Because systems change over time, the system documentation should
change also.
 Often, the documentation is started when a new system is installed
but then nobody updates it.
 Need compatibility information
Server Installation
13
System Documentation…
(ksa)
 You need a variety of hardware information such as:
 Server manufacturer, including model information
 Processor type and speed
 Amount of RAM
 Drive interface – RAID, SCSI, IDE
 Hard disk – size, manufacturer, and model
 NIC manufacturer and model
Server Installation
14
System Documentation…
(ksa)
 Other system information include:
 Partition information – number and sizes
 Operating system version installed
 Latest software patches - in Windows they are called service packs
 Where to get latest drivers
 URLs for latest drivers
Server Installation
15
System Documentation…
(ksa)
 Include steps for installation including options chosen
 this is so if someone needs to rebuild the server, they can do it more easily.
 Keep documentation, CDs, drivers in a binder, also keep electronic version of
documentation
 You should know all the support details including
 Who to call
 Contact phone number
 Type of support contract
 Expiration of contract
 Remember that if your support guarantees a response in 24 hours
 it may just mean that they will show up within 24 hours to take a look at it.
 They might have to order a motherboard that could take a few days.
Server Installation
16
The Installation Process
 As you go through the setup process the program will ask you
questions about your configuration.
 You need to know the answers to these questions before you start
 Many of the questions are common to all operating systems
Server Installation
17
The Installation Process…
 Partitioning the Hard Disk:
 A partition is a logical division of the hard disk
 On Windows systems, you may create a primary partition and an
extended partition


Primary partition – where a system boots from
Extended partition – where more drives are added

Gives you more logical drives in Windows
 It is best to isolate the operating system from applications
 Because if the application partition fills the hard disk and the operating
system is on the same partition, the OS stops
Server Installation
18
The Installation Process…
 Linux Partitions:
 The concept of dividing the hard disk into more than one
partition in Linux is the same as it is for Windows.
Partition
Purpose
 Six partitions are usedThefor
byis where
default
defaultLinux
root partition
all of the system files are stored. You will
usually find /etc, /lib, and other important system directories under this partition.

/
(root
partition)
/
When installing a Linux distribution, the root partition is required. - See more at:
http://www.serverschool.com/dedicated-servers/linux-server-partition swap (used for virtualintroduction/#sthash.ERM7BVK3.dpuf
memory)
This is where spool directories such as those for mail and printing go. In
 /boot (boot files – small)
/var
addition, it contains the error log directory.

/usr
(shared
files
and
programs)
/tmp
This
is where most temporary data files stored by apps.
/boot
is where your kernel images and boot loader configuration go.
 /home (user files and This
programs)
/home
This is where users home directories go.
 /var (Web site, FTP, log
Thisfiles)
is where most executable binaries, the kernel source tree and much
/usr
swap
documentation go.
 Just / and swap are required
Virtual memory is stored in the swap partition. Similar to Windows, the swap
partition allows the system to simulate memory when the RAM is full. Unlike
Windows, which uses a single file, Linux uses a separate partition that can hold
numerous files. Usually, the swap partition will be as large as the amount of RAM.
Server Installation
19
On systems with large amounts of RAM, swap may rarely be used.
The Installation Process…
 Linux Partitions:
 For a Web server installation, however you need more space in
the var partition and less space in the home and user
directories.
 As you go through the installation, text boxes will offer the
default partition sizes.
 You can easily change the sizes to whatever is appropriate for
your environment.
Server Installation
20
Managing Multiple Operating Systems on a Single Computer
 Having multiple OSs on a single computer can be useful
for development and training purposes
 Usually, it is best to start with un-partitioned hard disk.
 For simplicity, just create one partition for each Windows
OS, and then let Linux create the default partitions.
 You need to install Windows operating systems first
 because Linux recognizes the Windows operating systems
 and creates a menu so when you start the computer
 you can pick Linux or the Windows OSs
Server Installation
21
The Installation Process…
 Naming Computers:
 Computer names (called host names in Linux networks)
identify computers on a network.
 Windows communicates the computer name to other
computers on the subnet so it should be unique
 Name of computer is not related to how the computer is
recognized on the Internet
 In Linux, the hostname can exist on more than one
computer

because it only uses IP addresses for communication
Server Installation
22
The Installation Process…
(ksa)
 Software Licensing:
 A software license is a legally binding agreement that
specifies the terms of use for an application
 defines the rights of the software producer and of the end-user.
 All software must be legally licensed before it may be installed.
 Under United States copyright law all software is copyright
protected, in source code as also object code form.
Server Installation
23
The Installation Process…
(ksa)
 Software Licensing:
 Describes how the software can be used



For Windows, usually each installation must be activated by
Microsoft
Only one server can be activated for each license so this should
eliminate piracy by organizations.
Linux is basically free but there may be a cost for packaging,
support, and extras
 Based on the general public license which allows for not only
free access to the OS, but to the source code too.
Server Installation
24
The Installation Process…
 Selecting a File System:
 A file system determines how files are stored on a hard disk
 Some Windows file systems include:
 NTFS (New Technology Files System) has security which is critical for a server
 FAT (File Allocation Table) based on the original DOS file system and has no
security
 Some Linux file systems include:
 ext4, ext3, ext2
 JFS (Journaled File System )- was developed by IBM in 1990 and later ported to
Linux. It boasts low CPU usage and good performance for both large and
small files.
Server Installation
25
Basic Linux Concepts
 The top level directory is known as “root (/)”.
 Devices may be mounted before usage
 Devices may also be un-mounted before removing them to
flush the file buffer if files were copied to them
Server Installation
26
Special Files
 /home - all users’ home directories are stored here
 /bin, /usr/bin - system commands
 /sbin, /usr/sbin - commands used by sysadmins
 /etc - all sorts of configuration files
 /var - logs, spool directories etc.
 /dev - device files
 /proc - special system files
Server Installation
27
Linux Shell Prompt
 Shell – the command-line interface
 An interface between the Linux system and the user
 Examples are:
 sh Bourne shell - the original
 csh C shell - compatible with Bourne shell
 bash Bourne again shell - most common on Linux
 tcsh The enhanced C shell
 zsh Z shell - new, compatible with Bourne shell
 ksh Korn shell - most popular UNIX shell
Server Installation
28
Linux Shell Prompt
 Most work is done on Linux at the shell prompt
using commands such as the following:
Linux Shell Command
exit
kill/killall
cd
ls
mkdir
rm
rm -r
mv
cp
find/locate
useradd
clear
ifconfig
chmod
cmp
Server Installation
Windows Equivalent
exit
kill/pskill
cd
dir
md
del/erase
deltree
move
copy/xcopy/mv
find
addusers
cls
ipconfig
icacls/xcacls
comp
29
Configuring TCP/IP on Linux
 To determine TCP/IP configuration in Linux, type
ifconfig at a shell prompt
Server Installation
30
Configuring TCP/IP on Windows
 To determine TCP/IP configuration in Windows, type
ipconfig at a command prompt
Server Installation
31