Install jdk+tomcat+oracle9i notes _unix Linux on linux7.1

Source: Internet
Author: User
Tags chmod dba ftp mkdir tomcat sqlplus

This article draws on the http://www.puschitz.com/'s article:
Installing Oracle 9i on RedHat Linux 7.1, 7.2, 7.3, 8.0, 9, Red Hat Advanced Server 2.1, and on Red Hat Enterprise Linux A dvanced Server 3 (RHEL as 3)
Machine configuration: HP lh6000
CPU PIII 700
Memory 512M
Two 36G hard drives, do RAID0
Linux version: RedHat linux.7.1
Partition:/boot:100m swap:1024m/: All remaining space
Choose to install Xwindow, KDE.
Setup Xwindow can support tools such as Xmanager to remotely log on to Linux. The settings are as follows:
#vi/etc/x11/xdm/xdm-config
In the last line: displaymanager.requestport:0 before adding! Comment out of this row.
#vi/etc/x11/xdm/xservers
In the last line:: 0 local/usr/x11r6/bin/x the line before adding a #.
#vi/etc/x11/xdm/xaccess
Find #* #any host can get a login window
Remove the # number from the front of the line and turn it into:
* #any host can get a login window
Finally run #xdm. This allows you to connect to Linux by using tools such as Xmanager!!!
If you want to automatically start XDm each time you start, add/etc/x11r6/bin/xdm at the end of the/etc/rc.d/rc.local file
Install Oracle9i
Oracle9i for Linux can be downloaded from the following sites:
Http://otn.oracle.com/software/products/oracle9i/htdocs/linuxsoft.htm
A total of three packages:
Linux9i_Disk1.cpio.gz
Linux9i_Disk2.cpio.gz
Linux9i_Disk3.cpio.gz
Solution Package
If you want to unlock these packages in one step, use the following command:
Zcat Linux9i_Disk1.cpio.gz | Cpio-idmv
Zcat Linux9i_Disk2.cpio.gz | Cpio-idmv
Zcat Linux9i_Disk3.cpio.gz | Cpio–idmv
If two steps unlock these packages:
The first step: decompression
#gunzip-D Linux9i_Disk1.cpio.gz
#gunzip-D Linux9i_Disk2.cpio.gz
#gunzip-D Linux9i_Disk3.cpio.gz
Step Two: Unpack:
CPIO-IDMV < Linux9i_withjre_disk1.cpio
CPIO-IDMV < Linux9i_nojre_disk2.cpio
CPIO-IDMV < Linux9i_disk3.cpio
After the above operation, you will get Disk1, Disk2, Disk3 three folders. These three folders are oracle9i installation files

Swap space
The Exchange space recommended by Oracle is twice times the size of physical memory or at least 512MB, with the value of the larger of the two. I recommend using more swap space, especially if you have other programs running on the Oracle server, my PC has 256MB memory and I use 600MB swap space. If there is not enough swap space when Oracle is installed, especially when building a library, it will cause the system to react for a few minutes.
Check swap space:
Cat/proc/swaps
Increase swap space:

DD If=/dev/zero Of=tmpswap bs=1k count=300000
chmod Tmpswap
Mkswap Tmpswap
Swapon Tmpswap
Problems with the "binutils" RPM version
7.1 and 7.2 with the Binutils RPM package so that 9i universial Installer can not run up, and there is no newer version to solve this problem, you can have two options:
Download the following version of the RPM package, "demote" the Binutil on the Oracle server:
ftp://ftp.redhat.com/pub/redhat/linux/7.0/en/os/i386/RedHat/RPMS/binutils-2.10.0.18-1.i386.rpm
Installation: binutils-2.10.0.18-1.i386.rpm
#rpm –UVH--force--nodeps binutils-2.10.0.18-1.i386.rpm
After installing Oracle, don't forget to upgrade the Binutil back.
Another easy way to do this is to wait for the following error to occur in the installation, and then manually fix it:
"Error invoking target install of makefile/opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"
Repair method:
The editor $ORACLE _home/bin/genclntsh
ld_self_contained= "-Z defs"
Change into:
Ld_self_contained= ""
Then run the script: $ORACLE _home/bin/genclntsh:
$ $ORACLE _home/bin/genclntsh

Created/opt/oracle/product/9.0.1/lib/libclntst9.a

