Installing Gnokii Requirements – intltool-0.35.0-2.i386.rpm tar -xzvf gnokii-0.6.28.tar.gz cd gnokii-0.6.28 ./configure make make install cp -Rdp /usr/share/doc/gnokii/sample/gnokiirc /root/.gnokiirc or cp -Rdp /usr/share/doc/gnokii/sample/gnokiirc /etc/gnokiirc configure Gnokii for Wavecom GSM modem #vim /root/.gnokiirc [global] port = /dev/ttyS0 model = AT initlength = default connection = serial use_locking = no serial_baudrate = 9600 smsc_timeout = 10 [xgnokii] allow_breakage […]
Red hat linux
How to Install Nagios 4.3.4 on RHEL / CentOS
Nagios is an awesome Open Source monitoring tool, its provides you more comprehensive monitoring environment to always keep an eye on your all machines / networks whether you are in a your data center or just your small labs. With Nagios, you can monitor your remote hosts and their services remotely on a single window. […]
Color text output on bash scripts
Users who have been using Linux for awhile often learn that creating a basic script is a good way to run multiple, often-repeated commands. Adding a little color to scripts can additionally provide nice feedback. This can be done in a fairly straight-forward way by using the tput command. A common way of doing this […]
AWK and Regular Expressions to Filter Text or String in Files
AWK is an interpreted programming language. It is very powerful and specially designed for text processing. AWK – Basic Examples This chapter describes several useful AWK commands and their appropriate examples. Consider a text file marks.txt to be processed with the following content − 1) Amit Physics 80 2) Rahul Maths 90 3) Shyam Biology […]
Howto install sar & ksar system activity info in Centos / Redhat
The sar command collect, report, or save UNIX / Linux system activity information. It will save selected counters in the operating system to the /var/log/sa/sadd file. Fromlinux-logo the collected data, you get lots of information about your server: CPU utilization Memory paging and its utilization Network I/O, and transfer statistics Process creation activity All block […]
Send SNMP Traps from Nagios to Remote Management Host
1. Add ‘send snmp trap’ command to nagios vim /usr/local/nagios/etc/objects/commands.cfg define command{ command_name send_snmptrap command_line /usr/bin/snmptrap -v 2c -c public 10.50.24.34 ” NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s “$HOSTNAME$” nSvcDesc s “$SERVICEDESC$” nSvcStateID i $SERVICESTATEID$ nSvcOutput s “$SERVICEOUTPUT$” } 2. Add this event and enable the event to services which needed to send traps vim /usr/local/nagios/etc/objects/localhost.cfg define service{ […]
How To Install and Configure SNMP on RHEL 7 or CentOS 7
SNMP stands for “Simple Network Management Protocol”, it can be utilized to monitor any devices that support snmp, few of the devices are server, router, network printers, firewalls. SNMP can monitor a variety of parameters for these devices such as server performance, network usage, disk utilization. Check Package Check if the package is already installed, […]
Send E-Mail On Redhat / CentOS with SMTP (SMTP Relay)
In this tutorial we will send email with mailx and using external SMTP server for email sending from CentOS/Redhat Install mailx yum -y update yum install -y mailx We can now start sending e-mails using create a symbolic link ln -s /bin/mailx /bin/email Set an External SMTP Server to Relay E-Mails vi /etc/mail.rc edit set […]
Password Validation Plugin in MySQL
The validate_password plugin serves to test passwords and improve security. The plugin exposes a set of system variables that enable you to define password policy. First check the plugin directory of MySQL. mysql> show variables like “plugin%”; +—————+————————–+ | Variable_name | Value | +—————+————————–+ | plugin_dir | /usr/lib64/mysql/plugin/ | +—————+————————–+ 1 row in set (0.00 […]
Set Up and Use Yum Repositories on Redhat / CentOS
We can install new software on Red Hat/CentOS Linux with “yum install packagename” command from console. Running this command first checks for existing YUM Repository configuration files in /etc/yum.repos.d/ directory. It reads each YUM Repository configuration file to get the information required to download and install new software, resolves software dependencies and installs the required […]