J2EE环境的搭建
1.[root@www soft]# unzip 10201_database_linux32.zip
2. vi /etc/sysctl.conf
#kernel.shmall = 2684354
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
kernel.sem = 250 32000 100 128
INSERT –
3. vi /etc/security/limits.conf(这个配置文件不动,相当于不对文件进行限制。否则容易出错)
4. 检查安装包:
(1)[root@www ~]# mkdir /media/cdrom
(2) [root@www ~]# mount /dev/cdrom /media/cdrom
(3) [root@www ~]# cd /media/cdrom/Server/
(4) cd /media/cdrom/Server
rpm -Uvh setarch-2*
rpm -Uvh make-3*
rpm -ivh glibc*
rpm -Uvh libaio-0*
rpm -Uvh compat-libstdc++-33-3*
rpm -Uvh compat-gcc-34-3*
rpm -Uvh compat-gcc-34-c++-3*
rpm -Uvh gcc-4*
rpm -Uvh libXp-1*
rpm -Uvh openmotif-2*
rpm -Uvh compat-db-4*
cd /
eject
5. 添加用户组:
groupadd dba
groupadd oinstall
groupadd oper
建立用户:
useradd -g oinstall -G dba oracle
6. 建立安装目录:
[root@www ~]# mkdir -p /opt/oracle/product/10.2.0/
[root@www ~]# chown -R oracle.oinstall /opt
7.修改权限:
修改权限:
chown -R oracle.oinstall database (进入到database的上一层目录)
chown -R oracle.oinstall oracle (进入到oracle的上一层目录)
8.切换用户:su – oracle
环境变量的配置:vi .bash_profile
unset USERNAME
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMP
ORACLE_BASE=/opt/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0;export ORACLE_HOME
ORACLE_SID=zhang;export ORACLE_SID
ORACLE_TERM=xterm;export ORACLE_TERM
PATH=$PATH:$ORACLE_HOME/bin;export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;export LD_LIBRARY_PATH
export CLASSPATH=$ORACLE_HOME/JRE:RACLE_HOME/jlib:ORACLE_HOME/rdbms/jlib;
export LANG=AMRICAN
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export PATH
9.修改权限和编译:
chmod 777 .bash_profile
./.bash_profile
10. 选择安装版本:
编辑 /etc/redhat-release (可能要进入root用户下,之后再进入oracle用户下看有没有改好的)
vi /etc/redhat-release
Red Hat Enterprise Linux Server release 5 (Tikanga) 被 redhat-4 替换(5改成4.5)
设置显示变量:
在root目录下执行:
xhost + 正确显示为:
[root@www ~]# xhost +
access control disabled, clients can connect from any host
设置显示变量:
11.[oracle@www database]$ DISPLAY=:0.0
([root@www ~]# xhost +xhost: unable to open display " " 这是我出现的问题。到root用户下改权限:chmod 777 ./bash_profile 再编译:./.bash_profile
进入oracle 用户下开始安装:
cd /soft/database
./runInstaller
12.连接用户与、登陆用户:
[root@www ~]# su - oracle
[oracle@www ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 5 20:17:43 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect
Enter user-name:
sqlplus /nolog 非日志登录
connect / as sysdba 利用管理员登陆
startup
shutdown immediate;
查询表的字段,详细信息:
SQL> desc employees;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER(5)
ENAME NOT NULL VARCHAR2(15)
EPHONE NOT NULL VARCHAR2(20)
)
Weblogic与oracle的配合
Weblogic的安装:
chmod 755 weblogic包名
./server910_linux32.bin
启动Weblogic域向导:/opt/bea/weblogic91/common/config.sh
启动服务: /opt/bea/my_project/domains/mydomain/startWeblogic.sh &
如果让系统启动时就启动Weblogic服务,只需在/etc/rc.local文件中放置如下命令即可:
/opt/bea/my_project/domains/mydomain/startWeblogic.sh &
/