Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 26 February 2017

Setup Chat Support On Your Website With Mibew Messenger on CentOS 6x

Mibew Messenger on CentOS 6x


Q. What is Mibew Messenger ?

-- Mibew Messenger, also known as Open Web Messenger, is an open-source live/chat support application written in PHP and MySQL. It enables one-on-one chat assistance in real-time directly from your website. Just place the Mibew Messenger button at your site, the visitors of your site will be able to get assistance from your operators, technical support executives and customer support executives who help them by clicking on the chat button.

Features:

– Visitors can do real-time chat without page refresh.
– Unlimited operators, chats, and users.
– Unlimited departments (groups of operators).
– Priority queue of visitors.
– Localized to 10+ languages, unicode support.
– Runs on your server and domain.
– Complete free and Open source.

Step: 1. Bind Hosts File :

# vi /etc/hosts

192.168.72.220    ser1.domain.com ser1

-- Save & Quit (:wq)

Step: 2. Disabled Firewall & Selinux :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

Step: 3. Install Apache Server :

# yum -y install httpd httpd-devel wget unzip

Step: 4. Install MySQL Server :

# yum -y install mysql mysql-server mysql-devel

Step: 5. Start MySQL Service & Set Root Password :

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation

Step: 6. Install PHP5 Scripting Language :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel \
    php-xml php-imap php-ldap php-mbstring php-odbc php-pear php-xmlrpc php-soap \
    mod_ssl php-cli
 
Step: 7. Start Apache Service :

# service httpd restart
# chkconfig httpd on

Step: 8. Create Database For Mibew :

# mysql -u root -p
Enter Password:

mysql> create database mibewdb;
mysql> grant all privileges on mibewdb.* TO mibew@localhost identified by 'password';
mysql> grant all privileges on mibewdb.* TO mibew@'%' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 9. Download & Install Mibew :

# mkdir /var/www/html/mibew
# cd /var/www/html/mibew
# wget https://netix.dl.sourceforge.net/project/mibew/core/2.2.0/mibew-2.2.0.zip
# unzip mibew-2.2.0.zip
# rm -rf mibew-2.2.0.zip

Step: 10. Set Privileges to Mibew Directory :

# chown -Rf root:apache /var/www/html/mibew/
# chmod -Rf 755 /var/www/html/mibew/

Step: 11. Set your Mibew Application Path & DB Settings :

# vi /var/www/html/mibew/libs/config.php

$webimroot = "/mibew";

*  MySQL Database parameters
 */
$mysqlhost = "localhost";
$mysqldb = "mibewdb";
$mysqllogin = "mibew";
$mysqlpass = "password";
$mysqlprefix = "";

-- Save & Quit (:wq)

Step: 12. Now, Point your Web Browser & Type :

http://192.168.72.220/mibew/install

-- Click on Create Required Tables link.

User: "admin" with blank Password.

-- Edit General Operator Settings:
     Login: admin
     Email: kchatterjee@domain.com
     Password: Passw0rd
     Confirmation: Passw0rd
     Name: Koushik Chatterjee
  
-- Click on Save.

Step: 13. For Security Reason Remove the /mibew/install/ folder :

# rm -rf /var/www/html/mibew/install/

Step: 14. Add the Chat Button on My Website :

-- Go to the Mibew Admin Console.
-- Click on Button Code.
-- Copy the HTML Code & you can Paste them in your Website at any place.
-- You can Change the Chat image using Choose image Button & can Change the Chat window Style as well.

Step: 15. To View the Emails :

