Wednesday, March 13, 2013

Mysql ERROR 1418

If get the error like above simply follow the below step to resolve it.

MySQL Error 1418
ERROR 1418 (HY000) at line 5: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

Type below command in your mysql command prompt:

# mysql -u root -p
 
MySQL> SET GLOBAL log_bin_trust_function_creators = ON;
OR
MySQL> # SET GLOBAL log_bin_trust_function_creators = 1;
 
******************** 

Friday, January 4, 2013

Lvm creation in Redhat 6.3

Here we are going to create lvm for /dev/sdb (newly assigned partition)

# fdisk  /dev/sdb
Create physical partition as /dev/sdb1 from /dev/sdb/
Create Physical voilume:
# pvcreate /dev/sdb1
Create volume group and add the pv to VG :
# vgcreate /dev/mapper/vg_rsatest_disk2 /dev/sdb1
To display volume group information:
# vgdisplay
Create lvm using PE value :
# lvcreate -l 2434 /dev/mapper/vg_rsatest_disk2
Formatted the newly created lvm:
#mkfs.ext4 /dev/mapper/vg_rsatest_disk2-lvol0
Create new directory to mount lvm:
#mkdir -p  /data
Add the below line into /etc/fstab/
/dev/mapper/vg_rsatest_disk2-lvol0 /data         ext4    defaults        0 0
"lvol0"

Thursday, January 3, 2013

Tomcat 7 installation in Redhat 6.3

* Download tomcat 7 from http://tomcat.apache.org/download-60.cgi

* Downlo0ad latest jdk from http://www.oracle.com/technetwork/java/javase/downloads/index.html

* Install jdk in /usr/local/jdk/

* Unzip downloaded apache tomcat in /usr/local/apache-tomcat-7.0.34
                  #unzip apache-tomcat-7.0.34.zip

* Set java home path :
                   # JAVA_HOME=/usr/local/jdk1.7.0_07

* Set Tomcat home path :
                  # CATALINA_HOME=/usr/local/apache-tomcat-7.0.34
                  # BASEDIR=/usr/local/apache-tomcat-7.0.34

* Go  to directory /usr/local/apache-tomcat-7.0.34/bin/

* Edit Catalina.sh and add the java path in the first line.
       #vim catalina.sh
         JAVA_HOME=/usr/local/jdk1.7.0_07 (Add it in the top of the Catalina.sh script).

* Provide the executive permission to all script file under in bin directory.
           # chmod  +x  startup.sh
            #chmod  +x   Catalina.sh

* Start the tomcat :
          #./startup.sh
* Check the Tomact from Browser:
http://10.0.0.0:8080   you will get the tomcat home page..



Tuesday, December 18, 2012

Soft link creation in linux

We are going to create soft link for test folder in new directory under disk2

#cd /root/test
#mv -v test /disk2/
#ln -s /cvs2/test/  test

Rsync command

From local system to remote system:

# rsync -avzpe ssh modules/ root@10.10.2.42:/usr/local/jboss-as/modules/



--delete : delete files that don't exist on sender (system)
-v : Verbose (try -vv for more detailed information) 
-e "ssh options" : specify the ssh as remote shell 
-a : archive mode 
-r : recurse into directories 
-z : compress file data


                          ****************************************


Saturday, December 15, 2012

Errcode: 28 in Mysql in linux

Error :

[root@ghrmsdb dbbackup]# mysql -p DBNAME < DBNAME_14122012-0700.sql
Enter password:
ERROR 3 (HY000) at line 33: Error writing file './GHRMS/B2B_Exception_Dtls.frm'



Answer :

If you get error like this, you need to check all filesystems where MySQL installed..  
It will happen only if no space left on hard disk...


    ************************************************************************8

Friday, December 14, 2012

Jboss 7 Installation on RHEL 6.3

Check the server hostname correctly assigned:

# vim /etc/hosts
# vim /etc/sysconfig/network

Check http service running or not:

#/etc/init.d/httpd status.
It should running....

Create jboss user :

#useradd jboss

Download latest  jdk 7 to /user/local and install it:

# rpm -ivh jdk-7u7-linux-x64.rpm
 
To check java installed or not:
# java --version  

Set java variable path:

#JAVA_HOME=/usr/java/latest
#export JAVA_HOME
#PATH=$JAVA_HOME/bin:$PATH:$HOME/bin


Also add the above 3 lines  in vim /etc/bash_profile save and close it.

Download jboss7 to /usr/local/ and unzip it.

#unzip jboss-as-7.1.1.Final.zip  (It will unzip as jboss-as-7.1.1 )
#mv jboss-as-7.1.1 jboss-as

Assign the owner permission to jboss for /usr/local/jboss-as directory.
 
#chown -R jboss:jboss /usr/local/jboss-as


To create service user /etc/init.d do as follow:

#cp /usr/local/jboss-as/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss
#mkdir /etc/jboss-as
#cp /usr/local/jboss-as/bin/init.d/jboss-as.conf /etc/jboss-as/

#chmod 755 /etc/ini.d/jboss

Edit and add the below entries in /etc/init.d/jboss:

#vim /etc/init.d/jboss

# chkconfig: - 234 80 20  to run jboss in 234 run level
 

# Set defaults.

JBOSS_USER=jboss
export JBOSS_USER

if [ -z "$JBOSS_HOME" ]; then
  JBOSS_HOME=/usr/local/jboss-as

Save and close text editor...


To access jboss console through browser from remote system:

change 0.0.0.0 instead of 127.0.0.0. only in the below lines.

# vim /usr/local/jboss-as/standalone/configuration/standalone.xml 

 <interface name="management">
            <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
        </interface>
        <interface name="public">
            <inet-address value="${jboss.bind.address:0.0.0.0}"/>



save and close text editor.

#chkconfig --add jboss
#chkconfig jboss on

Now we can start the jboss as system service:

#/etc/init.d/jboss start

and 

We can access it through browser.
10.0.0.1:8080




     *************************************************************

To add jboss mnagement user:

Go to /usr/local/jboss-as/bin/
#./add-user.sh
You should see the following message on the console after executing the command:
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
We select “a”, next you should see the following message:
Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : jboss
Password :
Re-enter Password :
* hit enter for Realm to use default, then provide a username and password
We select the default value for the Realm (ManagementRealm), by hitting enter, and select “jboss” as our username and password.