Sunday, 18 August 2013

How to Install and Configure "RStudio" Server on Centos 6.3 x86_64

RStudio Server

RStudio is a free and open source integrated development environment (IDE) for R. You can run it on your desktop or even over the web using RStudio Server.If you want to more details click this link.Here i am going to show you how to install RStudio Server on Centos.

Requirement :


                  1.Centos 6.3 x86_64
                  2. Install EPEL Repository 
                  3. Install R
                  4. RStudio rpm package.

RStudio Server Installation

       
First you need to install EPEL Repository click this link and install EPEL.

Now you can install "R" package via yum command

           [root@mani-testing ~]# yum install R

You want to download the RStudio Server package.You can use following command.

           [root@mani-testing ~]# wget http://download2.rstudio.org/rstudio-server-0.97.551-x86_64.rpm


Install the RStudio server rpm package

            [root@mani-testing ~]# yum install --nogpgcheck rstudio-server-0.97.551-x86_64.rpm

RStudio Server Configuration

           You need to create two conf file rserver.conf and
rsession.conf
following path 
               
[root@mani-testing ~]# touch /etc/rstudio/rserver.conf


[root@mani-testing ~]# touch /etc/rstudio/rsession.conf

The above both files will help to change default port and session timeout.After editing configuration files you should perform a check to ensure that the entries you specified are valid. This can be accomplished by executing the following command

                 
[root@mani-testing ~]# rstudio-server test-config

[root@mani-testing ~]# rstudio-server restart Stopping rstudio-server: [ OK ] Starting rstudio-server: [ OK ] [root@mani-testing ~]#



RStudio Testing


By default RStudio Server runs on port 8787 and accepts connections from all remote clients.
You can able to access RStudio server via web browser .
Go to web browser and type your server ip address. My case server ip  http://10.118.248.49:8787



Regarding user authentication:
      RStudio Server will not permit logins by system users (those with user ids lower than 100).
      User credentials are encrypted using RSA as they travel over the network.
      You can manage users with standard Linux user administration tools like useradd,userdel, etc.
      Each user needs to be created with a home directory.
Now you can able to access the RStudio Server from anywhere via your server ip address....

Sunday, 4 August 2013

BASE Configuration on Centos 6.3 x86_64

BASE ( Basic Analysis and Security Engine ) is a good way to view Data through a Web Interface.

Require packages:

            1. Webserver (apache)
            2. PHP
            3. BASE
            4. adodb

We will install apache and php following command


  [root@snort ~]# yum install httpd php php-pear*


Download the "base" following link using wget command



[root@snort snort_install]# wget http://sourceforge.net/projects/secureideas/files/latest/download?source=files


Extract and move the base directory to apache home directory


[root@snort snort_install]# tar -zvxf base-1.4.5.tar.gz


[root@snort snort_install]# mv base-1.4.5 /var/www/html/base

Change the  group "apache" and give the permission 775



[root@snort snort_install]# chown apache.apache -R /var/www/html/base/

[root@snort snort_install]# chmod 775 -R /var/www/html/base/



Download the  "Adodb " following link using wget command




Unzip the adodb518a.zip and change the name "adodb5" to "adobe" and  move to inside the "base" directory.



[root@snort snort_install]# unzip adodb518a.zip


[root@snort snort_install]# mv  adodb5  /var/www/html/base/adodb

Now restart the httpd and mysqld service 



[root@snort snort_install]#  service httpd restart

[root@snort snort_install]#  service service mysqld restart



Now we will  open the base through web browser.

My server ip address http://10.21.1.19/base

Step 1:




The above screen is showing regarding config file and PHP version and Just Click to "Continue"


Step 2:  

         




The above screen is asking ADODB path and my case "/var/www/html/base/adodb"
Click Continue


Step 3:





Type the Database details and Click Continue.

Step 4:




Just give user name and password for BASE login. Click Continue.


Step 5:



Just Click Continue..

Step 6:



Just Click Continue..



Step 7:






This is BASE screen.



Thursday, 1 August 2013

Install and Configure barnyard2 on Centos 6.3 x86_64

Snort creates the output file format "unified2". So we can read that unified2 file using Barnyard2.
Before install the Barnyard2 we should install and configure Snort and Mysql

Baryard2 Installation


We can download the Baryard2 using "wget" command following link


[root@snort snort_install]# wget

http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz


Extract, compile and install the Barnyard2



[root@snort snort_install]# tar -zxvf barnyard2-1.9.tar.gz

[root@snort barnyard2-1.9]# ./configure --with-mysql


[root@snort barnyard2-1.9]# make


[root@snort barnyard2-1.9]# make install
Copy the "barnyard2.conf" file to "/etc/snort/" and "sid-msg.map" from /snort_install/snort-rule/etc/sid-msg.map to "/etc/snort/"

[root@snort barnyard2-1.9]# cp etc/barnyard2.conf /etc/snort/


[root@snort barnyard2-1.9]# cp -p /snort_install/snort-rule/etc/sid-msg.map /etc/snort/


[root@snort barnyard2-1.9]# mkdir /var/log/barnyard2
[root@snort barnyard2-1.9]# chmod 666 /var/log/barnyard2
[root@snort ~]# chmod 775 -R /var/log/snort/
[root@snort ~]# chown snort:snort -R /var/log/snort/

Baryard2 Configuration:


Open and Edit "barnyard2.conf" file


[root@snort barnyard2-1.9]# vim /etc/snort/barnyard2.conf


config hostname:        snort <---- give hostname and Interface name
config interface:        eth0
input unified2 <----- log file format


output database: alert, mysql, user=user-name dbname=database-name   password=xxxxx     host=localhost


 
:wq

Barnyard2 Testing

Open the terminal and type following command

[root@snort ~]# snort -u snort -g snort -c /etc/snort/snort.conf -i eth0 &

We will run below command and should get below output

[root@snort ~]# barnyard2 -c /etc/snort/barnyard2.conf -d /var/log/snort/ -f snort.u2


Closing spool file '/var/log/snort//snort.u2.1374562940'. Read 332 records
Opened spool file '/var/log/snort//snort.u2.1374877709'
Closing spool file '/var/log/snort//snort.u2.1374877709'. Read 0 records
Opened spool file '/var/log/snort//snort.u2.1374881111'
Waiting for new data


    options --->  -c  Use configuration file
                       -d  Spool files from Directory
                       -f    file pattern

Now Barnyard2 is working fine..