Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

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

 

Saturday 23 July 2016

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

Install & Configure Monitorix on CentOS/RHEL 6x

About Monitorix:

-- Monitorix is a free, open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used under production Linux/UNIX servers, but due to its simplicity and small size can be used on embedded devices as well.

Step: 1. Bind Host File :

# vi /etc/hosts

10.100.100.100    monitor.domain.com    monitor

-- Save & Quit (:wq)

Step: 2. Stop Firewall & Disable Selinux :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=enforing to disabled

-- Save & Quit (:wq)

Step: 3. Reboot the System :

# init 6

or

# reboot

Step: 4. Install EPEL Repository :

# yum -y install epel-release

Step: 5. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 6. Install  the Required Packages :

# yum -y install rrdtool perl rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite \
   perl-CGI perl-DBI  perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple \
   perl-IO-Socket-SSL wget

Step: 7. Download & Install the Monitorix Package :

# cd /mnt
# wget http://www.monitorix.org/monitorix-3.8.1-1.noarch.rpm
# yum -y install monitorix-3.8.1-1.noarch.rpm

Step: 8. Start Apache & Monitorix Service :

# service httpd restart
# service monitorix start

# chkconfig httpd on
# chkconfig monitorix on

Step: 9. Edit the Monitorix Configure file :

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

Alias /monitorix /usr/share/monitorix
ScriptAlias /monitorix-cgi /usr/share/monitorix/cgi-bin

<Directory /usr/share/monitorix/cgi/>
DirectoryIndex monitorix.cgi
Options ExecCGI
order deny,allow
deny from all
allow from all       # Alllow connect from the outside
</Directory>

# Apache rules to restrict access to Monitorix:
# Don’t forget to add <username> in .htpasswd with the 'htpasswd' command.

# Uncomment these lines
<Directory "/usr/share/monitorix">
Options Indexes Includes FollowSymLinks
Order Deny,Allow
Deny from All
allow from all        # Alllow connect from the outside
AllowOverride None
AuthUserFile /etc/httpd/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "Monitorix: Restricted Access..., sorry."

AuthType Basic
Require user <username>
Satisfy Any
</Directory>

-- Save & Quit (:wq)

Step: 10. Set Password For Monitorix Web Panel :

# htpasswd -cm /etc/httpd/conf/.htpasswd monitoradmin
Enter the Password: Password@123

Step: 11. Retart the Apache Service :

# service httpd restart

Step: 12. Connect Monitorix via Web Browser :

http://10.100.100.100/monitorix
User: monitoradmin
Pass: Password@123

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 9 July 2016

How To Install & Use Of PostgreSQL on Ubuntu 14.04

Install & Use Of PostgreSQL on Ubuntu 14.04

Q. What is PostgreSQL ?

-- PostgreSQL, or Postgres, is a relational database management system that provides an implementation of the SQL querying language. It is a popular choice for many small and large projects and has the advantage of being standards-compliant and having many advanced features like reliable transactions and concurrency without read locks.

Step: 1. Install PostgreSQL :
   
# apt-get updat
# apt-get -y upgrade
# apt-get install postgresql postgresql-contrib
# vi /etc/postgresql/9.3/main/pg_hba.conf
   
Step: 2. Edit on line 90 & 92 to make sure the file has :

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust

-- Save & Quit (:wq)
       
# sudo /etc/init.d/postgresql restart
   
Step: 3. Login to postgres :

# sudo -i -u postgres

Step: 4. Set a password for the "postgres" Database role using the Command :

postgres=# \password postgres

Step: 5. To Create a  User :

postgres=# CREATE USER koushik WITH password 'redhat';
CREATE ROLE

Step: 6. To Create a Database :

postgres=# CREATE DATABASE mydb WITH OWNER koushik;
CREATE DATABASE

Step: 7. List of the Database present on the Server :

postgres=# \l

Step: 8. To See all Databases :

postgres=# \l
                                  
PostgreSQL
Step: 9. To Select a Database :

postgres=# \connect mydb

Step: 10. To Create a Table :

postgres=# CREATE TABLE COMPANY(
   ID INT PRIMARY KEY     NOT NULL,
   NAME           TEXT    NOT NULL,
   AGE            INT     NOT NULL,
   ADDRESS        CHAR(50),
   SALARY         REAL
);

Step: 11. To view Created Tables :

postgres=# \d

PostgreSQL













Step: 12. Change the Owner of the Table :

postgres=# \connect mydb

mydb=# ALTER TABLE blocks OWNER to koushik;


From the psql Command line Interface :

mydb=# \dt

Step: 13. Drop Database :

postgres@ser4:~$ psql
postgres=# DROP DATABASE mydb;
                            
Step: 14. Restoring the dump Backup of SQL :
   
# sudo -i -u postgres
   
$ psql database_name < /data/backup.sql
   
From Linux/Debian Terminal without login to postgres :

Step: 15. To Create a Database with a User that have full rights on the Database, use the Following Command :

# sudo -u postgres createuser -D -A -P koushik

# sudo -u postgres createdb -O koushik mydb

Note: The first command line creates the user with no database creation rights (-D) with no add user rights -A) and will prompt you for entering a password (-P). The second command line create the database 'mydb with 'koushik' as owner.

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

 
Copyright © 2016 Kousik Chatterjee's Blog