Linux System Configuration and Administration Lecture 6 Linux
- Slides: 48
Linux System Configuration and Administration Lecture 6: Linux Configuration and Administration 1
Organization of the Talk Installation of Linux n System Configuration n ¨ Network configuration ¨ Sharing with Windows ¨ Printer Configuration ¨ Some security configuration n Administrations ¨ User Management ¨ User home pages 2
Installing Linux: Where do you start n Is Your Hardware Compatible? ¨ http: //hardware. redhat. com/hcl/ n Do You Have Enough Disk Space? ¨ You have to decide, remove any virus if required, use fips n Can You Install Using the CD-ROM? ¨ Your BIOS may need to be changed to boot from your CD-ROM n Alternative Boot Methods ¨ Boot Diskette ¨ Driver Diskettes n Network Device Drivers Diskette 3
Gather more info n Use ‘other’ OS to know more ¨ Personal Desktop Installations n Learning About Your Hardware with Windows 4
Graphical Installation n The Graphical Installation Program User Interface (text mode is also available) ¨ n Choose the language, keyboard and mouse Choose upgrade or new installation ¨ Better to choose fresh installation 5
Installation of Linux… • Choose personal desktop installation For the first, but next time you bet on Custom • After all Linux is knowing more Choose partition 6
Installation of Linux… • Configure the partition: • Set the mount point • Set the SWAP size • Set the /boot space • Enable Ext 3 formatting 7
Installation of Linux… Choose the boot loader Grub or Lilo • Configure the “Network Configuration” • DHCP, Firewall, IP address etc. . 8
Installation of Linux… Choose the “Root password” Accept the default package selection or customize using the “Customize option” 9
Installation of Linux… Installation starts and go on inserting the required CD when asked 10
Post Installation Create a boot diskette Configure your video card, monitor and screen resolution Reboot and start your Linux…. ! 11
System Configuration n The kickstart file is a simple text file, containing a list of items. It allows easy installation[2] and consistent configuration of new computer systems. n Kickstart Configurator ¨ Kickstart Configurator allows you to create a kickstart file using a graphical user interface, so that you do not have to remember the correct syntax of the file. ¨ To use Kickstart Configurator, you must be running the X Window System. To start Kickstart Configurator, select the Main Menu Button (on the Panel) => System Tools => Kickstart, or type the command /usr/sbin/redhat-config-kickstart. ¨ As you are creating a kickstart file, you can select File => Preview at any time to review your current selections. 12
System Configuration… n Network configuration • Networking can always be configured after installation with the Network Administration Tool (redhat-confignetwork). • For each Ethernet card on the system, click Add Network Device and select the network device and network type of the device. Select eth 0 as the network device for the first Ethernet card, select eth 1 for the second Ethernet card, and so on. 13
Printer Configuration n Menu=> Printing=> New Printer => choose the printer and printing tool (e. g. Post script printer) n Testing printer ¨ n Just do lpq to see printer status Lpr <filename> ¨ Should print the file 14
Printer Configuration n n n Useful Websites http: //www. webopedia. com/TERM/p/printer. html General denitions of printers and descriptions of printer types. http: //www. linuxprinting. org A database of documents about printing, along with a database of nearly 1000 printers compatible with Linux printing facilities. http: //www. cups. org/ Documentation, FAQs, and newsgroups about CUPS. http: //www. tldp. org/HOWTO/Printing. HOWTO/index. html The Linux Printing-HOWTO from the Linux Documentation Project. 15
User Security Authentication In the Authentication section, select whether to use shadow passwords and MD 5 encryption for user passwords. The Authentication Configuration options allow you to configure the following methods of authentication: NIS, LDAP, Kerberos 5, Hesiod, SMB, Name Switch Cache These methods are not enabled by default. To enable one or more of these methods, click the appropriate tab, click the checkbox next to Enable, and enter the appropriate information for the authentication method. 16
Network Security n Firewalls ¨ Choose between High, Medium, and Disabled security levels. 17
Network Security n Common Access control system ¨ /etc/hosts. allow ¨ /etc/hosts. deny ¨ /etc/hosts. equiv n For more info refer docs on iptable, firewall 18
Sharing With Windows n n n SMB protocol to share files and printers across a network connection. Operating systems that support this protocol include Microsoft Windows (through its Network Neighborhood), OS/2, and Linux. SMB implementation in Linux is called samba There are two things one can do ¨ Share your files/printer with other windows machine ¨ Access windows shared printer/files on linux 19
Allow Windows to share n You need to start samba server and nmb server ¨ /etc/rc. d/init. d/smb start n What ever you want to share is added in /etc/samba/smb. conf ¨ Every change in conf file require restarting of server n n Just browse OR find computer from windows to see these files/folders You can share folders, CD, printer 20
To access windows share n Smbclient is a samba client ¨ Smbclient –L myhost to see all share ¨ Smbclient \\myhost\myshare This will login to share and you can access the share n \\myhost\printer can be written to print files n n Smbmount can be used to mount (map) folders on to local host ¨ Smbumount to unmount n There are tools (GUI) for both sharing and accessing files 21
User Management 22
User Management Simple way to add user is adduser command n Passwd will allow to change the passwd n Of course there are host of GUI tools for all these user management n Group all common user to single group n Be careful while editing /etc/passwd n ¨ /etc/shadow passwd file may also exist 23
User Management n Common files to look at ¨ /etc/passwd ¨ /etc/group ¨ /etc/shadow ¨ /etc/samba/smbusers 24
Web server on Linux n Apache server is mostly available on Linux ¨ Rpm –q –all | grep apache to check n This can be started via init services ¨ /etc/rc. d/init. d/httpd start Configuration files are at /etc/httpd/conf/ n Normally log files at /var/log/httpd n 25
User home pages n Will allow user to have home pages ¨ http: //myhost. com/~user 1 n Need to edit /etc/httpd/conf/httpd. conf ¨ Enable User. Dir public_html ¨ Any user can have their page at public_html Eg. /home/user 1/public_html for user 1 n /home/user 2/public_html for user 2 n 26
System maintenance Using package manager ¨ Package Management Tool n Because people use their computers differently, users might want to install or remove packages after installation. The Package Management Tool allows users to perform these actions. ¨ RPM is good package management tool in Red. Hat Linux 27
System maintenance (redhat) n n The X Window System is required to run the Package Management Tool. To start the application, go to the Main Menu Button (on the Panel) => System Settings => Add/Remove Applications, Type the command redhat -config-packages at shell prompt. Command line tool rpm 28
Lost Root Passwd 29
Lost Root Passwd n If you have Lilo installed, type ¨ LILI: linux init 1 ¨ Change the root passwd, reboot aga n If you have installed grub ¨ Type ‘e’ to go to edit mode, add init end n 1 argument at the Boot with knoppix or single floppy linux ¨ Mount the disk and change root passwd ¨ Reboot !! 30
Cost Effective Linux Solutions n n You have PC, with less harddisk for dual OS You have PC, on which you do not want to install Linux ¨ Good heaven's do not do that n There is a spurt of Linux PC requirements for short duration of time ¨ For Linux LAB in one term OR during LAB examinations You have old PC, with out sizable hard disk So you need Linux host for all the above case n 31
Cost Effective Linux Solution n Some most easy approach ¨ Network booting ¨ Single CD Linux ¨ Single floppy Linux 32
Network Booting No need for harddisk(or harddisk with Linux) on every host n High level work flow n ¨ The system boots up, may be with floppy (could be with hard disk also) ¨ Sends dhcp request for IP number, gets one ¨ Mounts the root file system over NFS 33
Requirements for Network Booting Setup an LAN infrastructure n Need to setup nfs server n Need to setup dhcp server n Build a kernel image for network booting n 34
Setup an LAN infrastructure Ethernet Cable Your m/c to be booted Hub Ethernet Cable NFS server Your host, NFS server and DHCP server should be on same LAN 35
Setup nfs server • Edit /etc/exports file before starting the nfs server. / 10. 114. 7. 115(rw, no_root_squash) • This will export all files with root r/w to host 10. 114. 7. 115 • • • Save your exports file and from the prompt execute exportfs command Start the nfs server (nfs daemon) • E. g. /etc/rc. d/inid. d/nfs start 36
Setup dhcp server n Add in your /etc/dhcpd. conf before starting the dhcp server. n Set the correct MAC address in /etc/dhcpd. conf as follows: subnet <subnet address e. g. 10. 3. 31. 0> netmask 255. 0 { } subnet 10. 10. 0 netmask 255. 0 { host master { hardware Ethernet <Mac address of your Ethernet card>; fixed-address <IP address of your machine e. g. 10. 10. 1>; option root-path <your root path>”; } } n Save your /etc/dhcpd. conf file n start the dhcpd dameon by “/etc/rc. d/init. d/dhcpd start” command 37
Build a kernel image for network booting n Linux Kernel compilation steps: ¨ Assumptions: machine x 86 (i 386); boot loader lilo. ¨ Get plain vanilla kernel from www. kernel. org ¨ Explode it into a directory (better if can do it in /usr/src/) => tar -zxvf linux 2. x. xx. tar. gz ¨ Optional: create a symbolic link ln -s linux-2. x. xx linux ¨ cd to linux directory ¨ cd /usr/src/linux or cd /usr/src/linux-2. x. xx ¨ Select the components support by make menuconfig or make xconfig - save the configuration n n ¨ Select IP: BOOTP support from Networking options In File system -> Network File System -> Select ¨ NFS File system support and ¨ Root file system on NFS Do n n Make dep bz. Image Make modules_install 38
Build a kernel image for network booting… Copy the /usr/src/linux/arch/i 386/boot/bz. Image to /boot n Do mkbootdisk with new kernel as argument n Optional take a coffee or tea break ? n 39
Putting all together. . n Make sure you are running dhcp server n Make sure you are running nfs server n On any PC that need Linux for temporary time ¨Boot with new floopy you just made ¨That’s it !!! 40
Knoppix Single CD Linux n n Knoppix is full Linux on a single CD Can be freely downloaded from www. knoppix. com Just make your PC to boot from CD, that is all required Your current software (OS) on your system will not be lost ¨ If there is less memory, you can create temporary swap on dos partation ¨ You can access dos partation 41
Knoppix more info n Hardware Requirements ¨ Minimum of 486 PC, 20 M ram for text mode, 90 M for graphics mode and 128 M for office suite ¨ Bootable CD drive + key board, mouse, multimedia n Software available ¨ 2. 4 kernel, standard drivers, development tools, Internet applications, multimedia applications ¨ Upto 2 GB worth software in total n How to load/install start ¨ Step 1 put the 'cd' in drive, switch on the power All the configuration is “auto” ¨ Step 2 Enjoy working on Linux n 42
Knoppix can be handy n The fact is you need not install Knoppix on harddisk ¨ So can be used in Demo of linux or software on Linux ¨ So you need extra Linux machine lab ? ? 2 minutes !! ¨ No extra space on harddisk on old PC's, just use knoppix ¨ Got a new laptop, just boot Linux on that in a jiffy 43
Knoppix in Emergency 44
Knoppix at emergency n Lost root passwd, boot knoppix, mount the harddisk, edit /mnt/etc/passwd, reboot old linux ¨ Can be dangerous, spurious user can do the same n Linux do not boot, boot with knoppix and recover the important files ¨ Best part is you also recover lost dos/windows files as well n You have screwed up your configuration ¨ Boot with knoppix and bring back to default 45
Single Floppy Linux n Similar to Knoppix, but over a floppy ¨ Will have much lesser applications ¨ Some distributions come with two or more floppy n Mu. Linux quite esay to use ¨ http: //mulinux. nevalabs. org/ n Coyote linux: mostly for network applications ¨ http: //www. coyotelinux. com/ 46
References n n Chetan Kumar S “Power Linux – Unleash the full potentials of Linux”, BIET, Davangere, Wipro Technologies http: //www. tldp. org/ (The Linux Documentation Project) : It contains a lots and lots of well documented and timely documents to learn and trouble shoot your Linux system (it’s free) ¨ n The Linux System Administrators' Guide ¨ ¨ n Michael Stutz It’s free and available at http: //www. tldp. org/guides. html The Linux Network Administrator's Guide, Second Edition ¨ ¨ n Lars Wirzenius, Joanna Oja, Stephen Stafford, and Alex Weeks It’s free and available at http: //www. tldp. org/guides. html The Linux Cookbook: Tips and Techniques for Everyday Use ¨ ¨ n http: //www. tldp. org/guides. html Olaf Kirch and Terry Dawson It’s free and available at http: //www. tldp. org/guides. html http: //www. redhat. com/docs/ 47
Thanks 48
- Linux operation and administration chapter 8
- Linux operations and administration
- Absolute vs relative configuration
- Chiral achiral
- Electron configuration vs noble gas configuration
- Difference between absolute and relative configuration
- 01:640:244 lecture notes - lecture 15: plat, idah, farad
- Suse linux administration
- Postfix mysql
- Linux lecture notes
- 디바이스 드라이버 구현
- Linux kernel linux security module m1
- Cs423
- Placement administration and support system
- Mitel 5000 hx
- Power system dynamics and stability lecture notes
- Power system dynamics and stability lecture notes
- Ramis registration
- System administration module
- Office administration system
- Network operating system administration
- System administration outsourcing
- Revenue administration management information system
- Suny central administration
- Plena voice alarm system configuration software
- Configuration management system pmp
- Cisco catalyst 2950 configuration
- Mail @ slidetodoc.com
- Operating systems lecture notes
- Power system analysis lecture notes
- Uphcp
- Lymphatic system outline
- Open closed and isolated systems
- Digestive system circulatory system and respiratory system
- Linux principles
- Operating system
- Shrijana singh
- Linux operating system concepts
- Linux on z systems
- Xinetd vs inetd
- Linux system v
- Os ticketing system
- Unix sort reverse
- Linux operating system security features
- Linux file system structure
- Os utilities
- Components of linux
- Linux on system z
- Factors affecting wages and salary administration