-- Open Mibew Admin Panel (http://192.168.72.220/mibew)
-- Login into Admin User.
-- Click on Notification.

You can See the All Emails there.

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

 

Sunday, 19 February 2017

How to Configure Online Shopping Store Using osCommerce on CentOS/RHEL 6x & Ubuntu 14.04

How to Configure Online Shopping Store Using osCommerce on CentOS/RHEL 6x & Ubuntu 14.04


Q. What is osCommerce ?

-- OsCommerce (Online Shopping Store) is an e-commerce and Online Store-Management Software program. It can be used on any web server that has PHP and MySQL installed. It is available as free software under the GNU General Public License.

Step: 1. Bind Hosts File :


# vi /etc/hosts

192.168.72.221    ser2.domain.com    ser2

-- Save & Quit (:wq)

Step: 2. Stop Firewall :

For CentOS/RHEL Users :

# service iptables stop
# chkconfig iptables off

For Debian Users :

# service ufw stop

Step: 3. Disable Selinux :

Important: This 3rd Step, is only Applicable for RedHat & CentOS Based Systems only, Debian & Ubuntu users skip this Step.

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

Important: In Case you Don’t want to Disable Selinux you can use the Following Command to over-ride policy :

# chcon -R -t httpd_sys_content_rw_t /var/www/html/

Step: 4. Reboot the System :

# init 6

Step: 5. Install Apache Server :

For CentOS/RHEL Users :

# yum -y install httpd httpd-devel

For Debian Users :

# apt-get -y install apache2

Step: 6. Install PHP :

For CentOS/RHEL Users :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel \
    php-xml php-imap php-ldap php-mbstring php-odbc php-pear php-xmlrpc php-soap php-cli \
    php-pdo php-intl mod_ssl
 
For Debian Users :

# apt-get -y install php5 php5-mysql libapache2-mod-php5

Step: 7. Restart Apache Service :

For CentOS/RHEL Users :

# service httpd restart
# chkconfig httpd on

For Debian Users :

# service apache2 restart

Step: 8. Install MySQL Server :

For CentOS/RHEL Users :

# yum -y install mysql mysql-server mysql-devel

For Debian Users :

# apt-get -y install mysql-client mysql-server

Step: 9. Start MySQL Service & Set MySQL Root Password :

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation

Step: 10. Create Database For osCommerce :

# mysql -u root -predhat

mysql> create database commercedb;
mysql> grant all privileges on commercedb.* to commerce@localhost identified by 'password';
mysql> grant all privileges on commercedb.* to commerce@'%' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 11. Install Following System Utilities :

For CentOS/RHEL Users :

# yum -y install wget unzip

For Debian Users :

# apt-get -y install wget unzip

Step: 12. Download OsCommerce Online Shopping Package :

# cd /var/www/html
# wget http://www.oscommerce.com/files/oscommerce-2.3.4.zip
# unzip oscommerce-2.3.4.zip
# mv oscommerce-2.3.4/catalog /var/www/html/commerce
# rm -rf oscommerce-2.3.4 oscommerce-2.3.4.zip

Step: 13. Give Appropriate Permission :

# chmod 777 /var/www/html/commerce/includes/configure.php
# chmod 777 /var/www/html/commerce/admin/includes/configure.php

Step: 14. Installing OsCommerce Online Shopping Package through Web Browser :

http://<ip_or_domain>/commerce/install

-- Click on "Start"
-- Database Server:
     Database Server: localhost
     Username: commerce
     Password: password
     Database Name: commercedb
  
-- Click on "Continue"
-- Web Server:
     WWW Address: http://192.168.72.221/commerce/
     Webserver Root Directory: /var/www/html/commerce/
  
-- Click on "Continue"
-- Online Store Settings:
     Store Name: Your Store Name
     Store Owner Name: Koushik Chatterjee
     Store Owner E-Mail Address: kchatterjee@domain.com
     Administrator Username: admin
     Administrator Password: Passw0rd
     Time Zone: select Kolkata

-- Click on "Continue"

Step: 15. Secure the osCommerce Online Shopping Store :

# rm -rf /var/www/html/commerce/install/
# chmod 644 /var/www/html/commerce/includes/configure.php
# chmod 644 /var/www/html/commerce/admin/includes/configure.php

Step: 16. To Check & Set the Appropriate Permission :

http://192.168.72.221/commerce/admin/login.php
Username: admin
Password: Passw0rd

-- Click on "Tools"
-- "Security Directory Permissions".

# chmod -R 775 /var/www/html/commerce/images/
# chown -R root:apache /var/www/html/commerce/images/
# chmod -R 775 /var/www/html/commerce/pub/
# chown -R root:apache /var/www/html/commerce/pub/
# chmod -R 755 /var/www/html/commerce/includes/
# chmod -R 755 /var/www/html/commerce/admin/
# chown -R root:apache /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/includes/work/
# chown -R root:apache /var/www/html/commerce/includes/work/

# chmod -R 775 /var/www/html/commerce/images/
# chown -R root:apache /var/www/html/commerce/images/
# chmod -R 775 /var/www/html/commerce/pub/
# chown -R root:apache /var/www/html/commerce/pub/
# chmod -R 755 /var/www/html/commerce/includes/
# chmod -R 755 /var/www/html/commerce/admin/
# chown -R root:apache /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/admin/backups/
# chmod -R 775 /var/www/html/commerce/includes/work/
# chown -R root:apache /var/www/html/commerce/includes/work/

-- Click on "Configuration"
-- Click on "Administrator"

# chmod 775 /var/www/html/commerce/admin/.htpasswd_oscommerce
# chmod 775 /var/www/html/commerce/admin/.htaccess
# chgrp apache /var/www/html/commerce/admin/.htpasswd_oscommerce
# chgrp apache /var/www/html/commerce/admin/.htaccess
   
-- Again Click on "Administrator"
-- Click on "Edit" Button.
-- Give Admin User Name & Password.
-- Check on "Protect With htaccess/htpasswd".
-- Finally Click on "Save" Button.

http://192.168.72.221/commerce/

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog


Saturday, 11 February 2017

How To Configure GlusterFS on Centos/RHEL 6x

How To Configure GlusterFS on Centos/RHEL 6x


Q. What is GlusterFS ?

-- GlusterFS is an open source, powerful clustered file system capable of scaling to several petabytes of storage which is available to user under a single mount point. It uses already available disk filesystems like ext3, ext4, xfs etc to store data and client will able to access the storage as local filesystem. GlusterFS cluster aggregates storage blocks over Infiniband RDMA and/or TCP/IP interconnect in a single global namespace.

Before the Installation:

Ensure that TCP and UDP ports 24007 and 24008 are open on all Gluster Servers.
Apart from these ports, you need to open one port for each brick starting from port 24009.
For example: if you have five bricks, you need to have ports 24009 to 24014 open.

Step: 1. Make sure to Add the bind the hostname of every Servers :

# vi /etc/hosts
   
192.168.100.220 ser1.domain.com   ser1   # (Server)
192.168.100.221 ser2.domain.com   ser2   # (Server)
192.168.100.229 ser5.domain.com   ser5   # (Client)

-- Save & Quit (:wq)

Step: 2. Stop Firewall & Disable the Selinux (All Nodes) :

# iptables -L
   
# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux
   
SELINUX=disabled
   
-- Save & Quit (:wq)

Step: 3. Reboot the All Servers :

# init 6
               
Step: 4. Time Synchronization NTP (Both Nodes) :

# yum -y install ntp
# chkconfig ntpd on
# ntpdate pool.ntp.org
# service ntpd start

Step: 5. Install Epel Repo (All Servers) :

# yum -y install epel-release

Step: 6. Installation Gusterfs (on ser1.domain.com & ser2.domain.com) :

# cd /tmp
# wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo
# yum -y install glusterfs glusterfs-fuse glusterfs-server

Step: 7. Installation on Client (ser5.domain.com) :

On Client execute following command to install clusterfs client side packages.

# cd /tmp
# wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo
# yum -y install glusterfs glusterfs-fuse fuse fuse-libs libibverbs
   
Step: 8. Start Glusterfs Service (on Ser1 & Ser2):

# service glusterd start
# chkconfig glusterfsd on
   
Step: 9. Creating Trusted Storage Pool (on Ser1.domain.com):

-- Trusted storage pool are the servers which are running as gluster servers and will provide bricks for volumes. You will need to probe all servers to the main server ( here : ser1 is main server ) (don't probe ser1 or localhost). We will now create all three servers in a trusted storage pool and probing will be done on ser1.

# gluster peer probe 192.168.100.221
OR
# gluster peer probe ser2

Probe successful.

# gluster peer status
   
-- To Remove Server from the Trusted Storage Pool :

# gluster peer detach ser1

Step: 10. Creating Replicated Glusterfs Server Volume (on Ser1.domain.com) :

-- A gluster volume is a logical collection of bricks where each brick is an export directory on a server in the trusted storage pool. Use replicated volumes in storage where high-availability and high-reliability are critical because replicated volumes create same copies of files across multiple bricks in the volume.

Important Note: /data is New Attached Volume for Ser1 & Ser2.

# gluster volume create rep-volume replica 2 ser1:/data ser2:/data force
   
Here: force is used as gluster permits us to create the volume in another disk only.
   
Step: 11. Starting the replicated volume (on Ser1.domain.com) :

# gluster volume start rep-volume
# gluster volume info
# gluster pool list

Step: 12. We cannot mount the /data bricks by the same name. So mounting it on /shared. on both the servers (on Ser1 & Ser2) :

# mkdir /shared
# mount -t glusterfs ser1:/rep-volume /shared
# df -h
   
-- Now add following line at the end of /etc/fstab file to make it available to server on every reboot.

# vi /etc/fstab
   
ser1.domain.com:/rep-volume /shared glusterfs defaults,_netdev 0 0

-- Save & Quit (:wq)
       
On Client Machine :
===============
You can just mount and the gluster volume is ready.
   
# mkdir /shared
# mount -t glusterfs ser1:/rep-volume /shared
# df -h
# vi /etc/fstab
       
ser1.domain.com:/rep-volume /shared glusterfs defaults,_netdev 0 0

-- Save & Quit (:wq)
   
Create a file in any of the nodes and Check the replication is working in all the nodes.

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

 

Saturday, 4 February 2017

How To Configure Pen-Load Balancer on Centos/RHEL 6x

How To Configure Pen-Load Balancer on Centos/RHEL 6x


Q. What is PEN ?

-- Install Pen to configure Load Balance server. Pen is a light weight simple load balancer. This example shows to configure on the environment like follows.

Scenario:
=======
192.168.100.229    ser5.domain.com     ser5 - PEN Server
192.168.100.220    ser1.domain.com     ser1 - Web Server1
192.168.100.221    ser2.domain.com     ser2 - Web Server2

Step: 1. Bind Hosts File (All Servers) :

# vi /etc/hosts

192.168.100.229    ser5.domain.com     ser5
192.168.100.220    ser1.domain.com     ser1
192.168.100.221    ser2.domain.com     ser2

-- Save & Quit (:wq)

Step: 2. Install and Configure Pen (192.168.100.229-ser5.domain.com) :

# cd /tmp
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh epel-release-6-8.noarch.rpm

# yum -y install pen

# vi /etc/pen.conf

-- Paste the Following Lines :

# log file
LOGFILE=/var/log/pen.log

# output file of status
WEBFILE=/var/www/pen/webstats.html

# control port
CONTROL=127.0.0.1:10080

# max connections
MAX_CONNECTIONS=500

# listen port
PORT=80

# number of backend servers
BACKEND=2

# IP address of a backend webserver
SERVER1=192.168.100.220:80

# IP address of a backend webserver
SERVER2=192.168.100.221:80

-- Save & Quit (:wq)

Step: 3. Create init Script for Pen :

# vi /etc/rc.d/init.d/pend

#!/bin/bash

# pend: Start/Stop Pend
# chkconfig: - 90 10
# description: Pen is a light weight simple load balancer.
# pidfile: /var/run/pen.pid

. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
. /etc/pen.conf

LOCKFILE="/var/lock/subsys/pen"
PID=/var/run/pen.pid
PROG=/usr/bin/pen

RETVAL=0
start() {
   echo -n $"Starting Pend: "
   SERVER=`grep "^SERVER" /etc/pen.conf | cut -d= -f2`
   daemon $PROG -w $WEBFILE -x $MAX_CONNECTIONS -p $PID -l $LOGFILE -C $CONTROL -S $BACKEND -r $PORT $SERVER
   RETVAL=$?
   echo
   [ $RETVAL -eq 0 ] && touch $LOCKFILE
   return $RETVAL
}
stop() {
   echo -n $"Stopping Pend: "
   killproc $PROG
   RETVAL=$?
   echo
   [ $RETVAL -eq 0 ] && rm -f $PID $LOCKFILE
   return $RETVAL
}
case "$1" in
   start)
      start
      ;;
   stop)
      stop
      ;;
   status)
      status pend
      ;;
   restart)
      stop
      start
      ;;
   *)
      echo $"Usage: $0 {start|stop|status|restart}"
      exit 1
