Linux - Unix Learning

LINUX - UNIX Administration Learning

Tuesday, August 17, 2010

How to disable Account user in linux

Command to disable the account in linux

    step 1:chsh -list

        [root@nocdev ~]# chsh -list
        /bin/sh
        /bin/bash
        /sbin/nologin
        /bin/tcsh
        /bin/csh
        /bin/ksh
        /bin/zsh


    step 2:chsh 12345
   
        [root@nocdev ~]# chsh 12345
        Changing shell for 12345.
        New shell [/bin/bash]:    type > /sbin/nologin = to change login shell

    Step 3: To check if the user account is disable.

        [root@nocdev ~]# su - 1234
        This account is currently not available.
        [root@nocdev ~]#

       

Jboss - Jdk Installation


JBoss Application Server is the #1 most widely used Java application server on the 
market. Hundreds of professional open source developers have contributed to the JBoss Application Server over the years and community contributors are not only welcome but encouraged. In fact all JBoss employed contributors to the JBoss Application Server were hired from the community and each of them contributed to an open source project in one way or another.


SOURCE NEEDED:


-- java_ee_sdk-5_01-linux.bin >> http://java.sun.com/javase/downloads/index_jdk5.jsp

-- java-1.5.0-sun-compat-1.5.0.08-1jpp.noarch.rpm >> ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/

-- jboss-5.1.0.GA.zip >> http://labs.jboss.com/jbossas/downloads/


JDK INSTALLATION:


Install java using gui base or install using x-windows.

1.) run ./java_ee_sdk-5_01-linux.bin

-- Input the following details in java gui base console

-- Admin

-- Admin Password: (any password)

-- Admin Port: 4848

-- HTTP Port: 8080

-- HTTPS Port: 8181

-- After the installation do not click the start button, choose finish button instead.


2.) Install JAVA compat

-- rpm -i --nodeps java-1.5.0-sun-compat-1.5.0.08-1jpp.noarch.rpm


3.) Create environment variable. Add the following lines to the .bashrc


Ex:

-- cd /home/jboss

-- ll -la

-- [root@jbossdev jboss]# ll -la

    -rw-r--r-- 1 jboss jboss 242 Jan 14 15:49 .bashrc

-- vi .bashrc

-- add the following lines below.


# for jboss

export JAVA_HOME=/opt/SDK2/jdk

export PATH=$PATH:$JAVA_HOME/bin


export JBOSS_HOME=/opt/jBoss/jboss-5.1.0.GA

export PATH=$PATH:$JBOSS_HOME/bin


-- after saving the file ( source .bashrc)


4.)As root, type the following command at the shell prompt and you should see something like this:


[root@vsr ~]$ /usr/sbin/alternatives --config java

There are 2 programs which provide 'java'.

Selection Command

-----------------------------------------------

1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java

*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java

Enter to keep the current selection[+], or type selection number:


[root@vsr ~]$ /usr/sbin/alternatives --config javac

There are 1 programs which provide 'javac'.

Selection Command

-----------------------------------------------

*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac

Enter to keep the current selection[+], or type selection number:


[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0

There are 1 programs which provide 'java_sdk_1.5.0'.

Selection Command

-----------------------------------------------

*+ 1 /usr/lib/jvm/java-1.5.0-sun

Enter to keep the current selection[+], or type selection number:

[root@vsr ~]$ java -version

java version "1.5.0_14"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)

Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)


INSTALLATION OF JBOSS (MANUAL INSTALLATION)

1.) Unzip the jboss-5.1.0.GA.zip

ex: unzip jboss-5.1.0.GA.zip

2.) create the directory under /opt
 
ex: mkdir /opt/jBoss

3.) Copy jboss folder to /opt/jBoss

4.) Run jboss application

-- Go to directory /opt/jBoss/jboss-5.1.0.GA/bin

-- type: ./run.sh -b 0.0.0.0 &


4.)Try to test your application.

    Try to access http://localhost:8080/

Apache and Php installation

Apache installation guide: version 2.0.63

Url: http://apache.opensourceresources.org/httpd/httpd-2.0.63
   
    -- extract http tar.gz

    -- tar xvf httpd-2.0.63.tar.gz

    -- cd httpd-2.0.63

    -- ./configure --prefix=/usr/local/apache2/  --enable-modules=so --enable-mods-shared='rewrite' --enable-'ssl' --with-'ssl'

    OR    

    ./configure --prefix=/usr/local/apache2/  --enable-modules=so --enable-module=rewrite --enable-ssl --with-ssl

    -- make

    -- make install
   
   
Php Installation guide: version 5.3.0

Url: http://www.php.net/get/php-5.3.0.tar.gz/from/au.php.net/mirror

    -- extract PHP tar.gz

    -- tar xvf php-5.3.0.tar.gz

    -- cd php-5.3.0

    -- ./configure' '--with-oci8=/dbdata/u01/app/oracle/product/9.2.0' '--with-mysql=/usr/bin/mysql' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-curl=/usr/bin' '--with-gd' '--with-zlib' '--with-jpeg-dir=/usr/lib' '--with-curl=/usr/bin/curl' '--with-openssl' '--with-mime-magic' '--with-pear=/usr/share/pear' '--enable-sigchild' '--with-freetype-dir=/usr/include/' '--enable-sockets' '--enable-mbstring=all'

    -- make

    -- make install
   
TO TEST THE PHP:
   
    -- Go to /home/user directory

    -- create public_html

    -- vim phpinfo.php 

    -- insert the following line

                  phpinfo()
          ?>

    -- Then save the file using :wq! then enter

    -- Go to (/home) type (chmod 775 -R then enter
        ex: chmod 775 ace -R

    -- In your firefox mozilla type this in address bar

       >> http:///~/phpinfo.php
       ex: http://192.168.8.19/~ace/phpinfo.php

    -- In test page you will see the version and logo of the php.