Wednesday, March 26, 2014

proxy settings in oracle solaris 11


  for gateway settings : 
   route add default 10.1.0.1
  for proxy settings :
  1 export http_proxy=http://nihita-me-cs-2010:abc123@10.25.0.4:3128
  2 export https_proxy=http://nihita-me-cs-2010:abc123@10.25.0.4:3128
  3 svccfg -s system-repository:default setprop config/http_proxy = http://nihita-me-cs-2010:abc123@10.25.0.4:3128
  4 svccfg -s system-repository:default setprop config/https_proxy = http://nihita-me-cs-2010:abc123@10.25.0.4:3128
 5 svcadm refresh system-repository
 6 svcprop -p config/http_proxy system-repository
 7 svcprop -p config/https_proxy system-repository

http://www.thewireframecommunity.com/node/29

http://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/

http://gurkulindia.com/main/manpages/solaris-11-image-packaging-systems-quick-reference/#

http://docs.oracle.com/cd/E23824_01/html/821-1460/glqjr.html



  

Tuesday, March 25, 2014

MySQL Utilities

mysqldump is an effective tool to backup MySQL database. It creates a *.sql file with DROP table, CREATE table and INSERT into sql-statements of the source database. To restore the database,  execute the *.sql file on destination database.  For MyISAM, use mysqlhotcopy method that we explained earlier, as it is faster for MyISAM tables.

backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql
 
 
Random Data 

http://stackoverflow.com/questions/10788285/how-to-update-insert-random-dates-in-sql-within-a-specified-date-range



Thursday, March 6, 2014

grub2 installation

http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd#.UxgyAoWukRs

steps:
sudo mount /dev/sdXY /mnt
Now bind the directories that grub needs access to to detect other operating systems, like so:
Now we jump into that using chroot.

Now install, check, and update grub.
This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install –recheck /dev/sda.
grub-install /dev/sdXgrub-install --recheck /dev/sdX
update-grub 

Now grub is back, all that is left is to exit the chrooted system and unmount everything.
exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt