#apt-get install binutils gcc-4.4 libaio1 gawk alien ksh sysstat build-essential libmotif3 alien libtool lsb-rpm
# ln -s /usr/bin/awk /bin/awk
# ln -s /usr/bin/rpm /bin/rpm
# ln -s /usr/bin/basename /bin/basename
#ln -sf /bin/bash /bin/sh
# mkdir /etc/rc.d
# ln -s /etc/rc0.d /etc/rc.d/rc0.d
# ln -s /etc/rc2.d /etc/rc.d/rc2.d
# ln -s /etc/rc3.d /etc/rc.d/rc3.d
# ln -s /etc/rc4.d /etc/rc.d/rc4.d
# ln -s /etc/rc5.d /etc/rc.d/rc5.d
# ln -s /etc/rc6.d /etc/rc.d/rc6.d
# ln -s /etc/init.d /etc/rc.d/init.d
#for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done
#ln -s /etc/init.d /etc/rc.d/init.d
#echo “Red Hat Linux release 4″ > /etc/redhat-release
# addgroup oinstall
# addgroup dba
# addgroup nobody
# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash -m oracle
# usermod -g nobody nobody
# mkdir -p /u01/app/oracle
#chown -R oracle:dba /u01
#vi /etc/sysctl.conf
kernel.shmmax = 3147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
#vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 65530
oracle hard nofile 65536
#vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
#Sysctl -p
#vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
#vi /home/oracle/.profile
export TMP=/tmp
export TMPDIR=/tmp
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=jinting
export ORACLE_HOME=/u01/app/oracle/product/11.2
export PATH=$PATH:$ORACLE_HOME/bin
#su - oracle
#echo $ORACLE_HOME
# Vi /u01/database/response/db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=hostname
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
#chown -R oracle:dba /u01
#./runInstaller -ignorePrereq -ignoreSysPrereqs -noconfig -silent -responseFile /u01/database/response/db_install.rsp
#vi /u01/database/response/netca.rsp
SHOW_GUI=false
LOG_FILE="/oracle11gHome/network/tools/log/netca.log"
/u01/app/oracle/product/11.2/bin/netca /silent /responseFile /u01/database/response/netca.rsp
vi /u01/database/response/dbca.rsp
SID = "jinting"
SYSPASSWORD = "password"
SYSTEMPASSWORD = "password"
SYSMANPASSWORD = "password"
DBSNMPPASSWORD = "password"
DATAFILEDESTINATION ="/u01/app/oracle/flash_recovery_area"
CHARACTERSET = "ZHS16GBK"
TOTALMEMORY = "6000"
SCRIPTDESTINATION ="/u01/app/oracle/product/11.2/sysman/admin/scripts"
/u01/app/oracle/product/11.2/bin/dbca -silent -responseFile /u01/database/response/dbca.rsp
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2/root.sh
create temporary tablespace jt_temp_1
tempfile '/home/oracle/jinting/jt_temp1.dbf'
size 5120m
autoextend on
next 64m maxsize 20480m
extent management local;
create tablespace jt_data
logging
datafile '/home/oracle/jinting/jt_data1.dbf'
size 5120m
autoextend on
next 64m maxsize 20480m
extent management local;
create user jinting identified by 1111
default tablespace jt_data
temporary tablespace jt_temp_1;
grant connect,resource,dba to jinting;
imp userid=jinting/1111 full=y file=*.dmp ignore=y
exp jinting/1111 file=dbname.dmp full=y
oracle@hipi-desktop:~$ tnsping jinting
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 08-JUL-2010 10:57:52
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2/network/admin/sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
OK (30 msec)
oracle@hipi-desktop:~$ sqlplus user/password@jinting
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 8 11:01:21 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SELECT 1+2+3+4 FROM DUAL;
1+2+3+4
----------
$sqlplus /nolog
SQL>connect /as sysdba
SQL>startup
$sqlplus system/manager
SQL>select count(*) from tab;
$lsnrctl start
$lsnrctl
LSNRCTL> start
$lsnrctl status
%sqlplus /nolog
SQL>connect /as sysdba
SQL>shutdown immediate
$ps –ef | grep ora_
$ipcs
$lsnrctl stop
%lsnrctl
LSNRCTL> stop