esac
exit $?

-- Save & Quit (:wq)

Step: 4. Setting up Log Rotation :

# vi /etc/logrotate.d/pen

/var/log/pen.log {
   daily
   copytruncate
   compress
   notifempty
   missingok
   postrotate
     /etc/rc.d/init.d/pend restart 2>&1 > /dev/null || true
   endscript
}

-- Save & Quit (:wq)

# chmod 755 /etc/rc.d/init.d/pend
# service pend start
# chkconfig --add pend
# chkconfig pend on

Step: 5. Install & Configure Backend Web Server (Web-Server1 & Web-Server2) :

# yum -y install httpd httpd-devel
# cd /var/www/html
# vi index.html

<html>
<body bgcolor="black">
<marquee><font size="8" color="yellow"> This is Web-Server1...!!!</font></marquee>
</body>
</html>

-- Save & Quit (:wq)

# service httpd restart
# chkconfig httpd on

On Web-Server2 :

# yum -y install httpd httpd-devel
# cd /var/www/html
# vi index.html

<html>
<body bgcolor="black">
<marquee><font size="8" color="yellow"> This is Web-Server2...!!!</font></marquee>
</body>
</html>

-- Save & Quit (:wq)

# service httpd restart
# chkconfig httpd on

Step: 6. Now, Point Your Web Browser & Type :

