Table of Contents
CentOS Install Useful Tools via Script
Introduction
There are many useful tools that we can use on CentOS that make diagnostics that much easier, all of these tools have been discussed on this wiki, but rather than install them one at a time, here is a script that will install all of them in one go (as long as you are connected to the internet).
What the script does
The script install_tools.sh does two main tasks.
<sxh [text], gutter: false; highlight: 1-2;>
Sets the repositories for the tools (epel-release and atrpms).
Installs the tools.
</sxh>
Pretty simple, but the script does save a lot of time.
What tools are installed?
Glad you asked, here is a list. I have linked them back to their respective pages so you can read about each one.
htop
nload
iperf
tcpdump
ncdu
net-tools (for netstat)
ffmpeg
The Scripts
Here is the script in text form, below I have supplied the script in a file format as well.
<sxh [text], gutter: false; highlight: 1-20;>
#!/bin/bash
# Install useful tools
yum install epel-release -y
yum install htop -y
yum install nload -y
yum install iperf -y
yum install tcpdump -y
yum install ncdu -y
yum install net-tools -y
rpm –import http://packages.atrpms.net/RPM-GPG-KEY.atrpms
touch /etc/yum.repos.d/atrpms.repo
echo “[atrpms]
name=Fedora Core \$releasever - \$basearch - ATrpms
baseurl=http://dl.atrpms.net/el\$releasever-\$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
enabled=1
gpgcheck=1” > /etc/yum.repos.d/atrpms.repo
yum install ffmpeg -y
</sxh>
The scripts as a downloadable file can be found here.
How to use
To use the script either download the file, or create a new file on your CentOS (in the home folder, as you will have rights there). Call the file install_tools.sh.
Make the file executable with:
chmod 777 install_tools.sh
Now execute the file using:
./install_tools.sh
That's it, depending on internet connection, this should complete in 1 or 2 minutes.
If you script fails with a syntax error, please READ THIS PAGE.