`
itspace
  • 浏览: 981520 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

HP-UX IA 11.31若干基础包安装

阅读更多
因项目需要,HP-UX IA 11.31若干基础包安装,仅作记录
一、查看查看openssl版本
openssl version -a
二、检查已安装的depot包
swlist
三、安装depot包
注意安装时,需要将包先mark,再install
swinstall -s DZYWRX76:/dbra/app/softs/gcc-4.2.3-ia64-11.31.depot
swinstall -s DZYWRX76:/dbra/app/softs/libgcc-4.2.3-ia64-11.31.depot
swinstall -s DZYWRX76:/dbra/app/softs/gettext-0.17-ia64-11.31.depot
swinstall -s DZYWRX76:/dbra/app/softs/libiconv-1.13.1-ia64-11.31.depot
swinstall -s DZYWRX76:/dbra/app/softs/make-3.81-ia64-11.31.depot
swinstall -s DZYWRX76:/dbra/app/softs/popt-1.7-ia64-11.31.depot
swinstall -s DZYWRX76:/dbra/app/softs/zlib-1.2.5-ia64-11.31.depot

/*以下步骤需验证,我没有验证,仅限于安装ncurses
ncurses 需要把include加进PATH
export LDOPTS="+s -L/usr/local/lib -L/usr/local/lib/hpux32"*/
swinstall -s DZYWRX76:/dbra/app/softs/ncurses-5.7-ia64-11.31.depot


swinstall -s DZYWRX76:/dbra/app/softs/sudo-1.7.2p6-ia64-11.31.depot

其中安装sudo时需要注意
ln -s /usr/local/bin/sudo /usr/bin/sudo
gunzip sudo-1.6.9p17.tar.gz
tar -xf sudo-1.6.9p17.tar 
cp sudoers /usr/local/etc/sudoers
chmod 440 /usr/local/etc/sudoers
chown root:root /usr/local/etc/sudoers
ln -s /usr/local/sbin/visudo /usr/bin/visudo
ln -s /usr/local/bin/gcc /usr/bin/gcc
四、安装rsync
swinstall -s DZYWRX76:/dbra/app/softs/rsync-3.0.7-ia64-11.31.depot
ln -s /usr/local/bin/rsync /usr/bin/rsync
如果用编译包安装会报如下错误
        gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -Wno-unused-parameter  -o rsync flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o  util.o main.o checksum.o match.o syscall.o log.o backup.o options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o  fileio.o batch.o clientname.o chmod.o acls.o xattrs.o progress.o pipe.o params.o loadparm.o clientserver.o access.o connection.o authenticate.o lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o  lib/permstring.o lib/pool_alloc.o lib/sysacls.o lib/sysxattrs.o  zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o  zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o popt/findme.o  popt/popt.o  popt/poptconfig.o  popt/popthelp.o popt/poptparse.o
ld: Unsatisfied symbol "libiconv_open" in file rsync.o
ld: Unsatisfied symbol "libiconv_close" in file clientserver.o
ld: Unsatisfied symbol "libiconv" in file rsync.o
3 errors.
collect2: ld returned 1 exit status
*** Error exit code 1

安装完成之后用swlist显示
  gcc                           4.2.3          gcc           
  gettext                       0.17           gettext       
  gperf                         3.0.4          gperf         
  libgcc                        4.2.3          libgcc        
  libiconv                      1.13.1         libiconv      
  make                          3.81           make          
  ncurses                       5.7            ncurses       
  popt                          1.7            popt          
  rsync                         3.0.7          rsync         
  sudo                          1.7.2p6        sudo          
  unzip                         5.52           unzip         
  zlib                          1.2.5          zlib   
五、安装ruby
# gunzip ruby-1.8.6-p114.tar.gz
# tar -xf ruby-1.8.6-p114.tar
export LDOPTS="+s -L/usr/local/lib -L/usr/local/lib/hpux32"
export CFLAGS="-lcl -lpthread"
./configure –-prefix=/dbra/app/lib/ruby
gmake
gmake install
修改/dbra/app/lib/ruby/lib/ruby/1.8/ia64-hpux11.23/rbconfig.rb字段CONFIG["RPATHFLAG"] 为 ""

/*以下步骤需验证,我没有验证
在安装RUBY的时候,configure的时候要加--enable-pthread选项
configure完成后要修改makefile把里面的LIBS选项加上-lcl*/

六、安装gem包
su - dbra
su root
export SCRIPT_HOME=/dbra/app/shells
export RUBY_HOME=/dbra/app/ruby
export WEB_HOME=/dbra/app/web
export DBRA_BASE=/dbra/app
export PATH=$DBRA_BASE/lib/ruby/bin:$SCRIPT_HOME:/usr/sbin:$PATH
export TBACKUP_BASE=/Tbackup
export TPRIMARY_BASE=/dbra
export SHLIB_PATH=$ORACLE_HOME/lib32
export RUBYOPT=""
cd /dbra/app/softs/rubygems-1.3.1
ruby setup.rb –no-ri –no-rdoc
安装完成检查zlib,openssl,gem list
irb>require 'zlib'
irb>require 'openssl'
gem list

七、安装gem包
su - dbra
su root
export SCRIPT_HOME=/dbra/app/shells
export RUBY_HOME=/dbra/app/ruby
export WEB_HOME=/dbra/app/web
export DBRA_BASE=/dbra/app
export PATH=$DBRA_BASE/lib/ruby/bin:$SCRIPT_HOME:/usr/sbin:$PATH
export TBACKUP_BASE=/Tbackup
export TPRIMARY_BASE=/dbra
export RUBYOPT=rubygems
export SHLIB_PATH=$ORACLE_HOME/lib32
export LIBPATH=$ORACLE_HOME/lib32
gem install -l --no-rdoc --no-ri activerecord-2.1.0.gem                       
gem install -l --no-rdoc --no-ri activesupport-2.0.2.gem                      
gem install -l --no-rdoc --no-ri activerecord-2.0.2.gem                       
gem install -l --no-rdoc --no-ri rubyforge-1.0.1.gem                          
gem install -l --no-rdoc --no-ri rake-0.8.3.gem                               
gem install -l --no-rdoc --no-ri net-ssh-2.0.3.gem                            
gem install -l --no-rdoc --no-ri net-sftp-2.0.1.gem                           
gem install -l --no-rdoc --no-ri log4r-1.0.5.gem                              
gem install -l --no-rdoc --no-ri hoe-1.8.2.gem                          
gem install -l --no-rdoc --no-ri activerecord-oracle_enhanced-adapter-1.1.8.gem
gem install -l --no-rdoc --no-ri ruby-oci8-1.0.2.gem
gem install -l --no-rdoc --no-ri rails-2.0.2.gem                              
gem install -l --no-rdoc --no-ri actionpack-2.0.2.gem                         
gem install -l --no-rdoc --no-ri actionmailer-2.0.2.gem                       
gem install -l --no-rdoc --no-ri activeresource-2.0.2.gem                     
gem install -l --no-rdoc --no-ri cgi_multipart_eof_fix-2.5.0.gem              
gem install -l --no-rdoc --no-ri fastthread-1.0.1.gem                         
gem install -l --no-rdoc --no-ri daemons-1.0.10.gem                           
gem install -l --no-rdoc --no-ri mongrel-1.1.4.gem                            
gem install -l --no-rdoc --no-ri gem_plugin-0.2.3.gem                         
gem install -l --no-rdoc --no-ri mongrel_cluster-1.0.5.gem                    
gem install -l --no-rdoc --no-ri gettext-1.93.0.gem                           
gem install -l --no-rdoc --no-ri activerecord-oracle-adapter-1.0.0.9250.gem   
gem install -l --no-rdoc --no-ri ruby-prof-0.7.3.gem

oci8安装也可以用编译包安装
tar -xf ruby-oci8-1.0.2.tar
cd ruby-oci8-1.0.2
su - dbra
su root
export SCRIPT_HOME=/dbra/app/shells
export RUBY_HOME=/dbra/app/ruby
export WEB_HOME=/dbra/app/web
export DBRA_BASE=/dbra/app
export PATH=$DBRA_BASE/lib/ruby/bin:$SCRIPT_HOME:/usr/sbin:$PATH
export TBACKUP_BASE=/Tbackup
export TPRIMARY_BASE=/dbra
export RUBYOPT=rubygems
export SHLIB_PATH=$ORACLE_HOME/lib32
export LIBPATH=$ORACLE_HOME/lib32
make
make install


八、错误日志记录
1)rsync 采用编译包安装时出错
        gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -Wno-unused-parameter  -o rsync flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o  util.o main.o checksum.o match.o syscall.o log.o backup.o options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o  fileio.o batch.o clientname.o chmod.o acls.o xattrs.o progress.o pipe.o params.o loadparm.o clientserver.o access.o connection.o authenticate.o lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o  lib/permstring.o lib/pool_alloc.o lib/sysacls.o lib/sysxattrs.o  zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o  zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o popt/findme.o  popt/popt.o  popt/poptconfig.o  popt/popthelp.o popt/poptparse.o
ld: Unsatisfied symbol "libiconv_open" in file rsync.o
ld: Unsatisfied symbol "libiconv_close" in file clientserver.o
ld: Unsatisfied symbol "libiconv" in file rsync.o
3 errors.
collect2: ld returned 1 exit status
*** Error exit code 1
2)ruby(版本为ruby-1.8.6-p114.tar.gz)采用make编译时报错
# make
        MAKE=make /bin/sh ./config.status
config.status: creating Makefile
Makefile updated, restart.
*** Error exit code 1

# make
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c array.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c bignum.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c class.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c compar.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c dir.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c dln.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c enum.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c error.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c eval.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c file.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c gc.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c hash.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c inits.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c io.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c marshal.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c math.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c numeric.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c object.c
        gcc -g -O2  -DRUBY_EXPORT -DYYMAXDEPTH=300  -I. -I.  -c pack.c
        gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$ keywords > lex.c || \
        cp "./lex.c" .
sh: gperf:  not found.
cp: ./lex.c and ./lex.c are identical
*** Error exit code 1
打上补丁包之后,报错依然
swinstall -s DZYWRX76:/dbra/app/softs/gperf-3.0.4-ia64-11.31.depot
安装ruby1.87版本,报错,但是make可以继续
...
        ( gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$ keywords > lex.c.tmp && mv lex.c.tmp lex.c ) || \
        if test -f lex.c; then \
          touch lex.c && echo lex.c touched.; \
        else \
          cp ./lex.c lex.c && echo lex.c copied.; \
        fi
sh: gperf:  not found.
lex.c touched.
        gcc -g -O
       
安装完成之后zlib无法获取,解决办法为采用ruby 1.8.6用gmake,gmake install安装
#    irb
irb(main):001:0> require 'zlib'
LoadError: no such file to load -- zlib
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from (irb):1
irb(main):002:0> exit
# gem list
/dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- zlib (LoadError)
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:1
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/query_command.rb:3
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/list_command.rb:2
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:140:in `load_and_instantiate'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:65:in `[]'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:118:in `find_command'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:104:in `process_args'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:75:in `run'
        from /dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in `run'
        from /dbra/app/lib/ruby/bin/gem:24


3)oci8安装出错
# gem install -l --no-rdoc --no-ri ruby-oci8-1.0.2.gem
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-oci8-1.0.2.gem:
        ERROR: Failed to build gem native extension.

/dbra/app/lib/ruby/bin/ruby extconf.rb install -l --no-rdoc --no-ri ruby-oci8-1.0.2.gem
checking for load library path... (LD_LIBRARY_PATH)...
  found: /oradata/ora9208/product/db_1/lib32/libclntsh.so.9.0 looks like a full client.
checking for cc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/dbra/app/lib/ruby/bin/ruby
        --with-instant-client
        --without-instant-client
./oraconf.rb:402:in `check_cc': RuntimeError (RuntimeError)
        from ./oraconf.rb:389:in `init'
        from ./oraconf.rb:518:in `initialize'
        from ./oraconf.rb:238:in `new'
        from ./oraconf.rb:238:in `get'
        from extconf.rb:24
