Install JDK + Tomcat + Oracle9i on linux7.1

Source: Internet
Author: User
Tags unpack

This article draws on http://www.puschitz.com/ 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 Advanced Server 3 (RHEL as 3)
Machine configuration: HP lh6000
Cpu pii 700
Memory 512 MB
Two 36 GB hard disks for RAID 0
Linux: RedHat linux.7.1
Partition:/boot: 100 m swap: 1024 M/: all available space
Select install XWindow and KDE.
Setting XWindow supports remote logon to Linux using tools such as xmanager. The settings are as follows:
# Vi/etc/X11/xdm-config
Add "displaymanager. requestport: 0" to the last row! Comment out this line.
# Vi/etc/X11/xdm/xservers
Comment out this line with # In front of the last line: 0 local/usr/x11r6/bin/X.
# Vi/etc/X11/xdm/xaccess
Find # * # Any host can get a login window
Remove the # sign before this line and change it:
* # Any host can get a login window
Run # xdm. In this way, you can connect to Linux using tools such as xmanager !!!
If you want to automatically start xdm at each startup, add/etc/x11r6/bin/xdm to the end of the/etc/rc. d/rc. Local file.
Install Oracle9i
Oracle9i for Linux can be downloaded from the following site:
Http://otn.oracle.com/software/products/oracle9i/htdocs/linuxsoft.htm
There are three software packages:
Linux9i_disk1.cpio.gz
Linux9i_disk2.cpio.gz
Linux9i_disk3.cpio.gz
Unpack
To unbind these packages, run 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 you unlock these packages in two steps:
Step 1: Extract
# Gunzip-D linux9i_disk1.cpio.gz
# Gunzip-D linux9i_disk2.cpio.gz
# Gunzip-D linux9i_disk3.cpio.gz
Step 2: unpack:
Cpio-idmv <linux9i_withjre_disk1.cpio
Cpio-idmv <linux9i_nojre_disk2.cpio
Cpio-idmv <linux9i_disk3.cpio
After completing the preceding operations, you will get three folders: disk1, disk2, and disk3. These three folders are the installation files of Oracle9i.

swap space
the recommended swap space for Oracle is twice or at least 512 MB of physical memory. The larger value is used. We recommend that you use more swap space, especially when other Programs run on the Oracle server, my PC has 256 MB memory and I use 600 mb swap space. If you do not have enough swap space when installing Oracle, especially when creating a database, the system will not respond for several minutes.
check the swap space:
CAT/proc/SWAPs
increase the swap space:

Dd If =/dev/Zero of = tmpswap BS = 1 k count = 300000
Chmod 600 tmpswap
Mkswap tmpswap
Swapon tmpswap
"Binutils" rpm version Problems
The binutils RPM package with 7.1 and 7.2 makes 9i universial installer unable to run, and there is no updated version to solve this problem. You can have two options:
Download the RPM package of the following version and "downgrade" 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, do not forget to upgrade binutil back.
Another simple method is to wait for the following error during installation and fix it manually:
"Error invoking target install of makefile/opt/Oracle/product/9.0.1/PLSQL/lib/ins_plsql.mk"
Solution:
Edit $ ORACLE_HOME/bin/genclntsh
Ld_self_contained = "-Z defs"
Changed:
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

select retry.
install JDK
download JDK 1.3.1 or Blackdown 1.1.8 _ V3 (I always use Blackdown, which was previously recommended to Linux users by Oracle ).
install JDK in the/usr/local directory and establish the JDK symbol 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
create an oracle user
groupadd DBA
groupadd oinstall
useradd-G oinstall-g dba Oracle
passwd Oracle
Create an oracle directory
mkdir/ OPT/Oracle
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 up the Oracle environment
enter the Oracle user to create $ 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 SQL Net. ora and tnsnames. ora are not in the $ ORACLE_HOME/Network/Admin directory.

export nls_lang = American;
export ora_nls33 = $ ORACLE_HOME/ocommon/NLS/admin/Data
LD_LIBRARY_PATH = $ ORACLE_HOME/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/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: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib
classpath = $ classpath: $ ORACLE_HOME/Network/jlib

