Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu
Showing posts with label Linux-Others. Show all posts
Showing posts with label Linux-Others. Show all posts

Saturday 19 November 2016

How to Install & Configure PXE Boot Server on CentOS/RHEL 6x

How to Install & Configure PXE Boot Server on CentOS/RHEL 6x


Q. What is PXE Boot Server ?

-- PXE Server, stands for preboot Execution Environment, is used to Enable a Network Computer to boot only from a Network interface card.

PXE Environment needs Following Services :

1. DHCP server that distributes the IP addresses to the client systems.
2. TFTP Server which makes bootable images available to be downloaded via network using
    Trivial File Transfer Protocol (TFTP).
3. Syslinux package which provides bootloaders for network booting.
4. http/ftp (any one) which will host the local mounted mirrored DVD (RHEL/CentOS6) image,
    from where the installer will extract its required packages.

PXE Server Details :

OS: CentOS 6.5 Minimal Installation
IP Address: 192.168.1.52/24
Hostname: pxe.domain.com
SELinux Disabled on PXE Server
IPtables Stopped on PXE Server

Step: 1. Bind Hosts File :

# vi /etc/hosts

192.168.1.50    pxe.domain.com    pxe

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Stop Firewall :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 3. Reboot the System :

# init 6

Step: 4. Install DHCP-Server, SYSLINUX Bootloaders, TFTP-Server, Web-Server 
                 (Apache httpd),  FTP-Server (Optional) :

# yum -y install dhcp tftp-server syslinux http ftp vsftpd

Step: 5. Configure HTTP/FTP Server :

# mkdir /var/lib/tftpboot/centos6
# mount -o loop /tmp/CentOS-6.iso /var/lib/tftpboot/centos6

# vi /etc/httpd/conf.d/pxeboot.conf

Alias /centos6 /var/lib/tftpboot/centos6
<Directory /var/lib/tftpboot/centos6>
      Options Indexes FollowSymLinks
          Order Allow,Deny
          Allow from all
</Directory>

-- Save & Quit (:wq)

# service httpd start
# chkconfig httpd on

Step: 6. Manually Browse to the Server IP & Verify if you can see all the Files :

http://192.168.1.50/centos6/

Step: 7. Enable the tftp Service in Xinetd :

# cp -r /usr/share/syslinux/* /var/lib/tftpboot/
# vi /etc/xinetd.d/tftp

service tftp
{
    socket_type       = dgram
    protocol               = udp
    wait                        = yes
    user                        = root
    server                    = /usr/sbin/in.tftpd
    server_args        = -s /var/lib/tftpboot
    disable                 = no
    per_source         = 11
    cps                          = 100 2
    flags                      = IPv4
}

-- Save & Quit (:wq)

# service xinetd start
# chkconfig xinetd on

Step: 8. Configure PXE Boot Server :

# mkdir /var/lib/tftpboot/pxelinux.cfg
# vi /var/lib/tftpboot/pxelinux.cfg/default

default menu.c32
prompt 0
timeout 300
ONTIMEOUT local
menu title ########## PXE Boot Menu ##########
label 1
menu label ^1) Install CentOS 6 Edition
kernel centos6/images/pxeboot/vmlinuz
append initrd=centos6/images/pxeboot/initrd.img method=http://192.168.1.52/centos6 devfs=nomount
label 2
menu label ^2) Boot from local drive localboot

-- Save & Quit (:wq)

Step: 9. Configure DHCP Server :

# vi /etc/sysconfig/dhcpd

DHCPDARGS=eth0

-- Save & Quit (:wq)

# vi /etc/dhcp/dhcpd.conf

option domain-name "pxe.domain.com";
option domain-name-servers 192.168.1.1, 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.240 192.168.1.254;
    option routers 192.168.1.1;
    option broadcast-address 192.168.1.255;
}
allow booting;
    allow bootp;
    next-server 192.168.1.50;            # PXE Server IP Address.
    filename "pxelinux.0";

-- Save & Quit (:wq)

# service dhcpd restart
# service xinetd restart
# service httpd restart

# chkconfig dhcpd on
# chkconfig xinetd on

Note:

KERNEL - Defines the location from where the PXELINUX bootloader will load.
APPEND - Defines the location for PXE initrd image file to load.
FTP Server - There is not much Change for ftp server just replace the below line in the above file.

APPEND initrd=centos6/images/pxeboot/initrd.img method=ftp://192.168.1.6/centos6/ devfs=nomount


# mkdir /var/lib/tftpboot/centos6
OR
# mkdir /var/ftp/pub/centos6

# vi /etc/vsftpd/vsftpd.conf

anonymous_enable=YES
anon_root=/var/lib/tftpboot/centos6 # Specify the path

-- Save & Quit (:wq)

# service vsfptd restart
# chkconfig vsftpd on

ftp://192.168.1.50/centos6/

Step: 10. PXE Client Configuration :

The Client may be any System that has Network boot Enabled Option (PXE boot). You can Enable this Option in your BIOS Settings. That’s it. Now, power on the Virtual client system.

Once you have Reached PXE Menu, Choose your CentOS 6 Installation Type, hit Enter key & Continue with the Installation Procedure the same way as you might Install it from a Local Media Boot Device.

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


Sunday 13 November 2016

Install & Configure IT Operational Portal Using iTop On RHEL/CentOS 6x

Install & Configure IT Operational Portal Using iTop On RHEL/CentOS 6x


Q. What is iTop?

-- iTop, stands for IT Operational Portal, is an Open Source web based application for the day to day operations of an IT environment. iTop was designed with the ITIL best practices in mind but does not dictate any specific process, the application is flexible enough to adapt to your processes whether you want rather informal and pragmatic processes or a strict ITIL aligned behaviour.

  • Using iTop you can :
- Document your entire IT infrastructure assets such as servers, applications, network devices,
   virtual machines, contacts.. etc.
- Manage incidents, user requests, planned outages.
- Document IT services and contracts with external providers including service level agreements.
- Export all the information in a manual or scripted manner.
- Import or synchronize/federate any data from external systems.

  • Features :
- Fully configurable CMDB.
- HelpDesk and Incident Management.
- Service and Contract Management.
- Change Management.
- Configuration Management.
- Automatic SLA management.
- Automatic impact analysis.
- CSV import tool for all data.
- Consistency audit to check data quality.
- Data synchronization (data federation).

Configuration :

Step: 1. Install EPEL Repo :

# yum -y install epel-release

Step: 2. Install Apache Server :

# yum -y install httpd httpd-devel mod_ssl wget

Step: 3. Start Apache Server :

# service httpd restart
# chkconfig httpd on

Step: 4. Install Mysql Server :

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

Step: 5. Set MySQL 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 \
   php-cli graphviz

Step: 7. We need to Adjust the following PHP Settings :

# vi /etc/php.ini

post_max_size = 32M

-- Save & Quit (:wq)

Step: 8. Restart Apache Server To Load the New Configuration :

# service httpd restart

Step: 9. Download & Install iTop :

# yum -y install zip unzip
# cd /var/www/html
# wget http://sourceforge.net/projects/itop/files/itop/2.0.2/iTop-2.0.2-1476.zip
# unzip iTop-2.0.2-1476.zip
# mv web itop
# rm -rf iTop-2.0.2-1476.zip INSTALL LICENSE README

