Your SlideShare is downloading. ×
Sysadmins' Rosetta Stone
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Sysadmins' Rosetta Stone

3,653
views

Published on

A description of the differences between Red Hat's way of doing things and Debian's way of doing things.

A description of the differences between Red Hat's way of doing things and Debian's way of doing things.

Published in: Technology, Business

1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
3,653
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
52
Comments
1
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Sysadmins’ Rosetta Stone Files Services Mackenzie Morgan Ohio LinuxFest 2009 26 September 2009
  • 2. Outline Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction 1 Introduction Package Management Files 2 Package Management Services 3 Files 4 Services
  • 3. Me Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Mackenzie Morgan Management Computer Science student Files Services *buntu contributor At home: Kubuntu At work: Red Hat (. . . and SUSE. . . and Solaris. . . and AIX. . . )
  • 4. This Talk Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management You: “Red Hat, Red Hat, Red Hat, I sure love Red Hat!” Files Pointy-Haired Boss: We’re switching to Debian Services You: But they don’t even use RPM! (Swap “Debian” for “Red Hat” and vice-versa as necessary)
  • 5. Outline Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction 1 Introduction Package Management Files 2 Package Management Services 3 Files 4 Services
  • 6. Why Package Management First? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Lots of commands Services Use it the most
  • 7. Apt and Yum and Bears, Oh my! Sysadmins’ Rosetta Stone Mackenzie Morgan Common Debian tools: Introduction apt-cache Package Management apt-get Files aptitude Services dpkg tasksel Common Red Hat & Fedora tools: rpm yum
  • 8. Package Naming Conventions: Red Hat Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package python 2.6-1.i386.rpm Management Parts: Files Software name Services Software version Package version Architecture
  • 9. Package Naming Conventions: Debian Sysadmins’ Rosetta Stone Mackenzie Morgan python2.6 2.6.2-3 amd64.deb Introduction python2.6 2.6.2-3ubuntu1 amd64.deb Package Parts: Management Files Software name Services Library version (optional) Software version Debian package version Ubuntu package version (only if Ubuntu modifications exist) Architecture
  • 10. Installing and Removing a Local Package Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Install: Package Management dpkg -i python2.6 2.6.2-3 amd64.deb Files rpm -Uvh python 2.6-1.i386.rpm Services Remove: dpkg -r python2.6 rpm -e python
  • 11. Installing and Removing Packages with Repositories Sysadmins’ Rosetta Stone Mackenzie Morgan Install: Introduction apt-get install python2.6 Package Management aptitude install python2.6 Files yum install python Services Remove: apt-get remove python2.6 aptitude remove python2.6 yum remove python Great! Not much to learn there!
  • 12. Wait. . . Apt-get? Aptitude? Sysadmins’ Rosetta Stone Mackenzie Aptitude: Morgan Always installs “Recommends:” packages Introduction Tracks “manual” versus “automatically” installed packages Package Management Removes “orphaned” packages Files Apt-get: Services Can be configured to automatically install “Recommends:” packages or not (current default: install them) Will prompt about orphaned packages apt-get autoremove will remove orphaned packages Convergence! Aptitude’s main use? Avoiding remembering apt-get and apt-cache
  • 13. How do I find a package? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Debian: Package Management apt-cache search text editor Files Services aptitude search text editor Diff? Aptitude alphabetizes and lists install status Red Hat: yum search text editor
  • 14. What if I want lots of packages? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management List them all! Or. . . Files Metapackages Services Tasksel Groupinstall
  • 15. Metapackages Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Dummy package, depends on lots of other packages Files Ex: Services apt-get install build-essential installs development tools (gcc, kernel headers, etc.)
  • 16. Tasksel Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files TUI to select and install a certain task, ex: LAMP server Services Just run tasksel
  • 17. Groupinstall Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Feature of Yum Files Ex: Services yum groupinstall ‘‘Development Tools’’ is roughly equivalent to the earlier “build-essential” example
  • 18. Speaking of Development Packages. . . Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Debian: -dev packages for headers Services Red Hat: -devel packages for headers
  • 19. Staying up to date Sysadmins’ Rosetta Stone Mackenzie Morgan Get updated list of available packages: Introduction apt-get update or aptitude update Package Management yum check-update Files Install software updates Services apt-get upgrade or aptitude safe-upgrade yum update (does the above and installs in tandem) Install all software updates and remove obsolete packages apt-get dist-upgrade or aptitude full-upgrade yum upgrade
  • 20. What if I only want to update one package? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files apt-get install python2.6 Services yum update python
  • 21. When I remove a package, what happens to config files? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Debian: They’re retained. . . unless apt-get purge Services python2.6 Red Hat: They’re removed
  • 22. Which package is this file in? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Debian: Management Files If file exists dpkg -S $FILENAME Services If not apt-file search $FILENAME Red Hat: rpm -qf $FILENAME
  • 23. What version of a package is installed? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Debian: Management Files dpkg -l $PACKAGE Services apt-cache policy $PACKAGE Red Hat: rpm -qi $PACKAGE | awk ‘/Version/{ print $3 }’
  • 24. Outline Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction 1 Introduction Package Management Files 2 Package Management Services 3 Files 4 Services
  • 25. Speaking of Packages. . . Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Where are repositories configured? Package Management Debian: /etc/apt/sources.list Files Red Hat: /etc/yum.repos.d/*.repo Services Where do downloaded packages go? Debian: /var/cache/apt/archives/ Red Hat: /var/cache/yum/
  • 26. Interface configuration files Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Debian: /etc/network/interfaces Services Red Hat: /etc/sysconfig/network-scripts/ifcfg-* (ex: ifcfg-eth0)
  • 27. Timezones Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Debian: /etc/timezone Services Red Hat: /etc/sysconfig/clock
  • 28. Modules to load Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Debian: /etc/modules Services Red Hat: /etc/sysconfig/udev-stw
  • 29. For the OpenAFS users. . . Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package krb5-config has no standard place Management Files Debian: /usr/bin/krb5-config Services Red Hat: /usr/kerberos/bin/krb5-config SUSE: /usr/mit/bin/krb5-config Solaris: /opt/csw/bin/krb5-config
  • 30. Webserver Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Debian: /etc/apache2/ Services Red Hat: /etc/httpd/
  • 31. Firewall configuration Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Debian: /var/lib/iptables Services Red Hat: /etc/sysconfig/iptables
  • 32. IDs Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction UIDs and GIDs vary Package Management Debian starts at 1000 Files Red Hat starts at 500 Services Filesystem permissions become sad Change here: Debian: /etc/adduser.conf Red Hat: /etc/login.defs
  • 33. Outline Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction 1 Introduction Package Management Files 2 Package Management Services 3 Files 4 Services
  • 34. What’s a Runlevel? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Pre-defined sets of scripts and programs to start in a specific Services state
  • 35. What does each runlevel do? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package That depends. Are you asking: Management Files 1 Someone who read a book on “Linux” once Services 2 Someone who’s poked at their system’s runlevels 3 Someone who’s used many distros 4 Wikipedia
  • 36. Runlevels By Distro Sysadmins’ Rosetta Stone Distro/Runlevel 2 3 4 5 Mackenzie Morgan By the book ♠ ♣ ♦ Debian Introduction Gentoo ♠ ♦ Package Management Red Hat ♣ ♦ Files SUSE ♠ ♣ ♦ Services Key: ♦ = Undefined = Multi-user with display manager ♣ = Multi-user without display manager ♠ = Multi-user without networking or display manager = Multi-user with networking but without most network services
  • 37. How do I change runlevels’ services? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Old Answer: Package Management Debian: manually create/rm symlinks (or Files update-rc.d. . . if you’re a script) Services Red Hat: use chkconfig New Answer: Use chkconfig Yay! Convergence!
  • 38. How do I start/stop/restart a service? Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Old Answer: Management Debian: /etc/init.d/$SERVICE start Files Services Red Hat: service $SERVICE start or that New Answer: service $SERVICE start Yay! Convergence!
  • 39. References Sysadmins’ Rosetta Stone Mackenzie Morgan Introduction Package Management Files Services http://en.wikipedia.org/wiki/Runlevel