Categories

Sunday, 4 August 2013

How to install SuPHP on centos


   1. Add the RepoForge repo if you don't already have it.

        32-bit:
        rpm -ivH http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
        64-bit:
        rpm -ivH http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

  2.  Install the packages

        yum install -y php-cli mod_suphp

  3.  Edit /etc/suphp.conf and adjust lines 25 and 28 respectively

        x-httpd-php="php:/usr/bin/php-cgi"
        x-suphp-cgi="execute:!self"

   4. Set PHP session directory group ownership permission

        groupadd phpsession
        chgrp phpsession /var/lib/php/session

  5.  For each VirtualHost you wish to operate under suPHP, you will need to add the following to their Apache config file in /etc/httpd/conf.d, replacing username and group respectively

        suPHP_Engine on
        suPHP_UserGroup username group
        AddHandler x-httpd-php .php .php3 .php4 .php5
        suPHP_AddHandler x-httpd-php

 6.   For each user operating under suPHP, you will need to add them to the phpsession group you just created otherwise they will get errors about session creation. Replace username respectively

        usermod -a -G phpsession username

    If you get a 500 Internal Server Error message, your PHP scripts and/or directories probably have incorrect permissions. You can reset all directories to rwxr-x-r-x (ie. 0755) and all files to rwxr--r-- (ie. 0644) by running the following at your HTML root

        find . * -type d -exec chmod 0755 {} +
        find . * -type f -exec chmod 0644 {} +

Saturday, 20 July 2013

Sungrid Engine client Installation Centos

Hi,

 Oracle Sungrid engine is mainly used for clustering, in which user can submit jobs on the machines on the cluster.

There will be a master node , submit node and then slave machines in which jobs are submitted.

Below is the steps to install sungrid engine client on the machines. In this scenario master is already installed on the cluster. Here we will install and configure a machine as slave on that cluster.

yum -y install binutils csh java ksh libXpm openmotif22 tcl
yum --enablerepo=epel install gridengine gridengine-qmaster gridengine-execd gridengine-qmon gridengine-devel



cd /usr/share/gridengine/
./inst_sge -x -m



just proceed with the installation.



 
When the grid engine is installed , there will be two directories in which grid

 engine data is found.

 One is /usr/share/gridengine = $SGE_ROOT

in which all configuration files resides

another configuration root is $SGE_CELL which is named as default/common directory

 inside the $SGE_ROOT derectory

 source /usr/share/gridengine/default/common/settings.sh

chkconfig --level 35 sge_execd on
chkconfig --level 35 sgemaster on
qconf -as `hostname`
qconf -msconf


Now you have to make sure that the machine must need  a hostname. Set it in

/etc/sysconfig/network.Then add the hostname in DNS so that hostname is pinging

from any where especially from the master node.



now go to


cd /usr/share/gridengine/defaults/common


Edit the configuration file act_qmaster.


vi act_qmaster


add the hostmame of the master node here.


suppose say the hostname of master kmaster.example.com


and hostname of the new node we are creating is knode01.example.com





Now ssh into the master node 
kmaster.example.com





run the command qconf -shgrpl



this command will show the list of available host ques.



the queues will be lised as



@queue1

@queue2



etc



now you need to add the new machine to any of the queue on the master node.



using the command qconf -mhgrp @queue1



  a new text file will open and you need to add the hostname of the new machine

(knode01.example.com) to it



save the file in VI.



Now you need to add the machine as submit host and administrative host to run the

 jobs in them



so use the command



qconf -ah knode01.example.com

qconf -as knode01.example.com







now exit from the master node and ssh again into the new slave node.



go to directory /usr/share/gridengine



run the command ./install_execd



type in yes when prompted.



This will install the slave node and will add it to the master node.





after the installation is finished.



Please start the service /etc/init,d/sge_execd





and then run the command qstat -f



if every thing is correct , this command will list all the available nodes

on the grid.









Regards

Syamkumar.M















Wednesday, 26 June 2013

how to fix the error "ERROR:root:code for hash sha512 was not found." when running a python script

Hi,

 IF you got the error "ERROR:root:code for hash sha512 was not found." on running any python script then it might be due to a package called hashlib for python is missing . Here is the steps to install the package .

Download the package hashlib-20081119.tar.gz  from http://code.krypto.org/python/hashlib/

Then do the following steps

tar xvfz hashlib-20081119.tar.gz
cd hashlib-20081119
sudo python setup.py install

It will install the package.

Then run the script again .

Regards
Syamkumar

Tuesday, 25 June 2013

How to install Ruby on rails application on Ubuntu machine.


Hi All,

Below is the step by step installation procedure for ruby on rails on ubuntu 11.10 machine.

