Senin, 02 Februari 2015

How To Install Linux-dash Web Based Monitoring System In RHEL/CentOS

Linux-dash is a web-based lightweight monitoring dashboard for Linux machines. This application will display real-time, various system properties, such as CPU load, RAM usage, disk usage, Internet speed, network connections, RX/TX bandwidth, logged-in users, running processes etc. It will not store long term statistics, Thus it doesn’t have a backend database.

In this article i will show you how to install and setup Linux dash, Here my web server is Nginx.

Installation

First of all we should enable, EPEL repository.

Next, we need to install nginx with the following command.

yum install nginx

Install php-fpm component

yum install git php-common php-fpm

Now, we have to configure nginx for Linux-dash. So create /etc/nginx/conf.d/linuxdash.conf as follows.

nano /etc/nginx/conf.d/linuxdash.conf

server {
 server_name $domain_name;
 listen 8080;
 root /var/www;
 index index.html index.php;
 access_log /var/log/nginx/access.log;
 error_log /var/log/nginx/error.log;

 location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ {
 try_files $uri =404;
 expires max;
 access_log off;
 add_header Pragma public;
 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
 }

 location /linux-dash {
 index index.html index.php;
 }

 # PHP-FPM via sockets
 location ~ \.php(/|$) {
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 fastcgi_split_path_info ^(.+?\.php)(/.*)$;
 fastcgi_pass unix:/var/run/php-fpm.sock;
 if (!-f $document_root$fastcgi_script_name) {
 return 404;
 }
 try_files $uri $uri/ /index.php?$args;
 include fastcgi_params;
 }
}

Next job is to configure php-fpm. Open  /etc/php-fpm.d/www.conf in your Favorite editor.

nano /etc/php-fpm.d/www.conf

Make sure to set “listen”, “user” and “group” fields as below. You can leave the rest of the configuration unchanged.

. . .
listen = /var/run/php-fpm.sock
user = nginx
group = nginx
. . .

Now, We are going to Download and install linux-dash under /var/www

git clone https://github.com/afaqurk/linux-dash.git
cp -r linux-dash/ /var/www/
chown -R nginx:nginx /var/www

Next, restart Nginx web server as well as php-fpm

/etc/init.d/nginx restart
/etc/init.d/php-fpm restart

Set nginx and php-fpm to auto-start upon boot

chkconfig nginx on
chkconfig php-fpm on

In this example, we have configured linux-dash to use TCP port 8080. So make sure that the firewall is not blocking TCP port 8080.

Monitor a Linux server with linux-dash

You can access Linux-dash by pointing you browser to http://ip.add.re.ss:8080/linux-dash/

The web dashboard consists of several widgets, each of which displays particular system properties. You can customize the look of the web dashboard by rearranging and/or closing some of the widgets.


Minggu, 01 Februari 2015

How To Install Openfire On Linux CentOS 7

Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It is also known as Jabber. It uses the only widely adopted open protocol for instant messaging, XMPP. The full name of XMPP is Extensible Messaging and Presence Protocol. It is a real-time communication protocol (which includes chat) based on XML. Installation and the management of Openfire is pretty simple.

How to boot ISO image ubuntu from your hard drive

This guide will show how to boot an ISO image file that stored in your hard drive. Booting an ISO on your hard drive is useful for testing new versions of Linux ISO file without using up a CD/DVD or USB Stick. On this case I will boot Ubuntu 13.04 iso directly from hard disk via the Grub2 boot menu. Create a directory named iso in your root folder using this command:
# sudo mkdir /isoimage

Now copy ubuntu 13.04 iso file (ubuntu-13.04-desktop-i386.iso) to directory /isoimage :
# sudo cp -v ~/ISOFILE/ubuntu-13.04-desktop-i386.iso /isoimage

Edit /boot/grub/grub.cfg file with following command:
# sudo nano /etc/grub.d/40_custom

add these lines to Custom GRUB Configuration file (/etc/grub.d/40_custom):
menuentry "Ubuntu 13.04 Live" {
 set root=(hd0,1)
 loopback loop /isoimage/ubuntu-13.04-desktop-i386.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/isoimage/ubuntu-13.04-desktop-i386.iso noprompt noeject
 initrd (loop)/casper/initrd.lz
}


Save your file and exit with press button CTRL + X.
After this enter command:
# sudo update-grub

Then reboot ubuntu and hold down the Shift key to bring up the Grub boot menu. Select Ubuntu 13.04 Live to boot ubuntu 13.04 iso image from hard drive