The content of my $ home/. bash_profile file is as follows:
#. 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:/usr/openwin/lib LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: /usr/TD/lib:/usr/ucblib:/usr/local/lib export LD_LIBRARY_PATH Path =/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. Therefore, you must set the DISPLAY variable. If the node name is oracleserver, oracleserver must allow runinstaller to display X information. If you are not remotely installing the database, skip the first and second steps below.
Step 1: yourdesktop: User $ xhost + oracleserver
Step 2: run the following command on the oracleserver console as an oracle user:
Oracleserver: Oracle $ export display = yourdesktop: 0.0
Step 3 A: Run runinstaller from the first CD (do not CD to/mnt/CDROM !)
Oracleserver: Oracle $ Mount/mnt/CDROM
Oracleserver: Oracle $/mnt/CDROM/runinstaller
Step 3 B: or download point:
Oracleserver: Oracle $ disk1/runinstaller
(Note: Use my installation method without setting the DISPLAY variable)
Run Oracle Installation
The following is my answer to runinstaller: What wocould you like as the base Directory (inventory location):/opt/Oracle/orainventory
UNIX group name (permission for updating Oracle software): oinstall
Full path name of the Oracle Home:/opt/Oracle/product/9.0.1
JDK Home Directory:/usr/local/Java
Note:
If the "downgrade" binutils package is not available, you will see the following error when installing the third CD:
"Error invoking target install of makefile/opt/Oracle/product/9.0.1/PLSQL/lib/ins_plsql.mk"
For the solution, see "Oracle installation error ".
You may also encounter the issue of "Oracle Net configuration assistant" suspension. Refer to the "important tips and tips in Oracle Installation" below.
Start Oracle 9i Database
9i has no svrmgrl, and all management work has been completed by sqlplus:
DBA $ sqlplus/nolog
SQL> connect/As sysdba
SQL> startup
'Www .knowsky.com
Important tips and tips for Oracle Installation
If a gunzip error occurs, check the file checksum:
$ 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 run CD to/mnt/CDROM./runinstaller!
Otherwise, you will not be able to bring up a CD during installation, because unmount will not be able to unload the mounted CD.
If you forget to set the display environment variable or forget to grant the database server the permission to display X information on the desktop PC (for example, xhost + oracleserver), the following error is returned:
Xlib: connection to ": 0.0" refused by Server
Xlib: client is not authorized to connect to server
Solution: Rm-RF/tmp/orainstall
If you do not do this, the installer will be there without any error message. Also, check whether the runinstaller stops running in the background.
When runinstaller starts to configure the tool, "Oracle Net configuration assistant" will be suspended. A simple solution is to stop the configuration, reconfigure it, or continue the installation. After other installation is complete, retry again ".
If the system stops responding during installation, there may be insufficient swap space. If this happens, you can only wait until the system responds.
To install Oracle, you also need to run make and other programs. in the production environment, you may not have installed the compiler or other development tools. Therefore, you need to temporarily install the following packages:
CPP, egcs, egcs-C ++, glibc-devel, and kernel-headers.
If you cannot install 9i successfully, 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
The following are some questions about Oracle Installation and solutions. I have not encountered most of these questions. Therefore, I cannot determine whether these answers are correct, if you have a good solution or other problems, you can write to me and I will add it to this file.
First, check the error log in/tmp/orainstall. If a make error occurs, 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"
Edit $ ORACLE_HOME/bin/genclntsh
Ld_self_contained = "-Z defs"
Changed:
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
$
In the error dialog box, click Retry.
"Error in setting permissions of file/directory/opt/Oracle/JRE/1.1.8/bin/i686/native_threads/. extract_args.
When the error box is opened, manually find and copy the file. extract_args from the directory where JRE is installed to the location where runinstaller prompts the file is missing.
Install jdk1.3.1
The installation package I'm using 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
The RPM installation package will be generated.
# Rpm-IVH j2sdk-1_3_1-linux-i386-rpm
After successful installation, 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
And then launch. JDK installation is complete.
Verify JDK installation:
# Java-version
The system will prompt that the Java version is 1.3.1.
Install Tomcat.
Download the tomcat installation file: jakarta-tomcat.tar.gz
# Tar zxvf jakarta-tomcat.tar.gz
# Cp-r Jakarta-Tomcat/usr/tomcat (copy the decompressed folder to/usr)
# Cd/usr/tomcat/bin
#./Startup. Sh (start Tomcat)
Verify that Tomcat runs properly
Enter http: // tomcatserver: 8080 in IE
If the Tomcat interface appears, it is successful !!! Very simple !!!

To connect to Oracle, edit the server. xml file in the/ust/tomcat/conf directory. Oracle drivers are also available!

I have finished writing !!!! 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.