Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Webmin Administrator's Cookbook

You're reading from   Webmin Administrator's Cookbook Over 100 recipes to leverage the features of Webmin and master the art of administering your web or database servers.

Arrow left icon
Product type Paperback
Published in Mar 2014
Publisher
ISBN-13 9781849515849
Length 376 pages
Edition Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Michal Karzynski Michal Karzynski
Author Profile Icon Michal Karzynski
Michal Karzynski
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Setting Up Your System FREE CHAPTER 2. User Management 3. Securing Your System 4. Controlling Your System 5. Monitoring Your System 6. Managing Files on Your System 7. Backing Up Your System 8. Running an Apache Web Server 9. Running a MySQL Database Server 10. Running a PostgreSQL Database Server 11. Running Web Applications 12. Setting Up an E-mail Server Index

Controlling which system services are started at boot


During the boot process, your operating system should load all services that will be running in the background on your machine. This includes database servers, web servers, tools such as Webmin, and other system processes. Server distributions are very lean by default, so they will only start a handful of essential services. Webmin allows you to control which of these scripts is executed through the Bootup and Shutdown module.

How to do it...

Perform the following steps to check which system services are started at boot:

  1. Navigate to System | Bootup and Shutdown.

  2. Select a service to disable temporarily. If your system has the avahi daemon or the rsync service, these can probably be disabled for a minute without causing trouble. Consider the following screenshot:

  3. Mark the checkbox next to one of these services and click the Disable Now and On Boot button. You will see a screen notifying you that the service was stopped and disabled from starting at the next boot.

  4. Go back to the Bootup and Shutdown screen, select the same service again, and click the Start Now and On Boot button to revert your previous change.

How it works...

When your OS starts, it first loads the system kernel and then starts a process called init (short for initialization), which executes various init scripts that start system services. Under Linux, these scripts are stored in one directory (/etc/init.d) and activated by the creation of symbolic links to them in a special directory from which all scripts are executed at boot time. Webmin allows you to control which init scripts are executed by creating or removing these symbolic links or performing other activation functions specific to your system.

The init system described earlier is often referred to as SysV-style init. It's named after the historic UNIX System V that inspired all modern Unix-like operating systems, including Linux and BSD. Many distributions are gradually switching over to more modern alternatives such as Upstart and Systemd. The details of how these systems differ from SysV-init are beyond the scope of this book, but Webmin tries to provide a common interface to all of them. Screenshots in this recipe may differ slightly depending on which init system your distribution uses.

There's more...

Webmin also allows you to easily create your own init scripts and verify that a started service is actually running.

Creating a custom init script

Most server packages you install will come with their own init scripts and activate them in your init system. If you install a package that doesn't, you can use Webmin to create a simple init script for you.

Navigate to System | Bootup and Shutdown and click the Create a new bootup and shutdown action link.

Note

Depending on the init system you're using, this link may also be named Create a new action, Create a new upstart service, Create a new systemd service, and so on.

You will be asked to specify the name and description of the startup item as well as two commands: one for starting the service and one for shutting it down. Once you fill these out, click Create and Webmin will automatically create a basic init script for you.

Inspecting active processes

Even if a service is successfully started during boot, it could potentially crash. To inspect which services are actually running, go to System | Running Processes. There, you will see a tree of processes sorted in the order in which another process has started them. You can also sort processes by owner or the amount of CPU or RAM they are consuming. Consider the following screenshot:

Click on a process ID for one of Webmin's processes to get more information about it, including those files or network connections the process still has open.

You have been reading a chapter from
Webmin Administrator's Cookbook
Published in: Mar 2014
Publisher:
ISBN-13: 9781849515849
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image