The packages needed for the installation of Ruby on rails on

    Ubuntu 11.10
    Ruby 1.92
    Rails 3.20
    Rubygems 1.8.15
    MySQL
    SQLite
    Git


1) First upgrade and update your system packages using the commands

"sudo apt-get upgrade
sudo apt-get update"

2)Install Ruby 1.9.2 , build-essential and git.

 Ubuntu provides several versions of Ruby. If you aren’t careful, you may end up installing older or even multiple versions. We want to install version 1.9.2 so we have the latest and greatest. For this, and other tasks ahead of us, we’ll also need build-essential as it has the developer tools that will be needed to compile various gems. Git is optional,

sudo apt-get install ruby1.9.2-full build-essential git-core

3)Install RubyGems 1.8.15

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.15.tgz
tar -zxvf rubygems-1.8.15.tgz
cd rubygems-1.8.15
sudo ruby setup.rb

4)Update gems

sudo gem update --system
sudo gem install rubygems-update
sudo update_rubygem


5)Install the remaining some packages using the below commands


As rubygems  is installed we have to install rails on the machine now



sudo gem install rails
sudo apt-get install libsqlite3-dev
sudo gem install sqlite3
sudo apt-get install nodejs
sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo gem install mysql


6)Test the application

You should now have a working Ruby on Rails environment

to test it out


cd ~/
rails new app_of_the_century
cd app_of_the_century
rails generate model User


If you installation worked, Rails should create your application file/folder structure and generate a User model all without a single error.




Reference :http://www.brandedclever.com/the-perfect-rails-install-on-ubuntu-11-10/




Monday, 24 June 2013

How to install R application on ubuntu machine to install and run Bioconductor on ubuntu machine

Hi,

The current release of Bioconductor is version 2.12; it works with R version 3.0.1.

So we have to install or upgrade the R on the machine.

1) So first download the latest R package using the command.

wget https://launchpadlibrarian.net/140308028/r-base_3.0.1.orig.tar.gz

2) Extract it to the machine using the command  tar -xvzf r-base_3.0.1.orig.tar.gz


3)cd R-3.0.1/

change into the extracted directory and then run the following commands.


 ./configure

 make

 make install

 This will install the R on the machine

You can check the version by issuing the command

R --version

4)Now we have to install Bioconductor.

So just get into the R console using the command

R

and then run the following commands in it.

source("http://bioconductor.org/biocLite.R")
biocLite()

This will automatically install the required package for Bio conductor on the ubuntu machine.


Reference:http://bioconductor.org/install/


Regards
Syamkumar























E: Could not perform immediate configuration on 'util-linux' error on running apt-get update on ubuntu machine.

Hi,

 If you got the error as "E: Could not perform immediate configuration on 'util-linux': on ubuntu machine while running the command apt-get upgrade or apt-get update,

then do the following .


apt-get install util-linux -f -o APT::Immediate-Configure=0

This will fix the error on upgrading .


Friday, 21 June 2013

How to create a shared VNC connection using xinetd

Hi all,

In this tutorial, we are going to create vnc connections which can be accessed by any users and which can be resumed at any point of time.

Also we can create vnc for individual users as well..


 1) Install the required packages

# yum install vnc-server xinetd

2) Enable the XDMCP by editing the custom.conf file

# vi /etc/gdm/custom.conf

[xdmcp]
Enable=true
MaxSessions=30

[security]
AllowRemoteRoot=true
DisallowTCP=false

Note: Here “AllowRemoteRoot=true” used to allow root access.

3) Create a file with below content, in inside the /etc/xinetd.d directory

# vi /etc/xinetd.d/xvncserver

service vnc
{
  type = UNLISTED
 disable = no
 socket_type = stream
 protocol = tcp
 wait = yes
 user = test1
 server = /usr/bin/Xvnc
 server_args = -inetd -query localhost  -geometry 1280x800 -depth 16 passwordfile=/etc/vncpasswd/Xvnc.pass2
 log_type = FILE /var/log/xinetdlog
 log_on_failure += USERID
 port = 5950
 }



5)Now create a vnc password using the commands below.

mkdir /etc/vncpasswd/
vncpasswd /etc/vncpasswd/Xvnc.pass2
Then type the password you want to connect to vnc. It will be stored in that file.

6) Define the vnc01 service by edit the /etc/services file

# vi /etc/services

vnc   5950/tcp
7) Restart the xinetd and gdm services

# service xinetd restart
# gdm-restart
8) Test using the vncviwer command

# vncviewer localhost:5950
9) To connect from the remote system use the below one

# vncviewer IPADDRESS:5950

Ad