ng
---------------------------------------------------
error messages:
C compiler doesn't work correctly.
---------------------------------------------------
See:
* http://ruby-oci8.rubyforge.org/en/HowToInstall.html
* http://ruby-oci8.rubyforge.org/en/ReportInstallProblem.html



Gem files will remain installed in /dbra/app/lib/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2 for inspection.
Results logged to /dbra/app/lib/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2/ext/oci8/gem_make.out
后台日志显示:
# vi /dbra/app/lib/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2/ext/oci8/mkmf.log
"/dbra/app/lib/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2/ext/oci8/mkmf.log" 10 lines, 503 characters
"gcc -o conftest -I. -I/dbra/app/lib/ruby/lib/ruby/1.8/ia64-hpux11.31 -I.  -lcl -lpthread conftest.c  -L'.' -L'/dbra/app/lib/ruby/lib' -Wl,-R'/dbra/a
pp/lib/ruby/lib' -L.      -lruby-static  -ldld -ldl -lm   -lc"
/dbra/app/lib/ruby/lib/ruby/1.8/mkmf.rb:222: warning: Insecure world writable dir /dbra/app/lib in PATH, mode 040777
ld: Bad text origin argument: /dbra/app/lib/ruby/lib
Fatal error.
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: int main() { return 0; }
/* end */

解决办法:
修改/dbra/app/lib/ruby/lib/ruby/1.8/ia64-hpux11.31/rbconfig.rb中的CONFIG["RPATHFLAG"] 为 ""

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics