Friday, August 26, 2011

Enabling IPv6 on Solaris 10

Step 1)  Enable IPv6 on an Interface.

# ifconfig nge0 inet6 plumb up

Step 2)  Start the IPv6 daemon “in.ndpd”

# /usr/lib/inet/in.ndpd

Step 3)  Check status of IPv6-enabled interfaces

# ifconfig –a6

Step 4)  Create IPv6 addresses for Interfaces that were added after installation.

# touch /etc/hostname6.nge0

Step 5)  Reboot the node.

# reboot -- -r      or,
# init 6

JDK Installations & Configuration on Linux

1.             Download JDK installer from below link.

http://www.oracle.com/technetwork/java/javase/downloads/index.html

2.             Change installation location.

# cd /usr/java

3.             Run jdk installer.
               
# ./jdk-6u26-linux-i586.bin

Press Enter to continue.....

4.             Export jdk installation path.

# export JAVA_HOME=/usr/java/jdk1.6.0_26

5.             Check path.

# echo $PATH

6.             Again export JAVA_HOME with old path.

# export PATH=$JAVA_HOME/bin:$PATH

7.             Check java version.

# java -version

8.             Set JAVA_HOME path permanently.

Modify /etc/profile and append path as below:
          export JAVA_HOME=/usr/java/jdk1.6.0_26
          export PATH=$JAVA_HOME/bin:$PATH

Wednesday, August 24, 2011

MySQL- Miscellaneous Examples (1)

1.             To create user “databaseuser” on host “databasehost” with password “password”:
mysql> CREATE USER 'databaseuser'@' databasehost ' IDENTIFIED BY 'password';

2.             To create database “databasename”:
mysql> CREATE DATABASE datbasename;

3.             To display databases:
mysql> SHOW DATABASES;

4.             To display tables:
mysql> SHOW TABLES;

5.             To change database;
mysql> USE datbasename;

6.             To delete database:
mysql> DROP DATABASE databasename;

7.             To grant permission on database “databasename”:
mysql> GRANT ALL ON databasename.* TO 'databaseuser'@' databasehost ';

8.             To show grant privileges:
mysql> SHOW GRANTS FOR  'databaseuser'@' databasehost ';

9.             To remove grant privileges:
mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'databaseuser'@' databasehost ';

10.          To make change in effect:
mysql> FLUSH PRIVILEGES;

11.          To update user table:
mysql> UPDATE user SET host='newhostname' WHERE host='oldhostname';               

12.          To show user table:
mysql> SELECT * FROM user;

13.          To reset user password:
mysql> UPDATE user SET Password=PASSWORD('password') WHERE user="'databaseuser'@' databasehost’";

14.          To rename root user:
mysql> UPDATE USER SET user="newdatabaseadmin" WHERE user="root";

15.          To remove entry from user table:
mysql> DELETE FROM user WHERE host="databasehost" AND user="databaseuser”;

16.          To show db tables:
mysql> SHOW * FROM db;

17.          To update db tables
mysql> UPDATE db SET host='newdatabasehost' WHERE db="olddatabasehost";

18.          To remove entry from db table:
mysql> DELETE FROM db WHERE db="databaseuser";

19.          To take database backup:
# mysqldump –h hostname –u username –p databasename > /path/to/backup/filename.sql

20.          To restore database backup:
# mysql –h hostname –u username –p databasename < /path/from/restore/filename.sql

An unrecoverable error occurred. This form was missing from the server cache. Try reloading the page and submitting again.

You can check /var/log/httpd/error_log for more information like:
 “/filefield/ahah/xyz/field_upload_document/0”.

For resolving the problem just install the latest version of the Filefield module and edit “filefield_widget.inc” file for commenting below parameters:

 /*'#ahah' => array( // with JavaScript
       'path' => 'filefield/ahah/'.   $element['#type_name'] .'/'. $element['#field_name']
.'/'. $element['#delta'],
       'wrapper' => $element['#id'] .'-ahah-wrapper',
       'method' => 'replace',
       'effect' => 'fade',
    ),*/