1,创建system文件,添加文件
# vi /etc/system
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=100
set semsys:seminfo_semmns=2500
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767
set noexec_user_stack=1
重启
root进入:
1,# groupadd dba
# useradd -g dba –d /export/home/oracle –m oracle
# passwd oracle
2,建立文件夹Oracle
3,# chown -R oracle:dba /oracle
# chown -R oracle:dba /software
# chmod -R 755 /oracle
4,su oracle
mkdir /oracle/u01
mkdir /oracle/u02
mkdir /oracle/u03
mkdir /oracle/u04
5 su root
# vi /etc/profile
ORACLE_BASE=/oracle/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10g
ORACLE_SID=uep
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK PATH=$PATH:$ORACLE_HOME/bin:/bin:/sbin:/usr/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/local/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/usr/local/lib:/usr/lib
TMPDIR=/var/tmp
export ORACLE_BASE ORACLE_HOME ORACLE_SID NLS_LANG PATH LD_LIBRARY_PATH DISPLAY TMPDIR
umask 022
6 生效:cd /etc
./profile
7 # vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
8 生效:#/sbin/sysctl –p
9 vi /etc/security/limits.conf
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
10 vi /etc/pam.d/login
session required /lib/security/pam_limits.so
重启
Oracle用户登陆
oracle@linux:~>cd /software
oracle@linux:/software>cpio -idmv < 10201_database_linux_x86_64.cpio
oracle@linux:/software>export LANG=en_US
oracle@linux:/software>cd database/
oracle@linux:/software/database>./runInstaller
安装过程中的问题解决:
(1)ORA-27125:unable to create shard memory segment
问题解决:
oracle@linux:~>cd $ORACLE_HOME/bin
oracle@linux:/oracle/u01/app/oracle/product/10g/bin>mv oracle oracle.bin
oracle@linux:/oracle/u01/app/oracle/product/10g/bin>cat >oracle <
> #!/bin/bash
> export DISABLE_HUGETLBFS=1
> exec $ORACLE_HOME/bin/oracle.bin $@
> EOF
oracle@linux:/oracle/u01/app/oracle/product/10g/bin># chmod +x oracle
oracle@linux:/oracle/u01/app/oracle/product/10g/bin>
(2)Bash:/oracle/u01/app/oracle/oralnventory/orainstRoot.sh:没有那个文件或目录的错误
解决方法:
su root
linux:~ # cd /oracle/u01/app/oracle
linux:/oracle/u01/app/oracle # ls
. .. admin oraInventory oradata product
linux:/oracle/u01/app/oracle # cd oraInventory/
linux:/oracle/u01/app/oracle/oraInventory # chown -R root:root orainstRoot.sh
linux:/oracle/u01/app/oracle/oraInventory # chmod 777 orainstRoot.sh
跑脚本
oracle@linux:~> su root
Password: (密码root)
linux:/export/home/oracle #
linux:/export/home/oracle # /oracle/u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/u01/app/oracle/oraInventory to 770.
Changing groupname of /oracle/u01/app/oracle/oraInventory to dba.
The execution of the script is complete
linux:/export/home/oracle # cd /oracle/u01/app/oracle
linux:/oracle/u01/app/oracle # cd product/
linux:/oracle/u01/app/oracle/product # ls -l
total 12
drwxrwx--- 3 oracle dba 4096 2009-06-23 21:09 .
drwxrwx--- 6 oracle dba 4096 2009-06-23 21:40 ..
drwxr-x--- 60 oracle dba 4096 2009-06-23 21:42 10g
linux:/oracle/u01/app/oracle/product # cd 10g/
linux:/oracle/u01/app/oracle/product/10g # ./root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/u01/app/oracle/product/10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
linux:/oracle/u01/app/oracle/product/10g #
启动Oracle数据库
linux:~ # su - oracle
oracle@linux:~> sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 23 22:43:42 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> startup(挂载数据库)
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
oracle@linux:~> lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 23-JUN-2009 22:44:21
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> start(启动监听器)
TNS-01106: Listener using listener name LISTENER has already been started
LSNRCTL> exit
oracle@linux:~> sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 23 22:45:08 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: system
Enter password: (密码oracle)
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
oracle@linux:~> sqlplus
SUSE上删除Oracle的方法:
第一步:
oracle@linux:~> cd /software
oracle@linux:/software> cd database/
oracle@linux:/software/database> ./runInstaller
出现界面,选择已安装产品,删除
第二步删除/Oracle 下的app文件夹
SSH打开:
linux:~ # vi /etc/ssh/sshd_config
把:permitRootlogin yes 的注释去掉
passwordAuthentication no 中的no改为yes
linux:~ # cd /etc
linux:/etc # chmod 777 profile
linux:/etc # rcSuSEfirewall2 off
Usage: /sbin/rcSuSEfirewall2 {start|stop|status|restart|reload|force-reload}
linux:/etc # /etc/init.d/sshd start
Starting SSH daemon done
linux:/etc #
重启
X manager打开
第一步:YAST Network Service Remote Administration下选择Allow Remote Administration
第二步: 打开SHELL, 执行 rcxdm restar
linux:~ # su - oracle
oracle@linux:~> sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 24 23:21:54 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 2022144 bytes
Variable Size 486540544 bytes
Database Buffers 1644167168 bytes
Redo Buffers 14753792 bytes
Database mounted.
Database opened.