Linux Server Setup – Part 2: What’s Next After Installation
Setting up a Linux server is rewarding and opens up all kinds of possibilities. You can run a personal website, a media server, or cloud storage—there’s so much potential. By following foundational steps like choosing the right distribution, configuring SSH, and enabling firewalls, you already have a secure and flexible platform.
If you’ve already followed the basics from Linux Server Setup – Part 1, then it’s time to dig deeper into monitoring, logging, troubleshooting, and additional tools to keep your Linux server running at peak performance.
Table of Contents
Monitoring, Logs, and Troubleshooting
Screenshot of btop – the htop alternative.
Monitoring, logging, and troubleshooting are the keys to a stable and performant Linux server. Monitoring tools provide real-time insights, logs reveal detailed events, and troubleshooting ensures that issues are resolved quickly. Let’s break this down, starting with monitoring tools.
Monitoring Tools
System monitoring tools provide valuable insights, by displaying real-time system resource usage and running processes:
top
: A simple and default tool in most distributions. Here’s how to customize it.htop
: Offers an interactive view of processes and resource usage. Quick Guide & Customization.glances
: Provides a broader overview, including disk I/O and network activity. As an Alternative to htop.atop
: Offering detailed resource tracking over time. Using it for Linux server performance analysis.
Installing System Monitoring Tools (examples)
The top
command is usually already installed by default. However, here’s how you can install some other useful command-line server monitoring tools:
htop
: A more interactive and visually appealing alternative to top
. It allows you to sort and manage processes with ease.
sudo apt install htop # Debian/Ubuntu sudo dnf install htop # Fedora/RHEL (Alma, Rocky, etc)
glances
: Offers a broader overview of system performance, including disk I/O and network activity, in a single dashboard.
sudo apt install glances # Debian/Ubuntu sudo dnf install glances # Fedora/RHEL
Also, read: iostat command in Linux with examples.
Understanding Logs
In addition to real-time monitoring, understanding system logs is crucial for diagnosing issues and ensuring your server runs smoothly. Logs (Datadog is a blog partner) help diagnose issues with services and provide insights into server behavior. Tools like journalctl
can assist in reviewing logs for specific services, making troubleshooting more effective.
Logs are invaluable for diagnosing and resolving server issues. They provide detailed insights into server behavior and errors. Here’s how to use logs effectively when troubleshooting a Linux server:
- Locate Logs: System logs are typically found in
/var/log/
. Common logs include:/var/log/syslog
or/var/log/messages
for general system events./var/log/auth.log
for authentication events./var/log/nginx/
or/var/log/httpd/
for web server logs.
- Use
journalctl
: For systems usingsystemd
,journalctl
provides an efficient way to view logs:journalctl -u sshd journalctl -b # Logs from the current boot
- Search and Filter Logs: Use
grep
to filter logs for specific terms:grep "error" /var/log/syslog
- Monitor Logs in Real-Time: Use
tail
to watch logs as they are updated:tail -f /var/log/auth.log
Understanding and analyzing logs regularly can help you detect potential issues early and ensure the long-term stability of your server.
Troubleshooting Common Issues
Linux terminal output displaying system logs with network activity details.
When setting up a new Linux server, errors and issues can arise. Being able to troubleshoot common problems effectively is a vital skill for maintaining uptime and ensuring the smooth operation of your server. Let’s look at resolving connection issues and also how to use logs when troubleshooting Linux.
Also read: Troubleshooting Linux Problems: A Beginner’s Guide.
Debugging Connection Problems
Here are some steps to troubleshooting common networking issues:
- Verify Network Configuration: Ensure your server has the correct IP address, gateway, and DNS settings. Use tools like
ip a
orifconfig
to check network interfaces andping
to test connectivity. - Check Firewall Rules: Review your firewall settings to confirm that required ports are open. Use commands such as:
sudo ufw status sudo firewall-cmd --list-all
- Test SSH Access: If SSH is not working, try verbose mode to get detailed output:
ssh -v username@your_server_ip
- Inspect Service Status: Ensure the necessary services are running:
sudo systemctl status ssh
- Review Network Hardware: Check for physical issues with cables or routers if self-hosting. For cloud servers, confirm that the hosting provider has no outages or restrictions (check their status page).
Also read: Guide to Network Troubleshooting in Linux.
Do you use Cloudflare? Consider reading this guide next: Recommended Cloudflare Performance and Security Settings.
Get involved
Building your Linux knowledge is easier when you’re part of a community. Whether you’re troubleshooting, sharing success stories, or looking for inspiration, there’s no substitute for real-time human-interaction with other Linux enthusiasts. Our sister site, LinuxCommunity.io, is a great place to swap ideas in a friendly forum setting. If you’re on Reddit, Subreddits like r/sysadmin, r/linux, r/linux4noobs, r/selfhosted, and r/homelab are full of power users sharing projects, tips, and real-world experience to help you keep leveling up.
Level Up Your Linux Server
Below are some tools, software, ideas, and resources that will help you discover projects, and keep your server at peak performance.
- Ajenti: Web-based server control panel for admins.
- Ansible: Automate configuration management, application deployment, and IT orchestration.
- Bitwarden: Self-hosted password manager for secure credential storage.
- BookStack: Self-hosted platform for documentation and wikis.
- CachetHQ: Status page system for monitoring incidents and uptime.
- Cacti: Graphing solution for network and server metrics.
- Caddy: Web server with automatic HTTPS and easy configuration.
- Ceph: Unified block, file, and object storage for distributed environments.
- Cloudron: Simplify self-hosting apps with automated management.
- Cockpit: A web-based interface to manage and monitor your Linux server.
- Containerd: A lightweight, high-performance container runtime.
- Docker: Run and manage containers for application deployment.
- Duplicati: Backup software for creating encrypted backups.
- Endian: Open-source firewall and UTM (Unified Threat Management) solution.
- Gitea: Lightweight, self-hosted Git service.
- GitLab: Self-hosted Git repository management and CI/CD platform.
- GlusterFS: Distributed storage for scalable and redundant file storage solutions.
- Grafana: Visualize metrics and performance data from Prometheus and other sources.
- Graylog: Log management and analysis platform.
- Guacamole: Clientless remote desktop gateway.
- HAProxy: High-performance load balancer and reverse proxy for TCP/HTTP.
- Home Assistant: Open-source home automation platform.
- Icinga: Monitor system health and alert on issues.
- IPFire: Secure and flexible open-source firewall distribution.
- Keycloak: Open-source identity and access management solution.
- Kubernetes: Orchestrate, scale, and manage containers across multiple nodes.
- LibreNMS: Network monitoring tool that supports a wide range of devices.
- Lighttpd: Lightweight and fast web server for high-performance environments.
- Mail-in-a-Box: Self-hosted email server for managing personal or small-scale email.
- Mailcow: Self-hosted email suite with modern webmail and administration.
- Mattermost: Open-source, self-hosted alternative to Slack for team communication.
- Monitorix: Lightweight server monitoring with web UI.
- Munin: Track server performance and visualize data trends.
- Nagios: Monitor systems, networks, and infrastructure for alerts and outages.
- Netdata: Real-time performance monitoring for servers and applications.
- NextDNS: Cloud-based DNS with advanced privacy and security features.
- OpenSnitch: Interactive firewall for Linux to monitor outgoing connections.
- OpenVPN: Create secure VPN connections for your server and network.
- OPNsense: A fork of pfSense offering a modern, user-friendly firewall and router platform.
- Paperless-ngx: Self-hosted document management system for organizing digital files.
- Pi-hole: Network-wide ad blocker for DNS-based ad and tracker blocking.
- pfSense: Open-source firewall and router software for secure network management.
- Portainer: Manage Docker and Kubernetes containers with ease.
- Portmaster: Privacy-first tools for network monitoring and protection.
- Poste.io: Modern, self-hosted mail server solution.
- Prometheus: Monitor server performance and metrics in real time.
- Pterodactyl: Game server management panel.
- Puppet: Manage server configurations and automate deployments.
- Salt Project: Automate configurations and orchestrate systems in real-time.
- Tianji: Self-hosted alternative to social media analytics.
- Traefik: Modern HTTP reverse proxy and load balancer for microservices.
- TrueNAS: Open-source Network Attached Storage (NAS) operating system.
- Uptime Kuma: Modern, self-hosted monitoring system for uptime checks.
- Varnish Cache: HTTP accelerator for caching web content and boosting performance.
- Vault: Manage secrets, access control, and secure key storage.
- Virt-Manager: Desktop interface for managing virtual machines.
- Webmin: A web-based interface for system administration of Linux servers.
- WireGuard: A modern, high-performance VPN protocol for secure and fast connections.
- Zabbix: Enterprise-grade open-source monitoring for networks, servers, and applications.
Learn More About Linux
- Linux Foundation: Certifications and advanced training in Linux and open-source.
- Linux Professional Institute: Certifications and resources for advancing your Linux expertise.
- Opensource.com: Tutorials and inspiration for open-source tools.
Try Linux Projects
- Hackaday: Linux and DIY projects.
- Adafruit: Electronics and Linux-powered devices.
- Phoronix: Linux hardware reviews, benchmarks, and news.
Conclusion
Linux servers have so much more to offer. Try new services, experiment with new monitoring tools, and hone your admin skills as you add more features. Every tweak you make increases your expertise and what your server can handle.
Looking for your next project or want more info? Head over to the browse articles page for how-tos, tips, and inspiration. Let’s keep building, learning, and enjoying taking our Linux servers to new heights!
For now I just have a couple of dockers for running the services I need, I’ll keep in mind about this article in case I will have some needings, thanks for sharing![:slight_smile: :slight_smile:](https://linuxcommunity.io/images/emoji/twitter/slight_smile.png?v=12)