Index: scripts/hcat_server_install.sh =================================================================== --- scripts/hcat_server_install.sh (revision 1171770) +++ scripts/hcat_server_install.sh (working copy) @@ -29,22 +29,24 @@ echo " All paths must be absolute" } -dir_check=`head -1 NOTICE.txt` +dir_check=`head -1 share/doc/hcatalog/NOTICE.txt` if [ "${dir_check}" != "Apache HCatalog" ] ; then echo "This script must be run in the top level directory of your HCatalog" \ "distribution." exit 1 fi -root="unknown" +root=`pwd` dbroot="unknown" hadoop_home="unknown" -server_port="9080" +server_port="9933" +alternate_root="n" while [ "${1}x" != "x" ] ; do if [ $1 == "-r" ] || [ $1 == "--root" ] ; then shift root=$1 + alternate_root="y" shift elif [ $1 == "-d" ] || [ $1 == "--dbroot" ] ; then shift @@ -65,7 +67,7 @@ done -for var in $root $dbroot $hadoop_home ; do +for var in $dbroot $hadoop_home ; do if [ $var == "unknown" ] ; then usage exit 1 @@ -105,33 +107,43 @@ fi # Create the needed directories in root -for dir in var conf var/log bin lib ; do +#for dir in var conf var/log bin lib ; do +for dir in var var/log bin etc libexec sbin share src; do if [ ! -d $root/$dir ] ; then mkdir $root/$dir fi done # Move files into the appropriate directories -for dir in bin conf lib ; do - for file in ./$dir/* ; do - cp -R $file $root/$dir +if [ "$alternate_root" == "y" ] ; then + echo Installing into [$root] + for dir in bin etc libexec sbin share src ; do + for file in ./$dir/* ; do + cp -R $file $root/$dir + done done -done +else + echo Using current directory [$root] as installation path and proceeding. +fi +#Create a softlink from distro conf dir to /etc/hcatalog location +rm $root/share/hcatalog/conf +ln -sf $root/etc/hcatalog $root/share/hcatalog/conf + # Put the start and stop scripts into bin -for file in hcat_server_start.sh hcat_server_stop.sh ; do - cp scripts/$file $root/bin -done +#for file in hcat_server_start.sh hcat_server_stop.sh ; do +# cp scripts/$file $root/bin +#done # Move the proto-hive-site.xml to hive-site.xml -cp $root/conf/proto-hive-site.xml $root/conf/hive-site.xml +cp $root/etc/hcatalog/proto-hive-site.xml $root/etc/hcatalog/hive-site.xml # Set permissions on hive-site.xml to 700, since it will contain the password to the # database -chmod 700 $root/conf/hive-site.xml +chmod 700 $root/etc/hcatalog/hive-site.xml # Write out an environment file so that the start file can use it later -cat > $root/conf/hcat-env.sh < $root/etc/hcatalog/hcat-env.sh < + @@ -352,11 +353,16 @@ - + + + + + + - + - - - - - - + + + - + + - + - + + + + + @@ -616,12 +640,15 @@ + - + + +