English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Linux Centos6.5 64Install oracle under bit12c:
groupadd oinstall groupadd dba mkdir -p /u01/oracle useradd -g oinstall -G dba -d /u01/oracle oracle (Here it is not necessary to change the home directory to/u01/oracle, the default is also acceptable.) Copy the following three files to /u01/oracle directory [root@oracle /]# cd /etc/skel/ [root@oracle skel]# ll -a -rw-r--r--. 1 root root 18 7Month 18 2013 .bash_logout -rw-r--r--. 1 root root 176 7Month 18 2013 .bash_profile -rw-r--r--. 1 root root 124 7Month 18 2013 .bashrc Note: When adding a user with useradd, it will automatically copy files from this directory to the user's home directory password oracle chown -R oracle:oinstall /u01 chmod -R 775 /u01/
/*Install vnc*/
yum -y install tigervnc-server vncserver Enter Enter password ps -ef | grep vnc VNC client connection: ip:1
Check if the following programs are installed:
binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 - elfutils-libelf-0.125 elfutils-libelf-devel-0.125 - elfutils-libelf-devel-static-0.125 - gcc-4.1.2 - gcc-c++-4.1.2 - glibc-2.5-24 glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5 kernel-headers-2.6.18 ksh-20060214 - libaio-0.3.106 libaio-devel-0.3.106 - libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 - make-3.81 sysstat-7.0.2 unixODBC-2.2.11 - unixODBC-devel-2.2.11 -
Modify /etc/Add the following parameters to the sysctl.conf file
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586
To make the above configuration take effect without restarting the system, execute the following command
# /sbin/sysctl -p
Modify user limits
Root user: modify /etc/security/Add the following parameters to the limits.conf file
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
Modify the user authentication options
Under the root user: modify/etc/pam.d/Add the following parameters to the login file
session required pam_limits.so
Modify the user configuration file
Under the root user: modify/etc/Add the following parameters to the profile file:
if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
Modify the bash_profile for the oracle user:
$ vi .bash_profile
Add the following content, mainly for modification
export ORACLE_BASE=/u01 export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1 export ORACLE_SID=hxw168 export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
Install oracle:
Cannot use the command when installing oracle/usr/bin/xdpyinfo automatically checks the display color:
[root@oracle /]# xdpyinfo | grep "name of display" name of display: :1.0 [root@oracle /]# Execute the command under the Oracle user: export DISPLAY=:1.0 (above name of display: followed by :)}1.0)
prvf-0002: Unable to retrieve the local node name
host file ip and name correspond to 192.168.198.188 oracle
SQL> create user admin identified by zerostudy;
create user admin identified by zerostudy
*
ERROR at line 1:
ORA-65096: invalid common user or role name
SQL> !oerr ora 65096
65096, 00000, "invalid common user or role name"
// *Cause: An attempt was made to create a common user or role with a name
// that was not valid for common users or roles. In addition to
// the usual rules for user and role names, common user and role
// names must start with C## or c## and consist only of ASCII
// characters.
// *Action: Specify a valid common user or role name.
//
Solution: https://www.oldtoolbag.com/article/92720.htm
Adjust the virtual machine's memory to600 many M (originally1G many), when starting oracle, it prompts:
SQL> startup
ORA-00845: MEMORY_TARGET is not supported on this system
SQL> !oerr ora 00854
00854, 00000, "ASM IOServer Instance Fence monitor process terminated."
// *Cause: The ASM IOServer Fence monitor process died.
// *Action: Warm start the instance.
The reason is that the size of shm in the Linux system is smaller than the SGA setting.
You can adjust the size of shm:
vi /etc/fstab
Modify the settings of the following line
tmpfs /dev/shm tmpfs defaults 0 0
Change to
tmpfs /dev/shm tmpfs defaults,size=6G 0 0
Re-mount shm to take effect
mount -o remount /dev/shm
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
Need to change the listener.ora file (path in $ORACLE_HOME/network/admin), then restart lsnrctl
# Generated by Oracle configuration tools. #LISTENER = # (DESCRIPTION_LIST = # (DESCRIPTION = # (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521) # (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.198.188)(PORT = 1521) # ) # ) hxw168 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.198.188)(PORT = 1521) ) ) SID_LIST_hxw168= (SID_LIST = (SID_DESC = (ORACLE_HOME = /u01/app/product/12.1.0/db_1) (SID_NAME = hxw168) ) )
Simple startup script for oracle:
[root@oracle ~]# cat /etc/init.d/oracle su - oracle <<EOF lsnrctl start sqlplus / as sysdba startup EOF
This article is from the blog 'Even if I am wrong, let me be wrong to death!'