http://192.168.100.229  # Pen Server IP Address.

Step: 7. Configure the tool that it's possible to watch Pen's Status :

# cp /usr/share/doc/pen-*/penstats /var/www/pen
# vi /var/www/pen/penstats

# Line No. 4: Change to:

PIDFILE=/var/run/pen.pid

# Line No. 5: Change to:

WEBFILE=/var/www/pen/webstats.html

-- Save & Quit (:wq)

Step: 8. Install Apache Server for See Pen Status :

# yum -y install httpd httpd-devel

# vi /etc/httpd/conf/httpd.conf

Chenge Listen Port to:

Listen 8080

-- Save & Quit (:wq)

# mv /etc/httpd/conf.d/pen.conf /etc/httpd/conf.d/pen.conf.bak
# vi /etc/httpd/conf.d/pen.conf

Alias /pen/ /var/www/pen/
<Directory /var/www/pen/>
   DirectoryIndex penctl.cgi
   Options ExecCGI
   order deny,allow
   deny from all
   allow from 127.0.0.1 192.168.100.0/24   # IP address you permit
</Directory>

-- Save & Quit (:wq)

# service httpd restart
# chkconfig httpd on
# service pend restart

Step: 10. Run the Following Command :

# chmod 755 /var/www/pen/penstats
# /var/www/pen/penstats > /dev/null

Step: 10. Schedule in Crontab (Update by 1 minutes) :

# crontab -e

*/1 * * * * /var/www/pen/penstats > /dev/null

-- Save & Quit (:wq)

# service crond restart

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog


Copyright © 2016 Kousik Chatterjee's Blog