Step: 10. Create the following Directory & Make them to be Writable :

# mkdir /var/www/html/itop/conf
# mkdir /var/www/html/itop/data
# mkdir /var/www/html/itop/env-production
# mkdir /var/www/html/itop/log
# chmod 777 /var/www/html/itop/conf/
# chmod 777 /var/www/html/itop/data
# chmod 777 /var/www/html/itop/env-production/
# chmod 777 /var/www/html/itop/log

Step: 11. Finally, Install iTop Using Web Browser :

http://Server_ip_address/itop

-- Click on "Continue"
-- Select "Install a New iTOP"
-- Click on "Next"
-- I Accept the Agreement.
-- Click Next
-- MySQL Sever Details :
     Server Name: localhost,
     Login: root,
     Password: redhat

Database :

Select Create a new Database: itopdb
-- Click Next.

Administrator Account :

Login: admin
Password: Passw0rd
Confirm password: Passw0rd

-- Language: English
-- Click Next.

Sample Data :

If you directly use it in production environment, then select the second option and Click Next. I want to populate my database with some demo data’s, so checked the first option.

-- Click Next.
-- Click Next.
-- Select "Service Management for Enterprises"
-- Click Next.
-- Select "ITIL Compliant Tickets Management" & Check 'User Request Management' &  
     'Incident Management'
-- Then Click Next
-- Select "ITIL Change Management"
-- Click Next.
-- Check Both Option 'Known Errors Management' & 'Problem Management'
-- Click Next.
-- Click Install.
-- Finally Click on Enter iTop.

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

Saturday 22 October 2016

SFTP Chroot Jail Configuration on CentOS/RHEL 6.x

SFTP Chroot Jail Configuration on CentOS/RHEL 6.x


-- This tutorial describes how to give users chrooted SSH or SFTP access on CentOS. With this setup, you can give your users shell access without having to fear that they can see your whole system. Your users will be jailed in a specific directory which they will not be able to break out of.

Step: 1. Create a New Group For SFTP Users :

# groupadd sftpusers

Step: 2. Create a SFTP User :

# mkdir /var/www/html/koushik.com
# useradd -g sftpusers -d /var/www/html/koushik.com/koushik -s /sbin/nologin koushik
# passwd koushik

Step: 3. Configure SFTP Server :

# vi /etc/ssh/sshd_config

-- Find & Commented :

#Subsystem      sftp    /usr/libexec/openssh/sftp-server

-- Add those Lines :

Subsystem sftp internal-sftp
AllowUsers koushik

# User specific configuration
Match User koushik
ChrootDirectory /var/www/html/koushik.com
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

-- Save & Quit (:wq)

Step: 4. Restart SFTP/SSH Service :

# service sshd restart

Step: 5. Give Permission of Chroot Directory :

# chown -Rf koushik:sftpusers /var/www/html/koushik.com/
# chmod -Rf 755 /var/www/html/koushik.com/

Step: 6. Testing SFTP Chroot Jail :

# sftp koushik@192.168.100.229

Are you sure you want to continue connecting (yes/no)? yes

koushik@192.168.100.229's password: redhat

sftp> pwd
Remote working directory: /
sftp> cd /tmp
Couldn't canonicalise: No such file or directory
sftp> cd /etc
Couldn't canonicalise: No such file or directory
sftp> mkdir test
sftp> ls
test
sftp> bye
[root@ser2 ~]#

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

 

Wednesday 12 October 2016

Install & Configure Vsftpd Server on CentOS/RHEL 6x

Install & Configure Vsftpd Server on CentOS/RHEL 6x


Q. What is VSFTPD ?

-- vsftpd, (or very secure FTP daemon), is an FTP server that runs on Linux/UNIX Operating Systems. It is Licensed under the GNU General Public License. It supports IPv6 and SSL. VSFTP is a secure, stable, and fast FTP Server.

Step: 1. Install VSFTP Server :

# yum install -y vsftpd

Step: 2. Configure FTP Server :

# vi /etc/vsftpd/vsftpd.conf

Find these Lines :

-- At line 12:

anonymous_enable=NO

-- At lines 96 & 97 Uncommented the following :

chroot_local_user=YES
chroot_list_enable=YES

-- At line 98 Uncomment the following :

chroot_list_file=/etc/vsftpd/chroot_list

-- Just delete the # sign

userlist_enable=YES

-- Save & Exit (:wq)

Step: 3. Make the Directory Accessible to the ftp-users Group :

# useradd -d /var/www/path/to/your/dir -s /usr/sbin/nologin ftpuser1
# passwd ftpuser1
# chown -Rf ftpuser1 /var/www/path/to/your/dir
# chmod 775 /var/www/path/to/your/dir

Step: 4. Create a File Under /etc/vsftpd :

# vi /etc/vsftpd/chroot_list

-- Jail Users or Limits Users to only their home directory. To add the limited user name in the 'chroot_list'

ftpuser1
ftpuser2

-- Save & Quit (:wq)

Step: 5. To Add a nologin to the Shell :

# vi /etc/shells

-- The file should look like this:

    /bin/ksh
    /usr/bin/rc
    /usr/bin/tcsh
    /bin/tcsh
    /usr/bin/esh
    /bin/dash
    /bin/bash
    /bin/rbash

-- Add this line at the End:

    /usr/sbin/nologin

-- Save & Exit (:wq)

Step: 6. Now Create a usergroup & Add the ftpuser1 to it :

# addgroup ftp-users
# usermod -Gftp-users ftpuser1

Step: 7. Restart the FTP Service :

# service vsftpd restart
# chkconfig vsftpd on
# netstat -tulpn | grep :21
# service vsftpd status

Step: 8. Configure Firewall & Set SELinux for FTP :

# iptables -I INPUT -p tcp -m tcp --dport 20 -j ACCEPT
# iptables -I INPUT -p tcp -m tcp --dport 21 -j ACCEPT
# iptables -I INPUT -p tcp -m tcp --dport 12000:12100 -j ACCEPT
# iptables -I INPUT -p udp -m tcp --dport 12000:12100 -j ACCEPT

# setsebool -P ftpd_disable_trans=1

Step: 9. View FTP Log File :

# tail –100f /var/log/vsftpd.log

Step: 10. VSFTP Passive Port Configuration :

# vi /etc/vsftpd/vsftpd.conf

-- Add these Lines at the End:

# PASV Configurations :
pasv_promiscuous=YES
pasv_enable=YES
pasv_min_port=12000
pasv_max_port=12100
#pasv_address=X.X.X.X

# Other Parameter :
max_login_fails=5
max_per_ip=5
max_clients=10
require_ssl_reuse=NO
listen_port=21
use_localtime=YES
connect_from_port_20=NO

-- Save & Quit (:wq)

# service vsftpd restart

Step: 11. Check Connectivity through Web Browser:

ftp://192.168.72.142
Enter User name & Password.

-- Or You Can use Filezilla or Any other FTP Client.

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


Saturday 17 September 2016

How to Install & Configure Redmine 3 on Ubuntu 14.04

