Linux System Administration Recipes: A Problem-Solution Approach

Linux System Administration Recipes: A Problem-Solution Approach

David Berube, Nick Plante

Language: English

Pages: 282

ISBN: 2:00175515

Format: PDF / Kindle (mobi) / ePub


The job of Linux systems administrator is interrupt-driven and requires constant learning in byte-wise chunks. This book gives solutions to modern problems—even some you might not have heard of—such as scripting LDAP, making Mac clients play nice with Linux servers, and backup, security, and recovery scripts. Author Juliet Kemp takes a broad approach to scripting using Perl and bash, and all scripts work on Debian or Red Hat lineage distributions. Plus, she dispenses wisdom about time management, dealing with desperate colleagues, and how to avoid reinventing the wheel!
• Learn how to love LDAP scripting and NFS tuning
• Make Perl serve you: don't be enslaved by Perl
• Learn to change, craft, and feel empowered by recipes that change your life
<h3>What you’ll learn</h3> • Centralize your network using LDAP and NFS
• Speak the language of different file systems
• Know when to use Perl or when to stick to sed and awk
• Treat security concerns with Perl, bash, and intelligence
• Learn how to trace errant system calls and misbehaving colleagues
<h3>Who this book is for</h3>
System administrators in need of quick succor and guidance when interruptions prevent the smooth running of a network.
<h3>Table of Contents</h3><ol> • Saving Yourself Effort
• Centralizing Your Network: Kerberos, LDAP, and NFS
• Monitoring and Updating
• Taking Backups and Managing Data
• Working with Filesystems
• Securing Your Systems
• Working with Apache
• Using the Command Line Better
• Working with Text in Files
• Things Going In, Things Going Out
• Tracking Down Bugs
• Managing Time and People
</ol>

 

 

 

 

 

 

 

 

 

 

 

 

pass variables into a script or a subroutine, don’t just use the default names (for example, $_[0] or @_ for a Perl subroutine). Instead, give them real names immediately, and use those thereafter—as in line 23. It’s a single extra line of code, and it makes it far, far easier to remember what exactly it is that you’re doing with what you’re passing in. It will also help you remember what it is that you’re passing in, rather than having to repeatedly check what variables are expected. And, while

can add any other directories with a similar line. 64 Download at WoweBook.Com CHAPTER 3 ■ MONITORING AND UPDATING ■ Note By default, some of the files in this directory (when installing from the version in Debian stable at the time of this writing, which was 3.0.6-4) still have names that end with nagios2, despite the version of the software as a whole being Nagios 3. Feel free to change the file names if you prefer; here I’ll refer to them by the default names that the Debian package uses.

$ARG1$ without any argument passed in to it define command { command_name check_nrpe_1arg command_line /usr/lib/nagios/plugins/check_nrpe -H  $HOSTADDRESS$ -c $ ARG1$ } Edit /etc/nagios/conf.d/services_nagios3.cfg on the monitored machine (cepheus in this example) to add the services you want to monitor: # SMTP doesn't need any arguments passed into the check_smtp # program, so we use check_nrpe_1arg define service { service_description SMTP use generic-service hostgroup_name nrpe check_command

this. Boot from a rescue disk or LiveCD if you will be resizing your / partition at all, as in this example. If you’re just resizing other partitions, then you can boot from / as normal and unmount any other partitions after bootup. umount /dev/hda2 Use fdisk -l to find the start and end of the partitions: > fdisk -l Device /dev/hda1 /dev/hda2 Boot . Start 1 1289 End 1288 8924 Blocks Id System 10345828 83 Linux 61336138 83 Linux Using parted, shrink /dev/hda2 to 50GB, leaving 55GB spare at

just use a2enmod or a2dismod without any argument. Remember that after you’ve made any changes, you’ll need to reload Apache2 for them to take effect: /etc/init.d/apache2 reload 7-3. Setting Up an SSL Certificate for Apache2 When you set up a secure web server, clients have confirmation both that the server is who it claims to be and that the transaction is well encrypted so their data is safe. To do this with Apache, you need to use Secure Sockets Layer (SSL), which is a secure communication

Download sample

Download