And then select Retry.
Install JDK
Download jdk 1.3.1 or Blackdown 1.1.8_v3 (I always use Blackdown, which Oracle previously recommended to Linux users).
According to the JDK documentation, install the JDK in the/usr/local directory and establish the JDK symbols to connect to/usr/local/java:
#bzip2-dc jdk118_v3-glibc-2.1.3.tar.bz2 | tar XF--c/usr/local
#ln-S/usr/local/jdk118_v3/usr/local/java
to establish an Oracle user
Groupadd dba
Groupadd Oinstall
Useradd-g oinstall-g dba Oracle
passwd Oracle
Establish Oracle directory
Mkdir/opt/oracle
Mkdir/opt/oracle/prod UCT
mkdir/opt/oracle/product/9.0.1
chown-r oracle.oinstall/opt/oracle
mkdir/var/opt/oracle
Chown Oracle.dba/var/opt/oracle
chmod 755/var/opt/oracle
Set Oracle Environment
Access to Oracle users, establish $HOME/.bash_profile:
# Oracle Environment
Export oracle_base=/opt/oracle
Export oracle_home=/opt/oracle/product/9.0.1
Export Oracle_sid=test
Export oracle_term=xterm
#export tns_admin= Set this variable, if Sqlnet.ora, Tnsnames.ora etc is not in $oracle_home The/network/admin directory.

Export Nls_lang=american;
Export ora_nls33= $ORACLE _home/ocommon/nls/admin/data
ld_library_path= $ORACLE _home/lib:/lib:/usr/lib:/usr /openwin/lib
ld_library_path= $LD _library_path:/usr/td/lib:/usr/ucblib:/usr/local/lib
Export LD_LIBRARY_ PATH
# Set Shell search paths:
path=/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/openwin/bin:/opt /local/gnu/bin
path= $PATH:/opt/local/bin:/opt/nscpnav/bin: $ORACLE _home/bin
path= $PATH:/usr/local/samba/ BIN:/USR/UCB:
Export PATH
# CLASSPATH must include the following JRE locations:
classpath= $ORACLE _home/jre: $O Racle_home/jlib: $ORACLE _home/rdbms/jlib
classpath= $CLASSPATH: $ORACLE _home/network/jlib

Here are the contents of my $home/.bash_profile file
#. bash_profile# get the aliases and Functionsif [-f ~/.BASHRC]; Then. ~/.bashrcfi# User specific environment and startup Programspath= $PATH: $HOME/binbash_env= $HOME/.bashrcexport bash_env Pathunset usernameexport oracle_base=/opt/oracle export oracle_home=/opt/oracle/product/9.0.1 export ORACLE_SID=test Export Oracle_term=xterm export Nls_lang=american; Export ora_nls33= $ORACLE _home/ocommon/nls/admin/data ld_library_path= $ORACLE _home/lib:/lib:/usr/lib:/usr/openwin /lib ld_library_path= $LD _library_path:/usr/td/lib:/usr/ucblib:/usr/local/lib export Ld_library_path PATH=/bin:/usr /bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/openwin/bin:/opt/local/gnu/bin PATH= $PATH:/opt/local/bin:/opt/ Nscpnav/bin: $ORACLE _home/bin path= $PATH:/usr/local/samba/bin:/usr/ucb:export PATH classpath= $ORACLE _home/jre:$ Oracle_home/jlib: $ORACLE _home/rdbms/jlib classpath= $CLASSPATH: $ORACLE _home/network/jlib Export CLASSPATH