How to Install & Configure Redmine 3 on Ubuntu 14.04


Q. What is Redmine ?

-- Redmine is a free and open source, web-based project management and issue tracking tool, Written using the Ruby on Rails framework. It allows users to manage multiple projects and associated sub projects. It features per project wikis and forums, time tracking, and flexible role based access control.

Features :

1. Multiple Projects Support.
2. Flexible Role Based Access Control
3. Flexible Issue Tracking System etc.

Step: 1. Set Host Name :

# hostname tickets.domain.com
# vi /etc/hostname

tickets.domain.com

-- Save & Quit (:wq)

Step: 2. Bind Host File :

# vi /etc/hosts

10.100.97.137    tickets.domain.com    tickets

-- Save & Quit (:wq)

Step: 3. Update the System :

# apt-get update
# apt-get -y upgrade

Step: 4. Install Prerequisites :

# apt-get -y install apache2 apache2-utils apache2-threaded-dev apache2-prefork-dev \
    libapache2-mod-passenger make automake autoconf cmake openssl libcurl4-openssl-dev \
    libapr1-dev libaprutil1-dev libmysqlclient-dev wget

# apt-get -y install php5 libapache2-mod-php5 php5-mysql libapache2-mod-perl2 libssl-dev \
    libmagickcore-dev libmagickwand-dev curl git-core patch build-essential bison zlib1g-dev \
    libxml2-dev autotools-dev libxslt1-dev libyaml-0-2 libreadline6-dev libyaml-dev libtool \
    imagemagick libicu-dev libssh2-1 libssh2-1-dev libgpg-error-dev

Step: 5. Install Ruby & Gem with Rails :

# apt-get -y remove ruby
# curl -#LO https://rvm.io/mpapis.asc
# gpg --import mpapis.asc
# curl -sSL https://get.rvm.io | bash -s stable
# source /etc/profile.d/rvm.sh
# rvm requirements
# rvm install 2.3.0
# rvm use 2.3.0 --default

Step: 6. To Check Ruby & Gem Version :

# ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

# gem -v
2.5.1

Step: 7. Install Passenger :

# gem install passenger
# passenger-install-apache2-module

Press Enter and Press " ! " and Make Sure you Select only the 'ruby' one.

**LOOK CAREFULLY after successfully installing it give codes .we must edit in our apache. FOR ME .It may be other for you. ========================================================================
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
    PassengerRoot /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30
    PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.3.0/wrappers/ruby
</IfModule>
=========================================================================

Step: 8. To Load the Passenger Module into Apache :

# vi /etc/apache2/mods-available/passenger.load

-- Delete the LoadModule Line & Paste the Below Module.

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so

-- Save & Quit (:wq)

# vi /etc/apache2/mods-available/passenger.conf

-- Delete Everything & Paste the Below Code.

<IfModule mod_passenger.c>
    PassengerRoot /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30
    PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.3.0/wrappers/ruby
</IfModule>

-- Save & Quit (:wq)

# a2enmod passenger

Step: 9. Now, you can Download the Latest Version of Redmine :

# cd /var/www
# wget http://www.redmine.org/releases/redmine-3.0.4.tar.gz
# tar zxf redmine-3.0.4.tar.gz
# rm redmine-3.0.4.tar.gz
# mv redmine-3.0.4 redmine
# chown -R www-data:www-data /var/www/redmine
# chmod -R 775 /var/www/redmine
# touch /var/www/redmine/log/production.log
# chown root:www-data /var/www/redmine/log/production.log
# chmod 664 /var/www/redmine/log/production.log

Step: 10. Start the Apache Server :

# service apache2 restart

Step: 11. Install MySQL Server :

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

New password for the MySQL "root" user: redhat
Repeat password for the MySQL "root" user: redhat

Step: 12. Create Database for Redmine :

# mysql -u root -p
Enter Password:

mysql> create database redminedb character set utf8;
mysql> grant all privileges on redminedb.* to redmine@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 13. Now, Install the Gem file and the bundler :

# gem install rake rack i18n rubytree RedCloth mysql coderay rails jquery-rails fastercsv builder mime-types awesome_nested_set activerecord-jdbc-adapter selenium-webdriver shoulda mysql2

# cd /var/www/redmine
# gem install bundler
# bundle install --without development test rmagick

Step: 14. Setup the Database Connection for Redmine :

# cd /var/www/redmine/config
# mv database.yml.example database.yml
# vi database.yml

In the 'production' Section, update the 'database', username, password and other Parameters Accordingly like so :

production:
  adapter: mysql2
  database: redminedb
  host: localhost
  username: redmine
  password: "password"
  encoding: utf8

-- Save & Quit (:wq)

Step: 15. Create the Virtual host files for running Redmine :

# mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf.bak
# cd /etc/apache2/sites-enabled
# unlink 000-default.conf
# vi /etc/apache2/sites-available/redmine.conf

<VirtualHost *:80>
ServerName redmine

DocumentRoot /var/www/
Alias /tickets /var/www/redmine/public

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/redmine>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/redmine/public>
PassengerEnabled on
SetHandler none
PassengerAppRoot /var/www/redmine
RailsBaseURI /redmine
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>

-- Save & Quit (:wq)

# a2ensite redmine.conf

Step: 16. Restart Apache Server :

# service apache2 restart

Step: 17. Set Environment to "production" Environment :

# cd /var/www/redmine/config
# vi environment.rb

Note: If there is line uncomment it, if not just proceed ahead.

ENV['RAILS_ENV'] ||= 'production'

-- Save & Quit (:wq)

Step: 18. In Terminal, use Following Command :

# cd /var/www/redmine/
# bundle install
# RAILS_ENV=production bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
# RAILS_ENV=production bundle exec rake redmine:load_default_data

Type 'en' when asked & Press Enter.

Step: 19. Rename dispatch CGI files in /redmine/public/ :

# cd /var/www/redmine/public
# mv dispatch.fcgi.example dispatch.fcgi
# cp htaccess.fcgi.example .htaccess

Step: 20. Fix Rights for the Apache user :

# chown -Rf www-data:www-data /var/www/redmine

Step: 21. Restart the Apache Server :

# service apache2 restart

Step: 22. Point Your Web Browser & Type :

http://ip_address_server/redmine
or
http://domain_name/redmine
User: admin
Pass: admin

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

Saturday 3 September 2016

How To Install & Configure OpenFire on RHEL/Centos 6x

How To Install & Configure OpenFire on RHEL/Centos 6


Q. What is Openfire?

-- Openfire is an Instant Messaging and Group chat server, written in Java that uses XMPP (Extensible Messaging and Presence Protocol) server. Wikipedia reports, Openfire was previously called as ‘Wildfire‘ and ‘Jive Messenger‘. The Application Software is developed by Jive Software and a community called ‘IgniteRealtime.org‘, and is Licensed under Apache License.

Openfire Features :

- Web Based Admin control
- SSL/TLS support
- LDAP connectivity
- User Friendly
- Platform Independent

Openfire Installation :

Step: 1. Bind Host File :

# vi /etc/hosts

192.168.100.220    ser1.domain.com    ser1

-- Save & Quit (:wq)

