Five packages I always install on Linux servers

avatar

image.png

There are a few packages I always install when installing a new Linux server, regardless of the purpose. Some packages are installed by default depending on the distribution of Linx and the version.

I will mostly describe the tools and what they are used for. I will leave it up to you to figure out how to use them by looking at their man page or doing a Google search for the ones that interest you.

Htop

htop is one of the first packages I install. If you are familiar with top then you have a good understanding of what this tool does.

htop is a more modern version of top with additional features, the biggest feature is color for easy visibility.

image.png

I can't explain htop any better than CodeAhoy did in these two images.

image.png

image.png

vnstat

vnstat is another tool I find tremendously useful for all Linux boxes.

vnstat is used to monitor activity on your network interfaces. It will track not only current activity but will give you historic data over hours, days, months for inbound and outbound traffic.

image.png

If your server's connection is metered, this is a good tool to see how much bandwidth you are using.

vnstat also has the ability to output a png with traffic summary graphs.

image.png

etckeeper

etckeeper is an extremely handy package that helps version your configuration files in /etc. At its core, it is just Git wrapped with some triggers. I wrote a post about etckeeper a couple of years ago.

Once you install etckeeper and configure it to keep track of your configuration files. It will automatically create comments on a daily basis but you can also trigger a commit after you make a change. If you are making multiple changes then triggering manual commits will allow you to have individual commits for each of your changes. This allows you easily to roll back a bad change in isolation.

Tmux

I recently just wrote a post about tmux.

tmux is a terminal multiplexer, it is also a session state manager. As a terminal multiplexer, it allows you to run multiple terminals in one terminal session by adding the ability to create windows and panes.

As a session state manager, tmux allows you to disconnect from an SSH session and later reconnect exactly where you were before. It is handy for running programs you want to be able to monitor console logs but you don't want it to quit when you exit your session. There are many ways of doing this using log files and background tasks with nohup. tmux is just a quick and easy way to do this and easily switch back to them as needed. Add in the window and pane functionality and you have a super handy tool.

Process Manager 2

pm2 or Process Manager 2 is another tool I recently wrote about in a post that I highly recommend getting familiar with.

While PM2 is designed to manage NodeJS apps, it works great with most scripting languages like Ruby, Python, Javascript, Bash, PHP, Perl, and more.

image.png

Using PM2 you can start scripts automatically when your server boots and restart them whenever the scripts terminate due to a bug or system error. It also does a great job of managing logs even for scripts that have no native logging functionality.

Image Sources: 1 2 3 4 5 6 7



0
0
0.000
19 comments
avatar

Htop an essential for me too. I don't run any servers, but I need to get some Pis working for me.

0
0
0.000
avatar

Those are some awesome tools! Thanks for sharing. I have actually never used any of them. Most of my Linux servers are for a specific purpose and I kind of just set it and forget it. I can totally see how these would be useful though. I might even install one or two of them on my next build!

0
0
0.000
avatar

I actually don't understand most of this post. Highly technical.! Seems I have a lot to learn.

0
0
0.000
avatar

good stuff, pretty much using the same packages expect pm2. Using supervisord for that. It's Python so I'm biased.

0
0
0.000
avatar

I would add a Partition Manager – Gparted. This free tool will help you partitioning the disk via it's friendly Gui

0
0
0.000
avatar

I almost never need to partition disks afterwards on servers. But I use that when I need to as well.

0
0
0.000
avatar

OMG! All of that went way over my head! I do feel better knowing that this man IS the Linux programmer that I may one day need...

0
0
0.000
avatar

Quite a great linux toolbox for anyone running servers and monitoring how they are doing. Also I think you could add some debug tools or options that might be used when something goes wrong like an application being unresponsive or something similar.

0
0
0.000
avatar

I am going to have to try tmux. I though screen was the bees knees when I discovered it. It looks like tmux is screen’s more modern brother!!!

Thanks for the tip!

0
0
0.000
avatar

It is a more modern version of screen. Only thing screen really does better is built-in logging.

0
0
0.000
avatar

pm2 is great except for when it's trying to startup everything at once and everything is failing...I experienced this when all the Steem RPC nodes were down during the HF.

0
0
0.000
avatar
(Edited)

That is a very rare occurrence and there are workarounds. Most all solutions would have issues then as well.

0
0
0.000
avatar

very nice, some lib package or lsb?

0
0
0.000
avatar

That's a very nice list, but the fact that PM2 depends on NodeJS can make it unsuitable in some situations. I think basic system utilities should be written in C or shell and preferably have no dependencies.

0
0
0.000
avatar

Ideally, that would be great, but it has never posed a problem.

0
0
0.000