260 likes | 392 Views
Unix/Linux basics 0000. Operating systems lab Gergely Windisch windisch.gergely@nik.bmf.hu room 4.12 http://nik.bmf.hu/gwindisch/os_2010. About the class - organization. 1 4 weeks - 4 hours / week Tuesdays from 15:20 to 18:40 Attendance is not optional ( surprise , surprise )
E N D
Unix/Linux basics 0000 Operating systems lab Gergely Windisch windisch.gergely@nik.bmf.hu room 4.12 http://nik.bmf.hu/gwindisch/os_2010
About the class - organization • 14 weeks - 4 hours / week • Tuesdaysfrom 15:20 to 18:40 • Attendance is notoptional (surprise, surprise) • exceptforthe 6th of April • and whensomeonereallydoesnotwanttocome • Grading • homework - necessaryfortakingtheexam • exam - grade is givenbasedonthescore
About the class - topics • We are going to cover • linux basics • commands • files, directories • permissions • user management • program installation • shell scripting • GUI • services • for details, see unixclass.doc
Project assignment • The studentsshouldcreate a smallinfrastructureconsisting of atleastthreemachines • The goal is tohave an application server and a separatedatabase server setup, and thenusetheclienttoinstall a service totheapplication server.
Project assignment • Threemachines • Client (anydesktoplinuxorunixwilldo) • Application server (web orsomethinglikethat) • Database server • Application server • Shouldservestatic and dynamiccontent - apache, php etc. • installsome freeware php application - wiki, cms, forumengine, blog, joomla, drupal - yourchoice • needsto be accessiblevia ftp fromtheclientmachine • Database server • shouldrun *sql (my~, pl~, postgre~) • willserveallthedatafortheapplication server • needstohave ftp access • needstohave a firewallthatrejectsdirectaccessfromeverymachineexceptfortheapplication server • The servers should be consoleonly (no GUI) • Alltheoperatingsystemsneedto be different, atleastoneneedstobeunix • Forexample: Fedorafortheclient, opensolarisfortheapp server, Solarisforthe DB
Project assignment • What to hand in • The virtual machines (DVD, USB stick, whatever) • Documentation • 3-5 pages • summary of the systems, usernames and passwords • screenshots from the working systems • description of the problems you have ran into (if any) • Important dates • 23th of February - list of the systems to be used • 4th of May - due date
Unix - the beginning • Operációs rendszer • 1969 - Bell laboratories • Ken Thompson, Dennis Ritchie, Brian Kernighan (and many others)
Unix systems • Single UNIX Specification - defines what needs to achieved to be called Unix • IBM AIX (6.1 - 2007 November) • HP-UX (HP-UX 11i v3 Update 4 - 2009 April) • Mac OS X (v10.5) • Sun Solaris (now called Oracle) (10 5/09 - 2009 May)
Unix-like system • Systems without SUS certification can only be called Unix like • BSD (Net-, Free-, Open-) • Linux (Debian, Slackware, Gentoo, Ubuntu stb.)
Solaris • Why Unix? (and not windows) • oh please… • Why Unix? (and not Linux) • Stability, advanced technologies, reliability, plannability (eg. zfs, DTrace) • Why Solaris? • The only one that runs on Intel architecture :) • Solaris 10 vs. OpenSolaris • http://www.sun.com/software/solaris/
Solaris vs OpenSolaris • Solaris 10: • Closed development • Stable • Enterprise level support • CDE graphical interface • OpenSolaris • Developed since 2005 - open soure • "test bed" of Solaris
OpenSolaris • Sourcecode • Community • Distribution
Other OpenSolaris distributions • SXCE (SOlaris Express COmmunityEdition) - The originalOpenSolarisdistributions, made by Sun (now Oracle) • Schillix - thefirst. http://schillix.berlios.de/ • Belenix - interesting, it has more GUIs, notjustgnome. http://www.belenix.org/ • NexentaCore - CrossbetweenUbuntu and OpenSolaris. Has allthe GNU tools, apt-getpackage management, usestheubunturepositoryinstall software. • keresztezése. Benne van a teljes GNU eszközkészlet, apt-get csomagkezelő, az ubunturepositoryt használja a telepítéshez.Italso has zfs, is abletocreatesnapshotsmakingiteasytorestorethepreviousstatesafter an upgrade that has gonebadly • MilaX: Nicelittledistribution. Aimsforlightness. http://milax.org
Unix history • It was created around the 70’s for mini computers. It has spread to the mainframes, workstations and then to personal computers • Simplicity was always an aim • The kernel was written in C (almost from the beginning) -> new • The many flavors of Unix and the incompatiblity that came with it is still around • Multiple unix versions: good, because competition enhancesthere is no one accepted solution (incompatiblity) • Standardization work, multiple standards (the important is „what”, not „how”) • Commercially avalable Unix versions: Sun/Solaris, HP/HP-UX, IBM/AIX • Interesting: Mac OS X (BSD based) Multiuser, multitask operting system
Linux • Born in 1991– Linus Torvalds – x86 • Started life as a terminal app for minix • Nowdays an alternative to Unix and Windows systems • Linux is not Unix, but similar • Unix like in appearance and programming API, different under the hood • The kernel is not held by one company but is developed by the community (with centralized management - Linus) • The code base is developed by the community • Wide spectrum of supported hardware architectures • There are some pioneer solutions, but there are also some weak spots compared to the „big” Unix versions (thread management in the 2.4 kernels for example)
Linux - distributions • Linux distributions • „A Linux distribution (also called GNU/Linux by some vendors and users) is a member of the family of Unix-like software distributions built on top of the Linux kernel. Such distributions (often called distros for short) consist of a large collection of software applications such as word processors, spreadsheets, media players and database applications. The operating system will consist of the Linux kernel and, usually, a set of libraries and utilities from the GNU project, with graphics support from the X Window System. „ - Wikipedia • http://upload.wikimedia.org/wikipedia/commons/8/8c/Gldt.svg
Linux – distros (cont’d) • Even more colorful than unix • free and commercial as well • Most important commercial versions: RedHat and Suse • Free versions: Debian and co. (debian based), Fedora (RedHat based) and openSuse • Live CD try without installation • Knoppix: http://www.knoppix.org/ (Debian GNU/Linux) • Demolinux: http://www.demolinux.org/ (Mandrake) • More at: http://en.wikipedia.org/wiki/Live_CD
Useful links • http://www.hup.hu – Hungarian Unix Portal • Only in hungarian for those of you who are interesten in the language • http://www.kernel.org – Place of the linux kernel • http://www.distrowatch.com – home of practically all the distributions
Where can I practice? • Downloading linux: • www.ubuntu.com, www.debian.org, www.slackware.com, www.suse.de, en.opensuse.org, www.distrowatch.com • VMWARE pre-built images:http://www.vmware.com/vmtn/appliances/directory/cat/45
Where can I get help? • Everywhere! • The Hungarian Unix Portal:http://hup.hu (again, for the eager minded) • Linux Knowledge Base and Tutorial: http://www.linux-tutorial.info • http://en.wikipedia.org/wiki/Linux • Linux Shell Scripting Tutorial:http://www.freeos.com/guides/lsst/ • http://www.google.com
The graphical world… • Distributions • RedHat (www.redhat.com) • Ubuntu (www.ubuntu.com) • Debian (www.debian.org) • Slackware (www.slackware.com) • Mandriva (www.mandriva.com) • Suse (opensuse.org) • Let’s look at some of them
Linux basics • Linux is like Unix – API and the command line is unix compatible • As far as we get into the subject, all the distros are the same • Makes no difference which one we install
Linux basics (cont’d) • Multiuser: we do not rule the whole machine – just one session (many concurrent users) • Authentication before being able to do anything – user + password • System access is restricted – we can only modify those to which we have the permissions • Simple users cannot change (break) the system (for that would affect others)!
Because of the multiuser environment, linux is somewhat different to other pc operating systems: one machine, multiple terminals. Still apparent today: virtual console • Text based mode (shell) and graphical interface (X) • GUI is spreading like mushroom after the rainy season - but the main interface for setting the system up is still the console. • Terminal access via TCP/IP, earlier it was via RS-232 (serial port) • In a PC based desktop solution the machine and the view isn’t separated, however it is still separated underneath (modularity)
root user • Every OS needs a superuser who can access everything, set things up • In Unix, the role is called root. Root has total control over the machine • There can only be one root, it’s task cannot be given to multiple users • Possible solutions: • sudo, RBAC (hasn’t really caught on) • Security Enhanced Linux
Install'em • We will be using Vmware workstation • Player, server works just as well • New virtual machine • choose type • specify hardware • specify install media • We have a whole bunch, try them all