Step: 2. Disable Selinux :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# init 6


Step: 3. Install Java ( lastest version is preferred) :

# cd /opt
# wget --no-check-certificate --no-cookies --header 'Cookie: oraclelicense=accept-securebackup-cookie' http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.rpm
   
# yum -y install jdk-8u5-linux-x64.rpm
# yum -y install libldb.i686

Step: 4. Setup Environment Variables :

Setup JAVA_HOME Variable :
   
# export JAVA_HOME=/usr/java/jdk1.8.0_05
# export PATH=$PATH:$JAVA_HOME
# echo $JAVA_HOME

Step: 5. Edit the Java Profile :

# vi /etc/profile.d/java.sh

#!/bin/bash
JAVA_HOME=/usr/java/jdk1.8.0_05
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
export CLASSPATH=.

-- Save & Quit (:wq)

# chmod +x /etc/profile.d/java.sh
# source /etc/profile.d/java.sh

Step: 6. Check Version of JAVA :

# java -version
   
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Client VM (build 25.5-b02, mixed mode)

Step: 7. Install the Openfire Dependencies :

# yum -y install httpd httpd-devel wget
# service httpd restart
# chkconfig httpd on

Step: 8. Download the Openfire RPM using wget Command :

# cd /tmp
# wget http://download.igniterealtime.org/openfire/openfire-3.9.3-1.i386.rpm

Step: 9. Install the OpenFire RPM :

# rpm -Uvh openfire-3.9.3-1.i386.rpm

Step: 10. Once the RPM has been installed, Start the OpenFire service :

# service openfire start

Step: 11. Ensure that OpenFire will boot with your Server :

# chkconfig openfire on

Step: 12. For this instance, you’ll want to make sure iptables is not running, you can Configure the iptables rules how you need them later :

# service iptables stop
# chkconfig iptables off

Step: 13. Install MySQL Server with MySQL Connector :

# yum -y install mysql mysql-server mysql-connector-java

Step: 14. Start MySQL Server :

# service mysqld restart
# chkconfig mysqld on

Step: 15. Set MySQL Root Password :

# mysql_secure_installation

Step: 16. Create Database for OpenFire :

# mysql -u root -predhat

mysql> CREATE DATABASE openfire;
mysql> grant all on openfire.* to openfire@'localhost' identified by 'password';
mysql> grant all on openfire.* to openfire@'%' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 17. Navigate in your Web Browser To :

Note: If Showing any JAVA Error while Installing the OpenFire through Web Browser then Restart the Server Once.

http://yourip_address:9090

-- Choose Language: (English)
-- Click on "Continue"

-- Server Settings:
     Domain: (127.0.0.1)
     Admin Console Port: (9090)
     Secure Admin Console Port: (9091)

Note: Don't Change Admin Port and Secure Admin Port. Generally you don’t need to change these data, until you need a custom port.

-- Select "Blowfosh"-- Property Encryption Key: (Leave it Blank)
-- Click on "Continue"

-- Database Settings:
-- Select "Standard Database Connection".
-- Click on "Continue"

-- Database Settings - Standard Connection :
     Database Driver Presets: Select MySQL
     Database URL:  jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true
     Username: openfire
     Password: password
     Minimum Connections: 5
     Maximum Connections: 25
-- Click on "Continue"

-- Profile Settings: Select Default
-- Click on "Continue"

-- Administrator Account:
     Admin Email Address: kchatterjee@kminfosystems.com
     New Password: Passw0rd
     Confirm Password: Passw0rd
-- Click on "Continue"

-- Finally Click on "Login to the Admin Console"

Note: Login to Openfire Admin User using username 'admin' and password, the one we set above.

User: admin
Pass: Passw0rd

Step: 18. To Create OpenFire Chat User :

-- Click on Users/Groups (Tabs)
-- Click on Create New User.
-- Fill the User Details.
-- Click on "Create User"'.

Step: 19. Installation of Spark Client :

Download and Install cross platform Spark client for your system using the below link.

http://www.igniterealtime.org/downloads/index.jsp

Once you’ve installed Spark client, open the application and enter username, password and IP addresss of openfire server.

User Name: koushik
Password: Passw0rd
Server IP: 192.168.100.221

-- Check on Save Password.
-- Check on Auto Login
-- Click on Login

Once you logged in you can chat with the users who are online.

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


Friday 26 August 2016

Install & Configure Help Desk System Using OTRS On CentOS/RHEL 6x

Install & Configure Help Desk System Using OTRS On CentOS/RHEL 6x


Q. What is OTRS ?

-- OTRS is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. With a fast implementation and easy customization to your needs it helps you reducing costs and increasing the efficiency and transparency of your business communication.

Step: 1. Bind Host File :

# vi /etc/hosts

10.100.99.13    ser3.domain.com    ser3

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Stop Firewall :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Note: If Iptables service is on, then Adjust iptables to allow Apache Default Port 80.

# vi /etc/sysconfig/iptables

Add the Following Line in Filter Table :

-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

-- Save & Quit (:wq)

# service iptables restart

Step: 3. Reboot the System :

# init 6

Step: 4. Install EPEL Repository :

# yum -y install epel-release

Step: 5. Install MySQL Server :

# yum -y install mysql mysql-server

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

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation

Step: 7. To Change Engine MyISM to InnoDB & Restart MySQL Service :

# vi /etc/my.cnf

-- Add the Following Lines under the [mysqld] Section :

max_allowed_packet=20M
query_cache_size=32M
innodb_log_file_size = 500M
default-storage-engine = InnoDB

-- Save & Quit (:wq)

# service mysqld stop
# mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak
# mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak

# service mysqld restart

Step: 8. Create Database For OTRS :

# mysql -u root -p
Enter Password:

mysql> create database otrsdb;
mysql> grant all privileges on otrsdb.* to otrsuser@localhost identified by 'password';
mysql> flush privileges;
mysql> \q

Step: 9. Install Apache Web Server :

# yum -y install httpd httpd-devel wget

Step: 10. Start Apache Service :

# service httpd restart
# chkconfig httpd on

Step: 11. Download & Install OTRS RPM Package :

# cd /mnt
# wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-5.0.10-01.noarch.rpm
# yum -y install otrs-5.0.10-01.noarch.rpm

Step: 12. Restart Apache Service :

# service httpd restart

Step: 13. Install Additional PERL Modules :

# /opt/otrs/bin/otrs.CheckModules.pl

# yum -y install "perl(Crypt::Eksblowfish::Bcrypt)" "perl(DBD::ODBC)" "perl(DBD::Pg)" "perl(Encode::HanExtra)" "perl(GD)" "perl(GD::Text)" "perl(GD::Graph)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(PDF::API2)" "perl(Text::CSV_XS)" "perl(YAML::XS)"

# /opt/otrs/bin/otrs.CheckModules.pl

Step: 14. Now Install OTRS Through Web Browser :

http://10.100.99.13/otrs/installer.pl

-- Click on "Next".
-- Click on "Accept License & Continue".
-- Database Selection:
     Type: MySQL
     Install Type: Use an existing database for OTRS

-- Click on "Next".
-- Configure MySQL:
     User: otrsuser
     Password: password
     Host: 127.0.0.1
     Database Name: otrsdb