Start Runinstaller
Oracle no longer supports character mode installation, so you must set the display variable, assuming that the node name is Oracleserver, then Oracleserver must allow Runinstaller to display the X information. If you are not installing the database remotely, you can skip the first and second steps below.
The first step: yourdesktop:user$ xhost +oracleserver
Step two: Execute from Oracleserver's console with Oracle users:
oracleserver:oracle$ Export display=yourdesktop:0.0
Step three A: from the first CD, perform Runinstaller (do not CD to/mnt/cdrom!). )
oracleserver:oracle$ Mount/mnt/cdrom
oracleserver:oracle$/mnt/cdrom/runinstaller
Step three B: or from the download point:
oracleserver:oracle$ Disk1/runinstaller
(Note: Use my installation method without setting the display variable)
Running Oracle Installation
Here are my answers to Runinstaller's questions: What would you as the base directory (Inventory Location):/opt/oracle/orainventory
UNIX Group Name (permission for updating Oracle software): Oinstall
Full path name of Oracle home:/opt/oracle/product/9.0.1
JDK Home Directory:/usr/local/java
Attention:
If you don't have a "downgrade" Binutils package, you will see the following error when you install to the third CD:
"Error invoking target install of makefile/opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"
The solution is to see the "Oracle installation Error" later.
You may also encounter "Oracle Net Configuration Assistant" pending issues, please refer to "Important tips and hints for Oracle Installation" later.
Launch Oracle 9i Database
There is no svrmgrl in the 9i, all management work has been heard sqlplus to complete:
dba$ Sqlplus/nolog
Sql> Connect/as SYSDBA
Sql> Startup
' Www.knowsky.com
Important tips and hints for Oracle installation
Check the checksum of the file if you encounter a gunzip error:
$ md5sum Linux9i_Disk1.cpio.gz Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz
F1a99eb8c8aca1d69a9eeaa8858570d7 Linux9i_Disk1.cpio.gz
F2444c0fa53c898e7d2f78c184829d7d Linux9i_Disk2.cpio.gz
ec655402d8bc547ed031f14122da574b Linux9i_Disk3.cpio.gz
Do not CD to/mnt/cdrom execution./runinstaller!
Otherwise you will not be able to eject the CD at the time of installation, because unmount cannot unload the CD that hangs on.
If you forget to set the display environment variable or forget to give the database server permission to display X information on your desktop PC (for example, Xhost +oracleserver), you will get the following error:
Xlib:connection to ': 0.0 ' refused by server
Xlib:client is isn't authorized to connect to Server
The solution is: Rm-rf/tmp/orainstall
If you do not, the installer will hang there without any error messages. Also check to see if Runinstaller stopped running in the background.
When Runinstaller begins to configure the tool, Oracle Net Configuration Assistant hangs, and the simple solution is to stop its configuration, reconfigure or continue the installation, and then "Retry" once the other installation is complete.
If the system stops responding in an installation, there may not be enough swap space. If something like this happens, you can only wait until the system reacts.
Oracle installation also needs to run programs such as make, in the production environment, you may not have the compiler and other development tools, so you need to temporarily install the following several packages:
CPP, Egcs, egcs-c++, Glibc-devel, Kernel-headers.
If you cannot successfully install 9i and need to redo it, you need to clear the following files and directories:
Rm-rf/etc/orainst.loc/etc/oratab/tmp/orainstall
RM-RF $ORACLE _base/*
/tmp/
Oracle Installation Error
Here are some other questions and solutions for Oracle installation, and I don't have most of them, so I'm not sure if the answers are correct and if you have a good solution or other problem, write to me and I will add to this file.
First check the error log in the/tmp/orainstall, and if you encounter make errors, check: $ORACLE _home/install/make.log.
"Error invoking target install of makefile/opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"
"Error invoking target install of makefile/opt/oracle/product/9.0.1/precomp/lib/ins-precomp.mk"
"Error invoking target install of makefile/opt/oracle/product/9.0.1/precomp/lib/ins-net-client"
"Error invoking target install of makefile/opt/oracle/product/9.0.1/precomp/lib/ins-oemagent"
The editor $ORACLE _home/bin/genclntsh
ld_self_contained= "-Z defs"
Change into:
Ld_self_contained= ""
Then run the script: $ORACLE _home/bin/genclntsh:
$ $ORACLE _home/bin/genclntsh

Created/opt/oracle/product/9.0.1/lib/libclntst9.a
$
Click Retry in the error dialog box.
"Error in setting permissions of File/directory/opt/oracle/jre/1.1.8/bin/i686/native_threads/.extract_args."
When the error box is open, manually locate and copy the file from the directory where the JRE is installed. Extract_args to where the Runinstaller hint file is missing.
Install JDK1.3.1
The installation package I use is J2sdk-1_3_1-linux-i386-rpm.bin
#chmod +x J2sdk-1_3_1-linux-i386-rpm.bin
#./J2sdk-1_3_1-linux-i386-rpm.bin
This will generate the RPM installation package
#rpm –IVH j2sdk-1_3_1-linux-i386-rpm
After the installation is successful, the JDK will be installed in the/usr/java/jdk1.3.1 directory
Edit the/etc/profile file and add the following lines:
java_home=/usr/java/jdk1.3.1
Export Java_home
Classpath=/usr/java/jdk1.3.1/lib:/usr/java/jdk1.3.1/jre/lib
Export CLASSPATH
Path= $PATH:/usr/java/jdk1.3.1/bin:/usr/java/jdk1.3.1/jre/bin
Then launched. The JDK installation settings are complete.
To verify the installation of the JDK:
#java-version
The Java version will be prompted to be 1.3.1.
Install Tomcat.
Download Tomcat installation files: jakarta-tomcat.tar.gz
#tar ZXVF jakarta-tomcat.tar.gz
#cp –R jakarta-tomcat/usr/tomcat (copy unzipped folder to/usr)
#cd/usr/tomcat/bin
#./startup.sh (Start Tomcat)
Verify that Tomcat is working correctly
Enter http://tomcatserver:8080 in IE browser
If there's a tomcat interface, it's a success!!! It's a simple!!!.

If you are connecting to Oracle, you need to edit the Server.xml file in the/ust/tomcat/conf directory. Also have the Oracle driver!

Finally finished!!!! Tired!!!!!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.