"Ultra-detailed" Centos7 installation of Oracle 12c

Source: Internet
Author: User
Tags dba

System Configuration
    1. CentOS 7.4 x86_64 operating system;
    2. Oracle only supports 64-bit Linux systems. 32Linux platform is not supported;
    3. Orache Installation configuration:
      • Memory capacity: 4GB and above;
      • Swap capacity: 8GB (twice times the physical memory);
      • Installation directory is located in the partition free space of not less than 15GB, the machine is 20GB;

Package: Baidu Cloud Password: iwb7

Start installation One, System configuration 1. Shutting down the firewall and SELinux
systemctl disable firewalld.servicesystemctl stop firewalld.servicesetenforce 0

2. Change the host name to "Oracle"
vim /etc/hostname

Oracle

Adding a native resolution
vim /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.100.100 Oracle #添加解析条目

3. Install the Environment package
yum -y install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel
4. Adjust system kernel Parameters
vim /etc/sysctl.conf
  fs.aio-max-nr = 1048576

#异步IO请求数目 recommended value is: 1048576 actually it equals 1024*1024 is 1024K
Fs.file-max = 6815744
#打开的文件句柄的最大数量 to prevent file descriptor exhaustion
Kernel.shmall = 2097152
#共享内存总量 page unit, memory divided by 4K
Kernel.shmmax = 4294967295
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
#SEMMSL: Maximum number of signals per signal set Semmns: Used to control the maximum number of signals in the entire Linux system semopm: The kernel parameter is used to control the number of signal operations that each SEMOP system call can perform Semmni: The kernel parameters are used to control the entire Linux system Maximum number of signal sets
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 = 1048576
#套接字发送缓冲区大小的最大值

5. Reload the configuration file
sysctl -p
Ii. user and installation directory configuration 1. New Oinstall, DBA Group
groupadd oinstallgroupadd dba
2. Create a new user for this group Oracle
useradd -g oinstall -G dba oracle
3. Set the Oracle Password
passwd oracle
4. Create a new Oracle directory
mkdir -p /orc/app/oracle
5. Modify the owner or group of the directory
chown -R oracle:oinstall /orc/app/
6. Modify the permissions of the Oracle directory
chmod -R 755 /orc/app/oracle/
7.oracle User Environment Configuration
vim /home/oracle/.bash_profile   

#权限 (anti-code)
Umask 022
#oracle的BASE目录定义
Oracle_base=/orc/app/oracle
#oracle的HOME目录定义
oracle_home=/orc/app/oracle/product/12.2.0/dbhome_1/
#
Oracle_sid=orcl
#简体中文版
nls_lang= "Simplified Chinese_china". UTF8
#重新定义系统环境变量
Path= $PATH: $HOME/.local/bin: $HOME/bin: $ORACLE _home/bin
#定义语系
Lang=zh_cn. UTF-8
#导入系统变量
Export PATH LANG Nls_lang oracle_base oracle_home oracle_sid

8.oracle User Resource Limit 8.1 using Pam_limits authentication module
vim /etc/pam.d/login

#在内容末尾添加以下两行数据
Session required/lib/security/pam_limits.so
Session Required Pam_limits.so

8.2 Editing the limits.conf configuration
vim /etc/security/limits.conf

#在内容末尾添加以下数据
#单用户可使用的进程数量
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
#用户可打开的文件数量
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536
#堆栈设置
Oracle Soft Stack 10240

9. Edit Profile
vim /etc/profile

#在内容末尾添加以下语句
if [$USER = "Oracle"]
Then
if [$SHELL = "/bin/ksh"]
Then
Ulimit-p 16384 #缓冲区大小
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536 number of files #进程数
Fi
Fi

Third, start the installation of Oracle (need to operate in a graphical interface) 1. Operate in a graphical interface with the root user
xhost +

2. Switching Oracle Users
su - oracle
3. Setting the resolution
export DISPLAY=:0.0
4. Enter the ORACLE_12C package directory
cd /tmp/oracle_12c
5. Start the installation
./runInstaller








Install pop-up processing and then open a bash terminal and log in with the root user
su root
Run the following two scripts
/orc/app/oraInventory/orainstRoot.sh/orc/app/oracle/product/12.2.0/dbhome_1/root.sh

Then click "Confirm" to continue installing Oracle

At this point, the Oracle installation is complete. 1) Web Interface Access View install Flash-player player Plugin
rpm -ivh flash-player-npapi-26.0.0.131-release.x86_64.rpm
Open Firefox, access the following link address (login: sys password: abc123 check: As SYSDBA)
https:#Oracle:5500/em

2) sign in with Oracle user using command line login
su - oracle

#sys用户是oracle的最高管理员所以要加上as

sqlplus / as sysdba

"Ultra-detailed" Centos7 installation of Oracle 12c

Related Article

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.