-- Click on "Check Database Settings".
-- Click on "Next".
-- Click on "Next".
-- System Settings:
     AdminEmail: koushik@domain.com
     Organization: Your Organization
-- Click on "Next".
-- Mail Configuration: For Now Skip this Step.

Step: 15. Now Login OTRS Admin Panel :

http://10.100.99.13/otrs/index.pl

User: root@localhost
Password: LvMiOnXJAu2U7Vg6

-- Click on "Login".

Step: 16. To Resolve OTRS Daemon is not running, Do the Following :

# useradd otrs
# chmod -Rf 777 /opt/otrs/Kernel/Config/Files/
# su - otrs
$ /opt/otrs/bin/otrs.Daemon.pl start
$ /opt/otrs/bin/Cron.sh start

Step: 17. To Change Admin Password :

http://10.100.99.13/otrs/index.pl

User: root@localhost
Password: LvMiOnXJAu2U7Vg6

-- Click on "Edit Personal Peferences"
-- Change Password:
     Current password: LvMiOnXJAu2U7Vg6
     New Password: Passw0rd@123
     Verify Password: Passw0rd@123
-- Click on "Update".

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


Sunday 7 August 2016

Install & Configure CVS (Concurrent Versions System) on RHEL/CentOS 6x

Install & Configure CVS (Concurrent Versions System) on RHEL/CentOS 6x


Q. What is CVS ?

-- The Concurrent Versions System (CVS), also known as the Concurrent Versioning System. CVS can be used for source or content control in the field of software development.

Step: 1. Install CVS :

# yum -y install cvs*

Step: 2. Verify CVS :

# cvs -v
Concurrent Versions System (CVS) 1.11.23 (client/server)

Step: 3. Initialize the CVS Repository :

# cvs -d /home/cvs/project1 init

Note: Once initialized, you’ll see CVSROOT directory created under the CVS repository.

Step: 4. Make some initial Changes before Starting the CVS Server :

# vi /etc/xinetd.d/cvs

service cvspserver
{
        disable                 = no
        port                       = 2401
        socket_type      = stream
        protocol              = tcp
        wait                       = no
        user                       = root
        passenv               = PATH
        server                   = /usr/bin/cvs
        env                         = HOME=/home/cvs
        server_args       = -f --allow-root=/home/cvs/project1 pserver
        bind                       = 192.168.72.220
}

-- Save & Quit (:wq)

Step: 5. Restart the xinetd Services :

# service xinetd restart
# chkconfig xinetd on

Step: 6. Verify that the Service is Running & Listening :

# netstat -ntlp | grep 2401

tcp     0   0   192.168.72.220:2401      0.0.0.0:*   LISTEN      18337/xinetd

Step: 7. Create CVS User & Groups :

# useradd cvs
# passwd cvs

Step: 8. Create CVS Repository Directory :

# cd /home/cvs
# mkdir project1

# chmod -Rf 775 /home/cvs/project1
# chown -Rf cvs:cvs /home/cvs/project1

Step: 9. Client login into CVS server :

# cvs -d :pserver:cvs@192.168.72.220:/home/cvs/project1 login

Another Way to Login :

# export CVSROOT=:pserver:cvs@192.168.72.220:/home/cvs/project1

# cvs login
Logging in to :pserver:cvs@192.168.72.220:/home/cvs/project1
CVS password:


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

 

Sunday 31 July 2016

How To Install & Configure x11vnc Server on Ubuntu 14.04

Install & Configure x11vnc Server on Ubuntu

Q. What is VNC?

-- Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer.

Step: 1. Update the System :

# apt-get update

Step: 2. Install VNC :

# apt-get -y install x11vnc

Step: 3. Create VNC Password & Save the Password to /etc/x11vnc.pass :

# x11vnc -storepasswd password /etc/x11vnc.pass 

(Here vnc password will be password)

Step: 4. Make the x11vnc Service Starting at Boot Time :

# vi /etc/init/x11vnc.conf

start on login-session-start
script
/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log
end script

-- Save & Quit (:wq)

Step: 5. Run this Command to Start the x11vnc without Reboot :

# /usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log

Step: 6. Install VNC viewer & Connect the Server :


https://www.realvnc.com/download/viewer/ 

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

 

Monday 18 July 2016

How To Install & Configure Bamboo on CentOS/RHEL 6.x

Install & Configure Bamboo on CentOS/RHEL 6.x


Q. What is Bamboo Server ?
-- Bamboo is a continuous integration (CI) server that can be used to automate the release management for a software application, creating a continuous delivery pipeline.

Bamboo


Requirements :
===========
1. Centos 6.x
2. Apache
3. Java
4. Bamboo License


Note: Get a Bamboo Server License from https://id.atlassian.com/login?application=mac&continue=https://my.atlassian.com. Create a Account here and Get the License Key (Valid for 30 Days)

Step: 1. Stop the IPTables & Disable Selinux :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

Step: 2. Update the Date & Time on the Server :

# yum -y install ntp
# service ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on
# init 6

Step: 3. Bind Hosts File :

# vi /etc/hosts

192.168.72.220    bamboo.domain.com    bamboo

-- Save & Quit (:wq)

Step: 4. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 5. Configure Virtual Host for Bamboo :

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

-- Changes the Following Lines :

# Line Number 44 - change from OS
ServerTokens Prod

# Line Number 76 - change to ON
KeepAlive On

# Line Number 338 change from None
AllowOverride All

# Line Number 402 add file name that it can access only with directory's name
DirectoryIndex index.html index.htm

# Line Number 536 change from On
ServerSignature Off

# Line Number 759 comment out
# AddDefaultCharset UTF-8

# Add at last of the file
RewriteEngine on
CheckCaseOnly On

-- Save & Quit (:wq)

# vi /etc/httpd/conf.d/bamboo.domain.com.conf

<VirtualHost *:80>
    ServerName bamboo.domain.com

    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy *>
        Order Deny,Allow
        Allow from all
    </Proxy>

    ProxyPass / http://localhost:8085/
    ProxyPassReverse / http://localhost:8085/

    <Location /bamboo>
        Order Allow,Deny
        Allow from all
    </Location>
</VirtualHost>

-- Save & Quit (:wq)

# cd /var/www/html
# vi index.html

<html>
<head>
    <title>Restricted Zone...!!!</title>
</head>
<body>
    <p>Restricted Zone...!!!</p>
</body>
</html>

-- Save & Quit (:wq)

Step: 6. Install & Configure Java :

# cd /opt
# wget http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz
# alternatives --install /usr/bin/java java /opt/jdk1.8.7/bin/java 2
# alternatives --config java

There may Be more that 1 programs which provide 'java'. Select the version Which is downloaded.

Selection    Command
-----------------------------------------------
*  1           /opt/jdk1.7.0_71/bin/java
 + 2           /opt/jdk1.8.0_45/bin/java
   3           /opt/jdk1.8.7/bin/java
  
Enter to keep the current selection[+], or type selection number: 3

# vi /etc/profile.d/java.sh

#!/bin/bash
JAVA_HOME=/opt/jdk-9/
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
export CLASSPATH=.

-- Save & Quit (:wq)

# export JAVA_HOME=/opt/jdk1.8.7/
# chmod 755 /etc/profile.d/java.sh
# source /etc/profile.d/java.sh

Step: 7. Download & Install Bamboo :

# cd /opt
# wget https://downloads.atlassian.com/software/bamboo/downloads/atlassian-bamboo-5.10.1.1.tar.gz
# tar -zxvf atlassian-bamboo-5.10.1.1.tar.gz
# mv atlassian-bamboo-5.10.1.1 bamboo
# cd bamboo
# vi /opt/bamboo/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties

-- Add this Line :

bamboo.home=/opt/bamboo

-- Save & Quit (:wq)

# sh /opt/bamboo/bin/start-bamboo.sh

Step: 8. Browse bamboo.domain.com (Bind the Site Address to your pc's Host File) :

http://bamboo.domain.com

Give the License Key & Follow with the Express Installation Instructions.

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

Saturday 2 July 2016

How To Install Oracle Java on Ubuntu 14.04 Server

How To Install Oracle Java on Ubuntu Server

About JAVA :

-- Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable.

Step: 1. Update the System :

# apt-get update

Step: 2. Add Java Repository :

# add-apt-repository ppa:webupd8team/java

If asked press Enter

# apt-get update

Step: 3. Install Oracle JDK 7 or JDK 8:

# apt-get install oracle-java7-installer

or
# apt-get install oracle-java8-installer
 
Step: 4. Setting the "JAVA_HOME" environment variable :

To set the JAVA_HOME environment variable, which is needed for some programs, first find out the path of your Java installation:

# apt-get install oracle-java7-set-default

or
# apt-get install oracle-java8-set-default
 
#  vi /etc/environment

JAVA_HOME="/usr/lib/jvm/java-7-oracle/jre/bin/java"

or
JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java"
 
-- Save & Quit (:wq)

# source /etc/environment
# echo $JAVA_HOME

Step: 5. Check Java Version :

# java -version

java version "1.7.0_76"
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)


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

 

Monday 27 June 2016

How To Install & Configure Drupal on CentOS/RHEL 6x

How To Install & Configure Drupal on CentOS/RHEL 6x


Q. What is Drupal?

-- Drupal is content management software. The application includes a content management platform and a development framework. It's used to make many of the websites and applications you use every day. Drupal has great standard features, like easy content authoring, reliable performance, and excellent security.

Step: 1. Bind Hosts File :

# vi /etc/hosts

10.100.99.247           ser1.domain.com    ser1

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Stop Firewall :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 3. Install NTP Server (for Time Syncronization) :

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

Step: 4. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 5. Install MySQL Server 5.6 :

# rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
# yum -y install mysql mysql-server

Step: 6. Install PHP 5.6 :

# yum -y install epel-release
# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
# yum -y install php56w php56w-devel php56w-common php56w-mbstring php56w-gd \
   php56w-xml php56w-mcrypt php56w-mysqlnd php56w-imap php56w-pdo \
   php56w-snmp php56w-soap php56w-xmlrpc php56w-opcache php56w-iconv mod_ssl wget

Step: 7. Start Apache Service :

# service httpd restart
# chkconfig httpd on

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

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation

Step: 9. Create Database for Drupal :

# mysql -u root -p
Enter the Password:

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

Step: 10. Download & Extract Drupal Source Code :

# cd /var/www/html/
# wget https://ftp.drupal.org/files/projects/drupal-8.1.0.tar.gz
# tar -zxvf drupal-8.1.0.tar.gz
# mv drupal-8.1.0 drupal
# chown -Rf apache:apache /var/www/html/drupal

Step: 11. We need to Create Settings file from the default.settings.php File :

# cd /var/www/html/drupal/sites/default/
# cp -p default.settings.php settings.php
# chmod a+w /var/www/html/drupal/sites/default/settings.php
# chmod a+w /var/www/html/drupal/sites/default

Step: 12. Enable Apache mod_rewrite Module :

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

Line No: 338

AllowOverride None To AllowOverride All

At the End, Add this Line :

RewriteEngine on

-- Save & Quit (:wq)

# service httpd restart

Step: 12. Install Drupal Through Web Browser :

http://10.100.99.247/drupal/core/install.php

-- Choose Language: English & Click on "Save & Continue"
-- Choose Profile: Standard & Clcik on "Save & Continue"
-- Database Configuration:
     Database Name: drupaldb
     Database Username: drupal
     Database Password: password
  
-- Clcik on "Save & Continue".
-- SITE INFORMATION:
     Site Name: domain.com
     Site Email Address: koushik@domain.com
-- SITE MAINTENANCE ACCOUNT:
     Username: admin
     Password: Passw0rd
     Confirm Password: Passw0rd
-- REGIONAL SETTINGS:
     Default Country: India
-- Click on "Save & Continue"
  
Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Tuesday 21 June 2016

How To Enabling YUM Automatic Updates & Send Mail in CentOS/RHEL 6x

Enabling YUM Automatic Updates & Send Mail in CentOS/RHEL 6x

Step: 1. Install Yum-Cron Package :

# yum -y install yum-cron

Step: 2. Configure Yum-Cron :

Note: By default, this software is configured to download all the updates & apply them immediately after downloading, but we can change these behaviors in its configuration file. In my opinion the default is good for what i want to achieve, download & install all the updates, if you just want a mail that tell you which packages are available set the parameter CHECK_ONLY to yes, this will NOT download the updates but will just check if there are updates & will send an email to the root account if there is something that can be updated.

# vi /etc/sysconfig/yum-cron

# Don't install, just check (valid: yes|no)
CHECK_ONLY=yes

# Don't install, just check & download (valid: yes|no)
DOWNLOAD_ONLY=no

# by default MAILTO is unset, so crond mails the output by itself.
MAILTO=koushik@domain.com

-- Save & Quit (:wq)

Step: 3. Block Packages from being Automatically Updated :

Note: If you want to exclude some packages from being updated.

# vi /etc/yum.conf

YUM_PARAMETER="-x kernel* -x php* -x httpd*"

-- Save & Quit (:wq)

Step: 4. Start Yum-Cron Service :

# service yum-cron start
# chkconfig yum-cron on

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

Sunday 22 May 2016

How To Configure NFS Server With Client on RHEL/Contos 6x

How To Configure NFS Server With Client on RHEL/Contos 6x

Q. What is NFS?

-- NFS stands for Network File System, a file system developed by Sun Microsystems, Inc. It is a client/server system that allows users to access files across a network and treat them as if they resided in a local file directory. For example, if you were using a computer linked to a second computer via NFS, you could access files on the second computer as if they resided in a directory on the first computer.

Scenario :

192.168.100.220    ser1.domain.com    (NFS Server)
192.168.100.221    ser2.domain.com    (NFS Client)

Used Ports :

TCP: 111, 2049
UDP: 111, 32806

Here :
/assets and /var/www/html/domain.com/assets

These two are the directory, which are going to be share via NFS.

Step: 1. Install NFS Server ( On Server) :

# yum -y install nfs-utils rpcbind

Step: 2. Configure NFS Server :

# vi /etc/exports

# Access For All :
/assets      *(rw,async)
/var/www/html/domain.com/assets     *(rw,async)

OR

# Access For Particular Network :
/assets      192.168.100.0/24(rw,async)
/var/www/html/domain.com/assets     192.168.100.0/24(rw,async)

-- Save & Quit (:wq)

Important Note :
============



Step: 3. To Exexute the Changes made on /etc/exports :
   
# exportfs -ar

Step: 4. Restart the NFS Service :
   
# service rpcbind restart
# service nfs restart
# service nfslock restart

# chkconfig rpcbind on
# chkconfig nfs on
# chkconfig nfslock on

Step: 5. Install NFS on Client Machine :

# yum -y install nfs-utils rpcbind

Step: 6. Configure NFS Client :

# showmount -e NFS_Server_IP_Address

Export list for 192.168.100.220:
/assets 192.168.100.221
/var/www/html/domain.com/assets 192.168.100.221


Step: 7. Create a new Directory on your Client & Mount the NFS Export to the Directory :
   
# mkdir /assets
# mkdir -p /var/www/html/domain.com/assets
# mount -t nfs 192.168.100.220:/assets /assets
# mount -t nfs 192.168.100.220:/var/www/html/domain.com/assets /var/www/html/domain.com/assets

Step: 8. Restart the NFS Service :

# service rpcbind restart
# service nfs restart
# service nfslock restart

# chkconfig rpcbind on
# chkconfig nfs on
# chkconfig nfslock on

Step: 9. Finally, Mount NFS Directory Permanently on your System across the Reboots :

# vi /etc/fstab

192.168.100.220:/assets    /assets       defaults 0 0
192.168.100.220:/var/www/html/domain.com/assets   /var/www/html/domain.com/assets  nfs defaults 0 0

-- Save & Quit (:wq)

Step: 10. After any subsequent Server reboots, You can use a Single Command to mount Directories specified in the fstab file :

# mount -a

Step: 11. Now You can check the Mounted Directories :

# df -h -F nfs

Important commands for NFS :
  1. showmount -e : Shows the available shares on your local machine
  2. showmount -e <server-ip or hostname>: Lists the available shares at the remote server
  3. showmount -d : Lists all the sub directories
  4. exportfs -v : Displays a list of shares files and options on a server
  5. exportfs -a : Exports all shares listed in /etc/exports, or given name
  6. exportfs -u : Unexports all shares listed in /etc/exports, or given name
  7. exportfs -r : Refresh the server’s list after modifying /etc/exports
Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Sunday 15 May 2016

Install & Configure Memcached With phpMemcachedAdmin on CentOS/RHEL 6x

Install & Configure Memcached With phpMemcachedAdmin on CentOS/RHEL 6x

Q. What Is Memcached ?

-- Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

Step: 1. Bind Hosts File :

# vi /etc/hosts

192.168.72.141    memcache.domain.com    memcache

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Stop Firewall :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 3. Reboot the System :

# init 6

Step: 4. Configure EPEL Repo :

# yum -y install epel-release

Step: 5. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 6. Install PHP :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-xmlrpc php-snmp

Step: 7. Install Memcached :

# yum -y install memcached

Step: 8. Configure Memcached :

# vi /etc/sysconfig/memcached

# Running on Port 11211
PORT="11211"

# Start as memcached daemon
USER="memcached"

# Set max simultaneous connections to 1024
MAXCONN="1024"

# Set Memory size to 2048 - 4GB(4096)
CACHESIZE="2048"

# Set server IP address
OPTIONS="-l 192.168.72.141"

-- Save & Quit (:wq)

Step: 9. Start Memcached :

# chkconfig memcached on
# service memcached start
# service memcached status

Step: 10. Verifing Memcached :

# netstat -tulpn | grep :11211

# memcached-tool 192.168.72.141 stats

Step: 11. Install Memcached PHP Extension :

# yum -y install php-pecl-memcached php-pecl-memcache

Step: 12. Install Memcached Perl Library :

# yum -y install perl-Cache-Memcached

Step: 13. Install Memcached Python Library :

# yum -y install python-memcached

Step: 14. Star Apache Server :

# service httpd restart
# chkconfig httpd on

Step: 15. Configure Memcache For Web Monitoring :

# cd /var/www/html
# mkdir memcached
# cd memcached
# wget http://phpmemcacheadmin.googlecode.com/files/phpMemcachedAdmin-1.2.2-r262.tar.gz
# tar -xvzf phpMemcachedAdmin-1.2.2-r262.tar.gz
# chmod +rx *
# chmod 0777 Config/Memcache.php
# chmod 0777 Temp/
# rm phpMemcachedAdmin-1.2.2-r262.tar.gz

Step: 16. Configure Apache Password Protected Directory :

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

<Directory /var/www/html/memcached>
        Options -Indexes +Multiviews
           DirectoryIndex index.php index.html
        AllowOverride AuthConfig

        AuthUserFile /etc/httpd/.htpasswd
        AuthName "phpMemcachedAdmin Login Area"
        AuthType Basic
        require user memadmin
        

        Allow from all
</Directory>

-- Save & Quit (:wq)


Step: 17. Setup AuthUserFile for Apache :

# htpasswd -cm /etc/httpd/.htpasswd memadmin

New password:
Re-type new password:
Adding password for user memadmin


Step: 18. Restart Apache Service & Access URL :

# service httpd restart

http://192.168.72.141/
memcached

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


memcached is an open source distributed memory object caching system used for accelerating applications.  - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf

Friday 29 April 2016

Linux Tmux Vs Screen Command

Linux Tmux Vs Screen Command


Q. What is tmux ?

-- tmux is a software application that can be used to multiplex several virtual consoles, allowing a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session.

Q. What is Screen ?

-- Screen is a full-screen software program that can be used to multiplexes a physical console between several processes (typically interactive shells). It offers a user to open several separate terminal instances inside a one single terminal window.

Step: 1. Install tmux :

# yum -y install epel-release
# yum -y install tmux

Step: 2. Install Screen :

# yum -y install screen

Tmux Vs Screen
Tmux Vs Screen
Tmux Vs Screen

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

Tuesday 15 March 2016

How To Install & Configure Zpanel on Centos/RHEL 6x

How To Install & Configure Zpanel on Centos/RHEL 6x

Q. What is Zpanel ?

Ans: ZPanel is a free and complete web hosting control panel for Microsoft® Windows™ and POSIX (Linux, UNIX and MacOSX) based servers. ZPanel is written in PHP and uses several open-source (or freely available) software packages to provide a secure, web hosting system.

Step: 1. Disable Selinux & Iptables :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 2. Download the correct Installer for your System :

# cd /tmp
# wget http://www.zvps.co.uk/downloads/centos/10-1-0/updater-10-1-0-centos-64.sh.x.tar.gz
# tar -xf updater-10-1-0-centos-64.sh.x.tar.gz

Step: 3. Install pre-required Packages :

# yum -y install ld-linux.so.2 curl

Step: 4. Change the Script to be Executable :

# chmod +x updater-10-1-0-centos-64.sh.x
# ./installer-10-1-0-centos-64.sh.x

Set Time Zone : Asia/Kolkata
Enter -> Enter -> Enter.

