290 likes | 370 Views
Getting Going with Linux. An Introduction by the RSC West Midlands and some friends. Getting Going with Linux. Ed Beddows – Kidderminster College Peter Harrison & Neil King – Cannock Chase Technical College Andy Morris – RSC West Midlands. By the end of the day, you’ll understand this.
E N D
Getting Going with Linux An Introduction by the RSC West Midlands and some friends
Getting Going with Linux • Ed Beddows – Kidderminster College • Peter Harrison & Neil King – Cannock Chase Technical College • Andy Morris – RSC West Midlands
Linux and what it is (Andy) • The Kernel - created by Linus Torvalds. • Rest of the OS is through GNU licences hence GNU/Linux; that is, the rest of the software is Open Source but released under the terms of the GNU license agreement. Distributions put various combinations together to form an “Operating System”. • Free software – but watch for costs ! • Runs efficiently on Intel hardware – opportunity to run on old kit. Also on other processors e.g. phones, AS/400 • Read this article for more: http://www.linuxiso.org/viewdoc.php/introtolinux.html
Why use Linux? • Cost • Hosting • Hardware requirements are less • Embedded systems • OS X is BSD based (which is UNIX) • Flexibility • Reliable
Getting hold of the software • Lots of “Distributions” – groups of people putting packages together to form an OS • Debian and Fedora • Have a look at: http://www.linuxiso.org/finddistro.php but! http://www.mirror.ac.uk/platform/linux/ is faster as its on JANET! • Exercise: Select and choose one of these and download it to your PC
How to make ISO disks • Using Nero on your XP machine • DEMONSTRATION: Making bootable disks from ISO’s using Nero
Installing the OS - which services do you need? (Ed) • Catalogue the hardware. • Server or Workstation? • List of Workstation services • List of Server Services • Discussion: Computer Resources and Linux
Installing the OS – The partition game • Boot loaders, GRUB, LILO • Why partition? Not mounting all space to / (root) will provide you with: • Improved stability, partitions mark boundaries for data. • Improved security. • Easier to diagnose and maintain the system.
Installing the OS – The partition game • /etc, /bin and /lib must not be separated • A good idea is to separate directories that are dynamic, such as: • /var - All our logs and dynamic files • /tmp - Temp files • Logical Volume Manager allows you to shrink expand partition sizes on the fly
Recommended settings • swap: 2 * Memory size (or equal to memory size when 2GB+) • /boot: 100MB – Ext3 • /tmp: 1GB – Logical Volume • / : 10GB+ – Ext3 • /var : All the rest – Logical Volume
Lets do it! • Exercise: Working in pairs, install one workstation with X-Windows and one server without X-windows. Ensure the server has NOT got Apache (HTTP server) installed, we will do this later.
Getting to the Network (Andy) • Setting up IPv4 • Files to amend • /usr/sbin/netconfig • DNS – resolv.conf • We’ll use DHCP today - Demonstration • Troubleshooting with Ping and Traceroute • Ifconfig to show network settings – try this! • Ifconfig eth0, ping www.ic.ac.uk
Windows and Linux • Talking to the box using ssh and Putty • Avoid Telnet if possible! • WinSCP • VNC (Neil)
Users • Root is the Administrator user in Linux • Use a user with the least privileges required • Adduser frankPasswd frank • SU (Substitute User)su frank • SUDO (Super User DO)frank $> cat /etc/shadowcat: /etc/shadow: Permission deniedfrank $> su rootroot #> visudoroot #> frank ALL=/bin/catroot #> su frankfrank $> sudo cat /etc/shadow
CLI stuff you need to know (Ed) A few useful commands to begin with: • ls, cd, more, cp, mv, rm, mkdir, man • Command output redirection • ls -al > filelist • Command input redirection • wc < ed.txt • An example of input and output • wc < ed.txt > count.txt • Pipes – allow the output of one command to be fed into the input of another • ls -al /etc | more
Permissions in Linux -rwxrw---- 1 root root 56 Mar 27 11:31 ed.txt • chmod <3digitnum> <file> - chmod 755 ed.txt • chown <user> <file> - chown root ed.txt • chgrp <group> file – chgrp nobody ed.txt
Keeping it up to date • YUM – (Ed) • APT-GET (Pete)
Playing with X-Windows • EXERCISE: Try these applications: • Kstars • Open Office • MAN • Mozilla or Firefox • Nautilus • Something that your curious about
Lunch • Counter lunch to be served downstairs in the Science Park Restaurant
Installing software – The Bluefishexample • Bluefish is a simple HTML editor. We’ll try and install it onto our workstation using these methods. Install Apache on the server. • YUM Install (ED) • APT-Get Install (Pete)
Exercise: Starting your own apache web server • Exercise: Using one of these methods, try and install Bluefish onto your workstation • Start the apache service on your server and use Bluefish to edit the index.html file
<Break> • Lets take 5 minutes for some coffee or tea
Compiling and installing source code (Ed) • You will need the development packages installed to compile. • It’s usually just a three step process: • ./configure – a script which creates a makefile • Make – compiles the actual code • make install – installs the files
Extending the use of Linux (another course!) (Andy) • Programming in the shell – scripting – (Ed) • Integrating with Windows – LDAP and SAMBA • LAMP (Linux, Apache, MySQL and PHP) • Blogging and RSS feeds • Moodle and Shibboleth (Ed) • Imaging – e.g. Gallery • Linux on the desktop – OpenOffice (Pete) • Network troubleshooting with Ethereal and Etherape (Andy)
Going on from here… • Today is just the start….. • Support – Google and the Internet • On-Line Forums
Challenges for you! • Wordpress - Blogging • Beowulf - clustering
Questions • Thank You and have a safe journey home