Note: The Zadmin, MySQL root & postfix passwords are all stored in /root/passwords.txt after installation.

Lastly run the following command to fix the zpanel stored IP (broken api call) REPLACE 0's with your actual public IP:

# setso --set server_ip 000.000.000.000

Step: 5. Open Your Web Browser & Type :

http://192.168.72.140

MySQL Root Password    : 0lENKKZ4zOKO4qcD
MySQL Postfix Password : eyiF5v0emD5tYDnB
ZPanelX Username       : zadmin        
ZPanelX Password       : L6XOGulJj1JeoqYR

Step: 6. To Change Zpanel Admin Password :

Go to Account Information -> Change Password -> Type Current Password & New Password -> Change.

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

Sunday 13 March 2016

How to Install Bitcoin XT node on Ubuntu Server 14.04 LTS

How to Install Bitcoin XT node on Ubuntu Server 14.04 LTS

Q. What is Bitcoin ?

Ans: Bitcoin is digital currency in which encryption techniques are used to regulate the generation of units of currency. In 2009 by an unknown person using the alias Satoshi Nakamoto. It is the first decentralized peer-to-peer payment network that is powered by its users with no central authority or middlemen – meaning, no banks! No one controls it. There are no transaction fees and no need to give your real name.

OS: Ubuntu Server 14.04 LTS
Minimum HDD Size: 120 GB
Minimum RAM:  3.5 GB
CPU: 2 Cores

Step: 1. Install Prerequisites :

# apt-get update
# apt-get -y install python-software-properties
# apt-get -y install build-essential libboost-all-dev automake libtool autoconf
# apt-get -y install libdb++-dev
# apt-get -y install libboost-all-dev
# apt-get -y install pkg-config
# apt-get -y install libssl-dev
# apt-get -y install libcurl4-openssl-dev
# apt-get -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
# apt-get -y install git

Step: 2. Install BitcoinXT :

# cd
# git clone https://github.com/bitcoinxt/bitcoinxt
# cd bitcoinxt
# ./autogen.sh
# ./configure --with-cli=yes --with-gui=no --disable-wallet
# make
# make install

Step: 3. We will Run bitcoind once so it Generates the proper Directories :

# bitcoind -server

Step: 4. Configure BitcoinXT :

# echo 'rpcuser=bitcoinrpc' > ~/.bitcoin/bitcoin.conf   (Default Bitcoin XT User)
# echo 'rpcpassword=6Q9k65HhrgA1ghY1chr2x4776AwEkkf1eH5eZ7Fh7dXk' >>  ~/.bitcoin/bitcoin.conf  (Default Bitcoin XT Password)
# echo 'server=1' >>  ~/.bitcoin/bitcoin.conf

Step: 5. Verify config-file Values are in the file :

# cat ~/.bitcoin/bitcoin.conf

Step: 6. To Check this has Worked perform the Following :

# cd ~/.bitcoin
# ls -al

"blocks" should be in a cyan colour and look like this: blocks -> /media/data/blocks Node that it's the current user, bitcoin, that has file access.

Step: 7. The Daemon should now be ready to Start :

# bitcoind -daemon

Step: 8. Type the Following to run a Small Test :

# bitcoin-cli getinfo

The output should be something like this :

{
    "version" : 110000,
    "protocolversion" : 70010,
    "blocks" : 90012,
    "timeoffset" : -1,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 3091.73689041,
    "testnet" : false,
    "relayfee" : 0.00001000,
    "errors" : ""
}

Step: 9. Also, go to https://getaddr.bitnodes.io/ & type in the node network address. ex: 192.168.72.10 & click "CHECK NODE".

Something like the following should show to verify you are running BitcoinXT:

192.168.72.10:8333 /Bitcoin XT:0.11.0/

Step: 10. To Check Block Chain :

https://blockchain.info/

# bitcoin-cli getblockcount

Step: 11. To Check BitcoinXT Version :

# bitcoind -version

Bitcoin XT Daemon version v0.11.0.0-fa6040a
Copyright (C) 2009-2015 The Bitcoin XT Developers

Step: 12. To Check Debug Log files :

# tail -100f ~/.bitcoin/debug.log

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

Wednesday 9 March 2016

How to Install & Configure Prestashop On RHEL/Centos 6x

How to Install & Configure Prestashop On RHEL/Centos 6x


Q. What is Prestashop ?

Ans: PrestaShop is a free, open source e-commerce solution. It supports payment gateways such as DirecPayDirecPay,Google Checkout, Authorize.Net, Skrill, PayPal and PayPal Payments Pro via their respective APIs.


Step: 1. Install Apache Server & Dependency :


# yum -y install httpd httpd-devel zip unzip wget

Step: 2. Edit httpd.conf file :

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

#ServerName www.example.com:80

Add this Line :
ServerName ip address of server:80

-- Save & Quit (:wq)

Step: 3. Download & Configure PrestaShop :

# cd /var/www/html
# wget https://prestashop.googlecode.com/files/prestashop_1.5.6.2.zip
# unzip prestashop_1.5.6.2.zip

# chmod -Rf 777 /var/www/html/prestashop


Step: 4. Edit the /etc/httpd/conf/httpd.conf File :

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

Add those Lines :

<Directory /var/www/html/prestashop>
    Options +Indexes +Multiviews
       DirectoryIndex index.php index.html
    AllowOverride All
    Allow from all
</Directory>

-- Save & Quit (:wq)


Step: 5. Install MySQL Database Server :

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

Step: 6. Start MySQL Service :

# service mysqld start

Step: 7. Changing MySQL Root Password :

# mysql_secure_installation

Press Enter --> Y --> Give the Root Password --> Enter --> n --> Enter --> n --> Enter --> n --> Enter.

Step: 8. Create Database for PrestaShop :

# mysql -u root -p

-- Give root Password.

Mysql> create database prestashop character set utf8;
Mysql> grant all privileges on prestashop.* to 'presta'@'localhost' identified by 'password';
Mysql> grant all privileges on prestashop.* to 'presta'@'%' identified by 'password';
Mysql> flush privileges;
Mysql> exit

Step: 9. Install PHP5 Scripting Language :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

Step: 10. Create a file named /var/www/html/info.php :

# vi /var/www/html/info.php

<?php
  phpinfo();
?>

-- Save & Quit (:wq)

Step: 11. Restart Apache to load php :

# service httpd restart
# chkconfig httpd on
# service mysqld restart
# chkconfig mysqld on

Step: 12. Then point your browser to http://ip address/info.php :

Ex- http://192.168.72.140/info.php

Step: 13. Configure PrestaShop Server :


Go to http://192.168.72.140/prestashop

Select Language: English -> Next -> I Agree -> Next -> Shop Name: server1.kmi.com, Main activity: Select anything, Country: Select Country, First Name: Koushik, Last Name: Chatterjee, Email Address: your-email@domain.com, Shop Password: Password, Re-type to confirm: Password -> Next -> Database Server Add: localhost, DB Name: prestashop, DB Login: presta, DB Password: password -> Next.

# cd /var/www/html/prestashop
# rm -rf install

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

Copyright © 2016 Kousik Chatterjee's Blog