기사 디렉토리
1. 설치 조건
시스템 및 구성 요구 사항
물리적 메모리, 1GB 이상
스왑 파티션
실제 메모리가 1-2GB 인 경우 실제 메모리의 1.5-2 배로 설정
하고 실제 메모리가 2-16GB 인 경우 실제 메모리 크기를
4G 이상으로 동일하게 설정합니다.
디스크 공간, xfs 파일 시스템 생성 및 15G 이상 마운트
고정 된 FQDN 이름이 있으므로 설치 후 변경하지 않는 것이 좋습니다.
소프트웨어 요구 사항
그놈 중국어 데스크탑 환경
중국어 JAva 지원
설치 필수 소프트웨어 패키지
2. 설치 환경
가상 머신 VMware
Centos 7.6 버전
커널 버전은 3.10.0-957.el7.x86_64
스왑입니다. 스왑 파티션은 16GB이고
새 디스크는 50GB
방화벽이며 코어 보호는 꺼져 있습니다.
yum웨어 하우스는 온라인 소스입니다.
셋, 설치 과정
3.1. 호스트 이름 Oracle을 변경하고 새 디스크를 마운트합니다.
[root@localhost ~]# hostnamectl set-hostname oracle
[root@localhost ~]# su
[root@oracle ~]# vim /etc/hosts
20.0.0.25 oracle
[root@oracle ~]# fdisk /dev/sdb
[root@oracle ~]# mkfs -t xfs /dev/sdb1
[root@oracle ~]# mkdir /orc/
[root@oracle ~]# vi /etc/fstab
/dev/sdb1 /orc xfs defaults 0 0 ##新增
[root@oracle ~]# mount -a
3.2. 소프트웨어 환경 패키지 설치
[root@oracle ~]# 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
3.3, 커널 매개 변수 조정
[root@oracle ~]# vim /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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 = 1048576
[root@oracle ~]# sysctl -p
3.4. 사용자 환경 설정
[root@oracle ~]# groupadd oinstall
[root@oracle ~]# groupadd dba
[root@oracle ~]# useradd -g oinstall -G dba oracle
[root@oracle ~]# passwd oracle #密码自设
[root@oracle ~]# mkdir -p /orc/app/oracle
[root@oracle ~]# chown -R oracle:oinstall /orc/app/
[root@oracle ~]# chmod -R 755 /orc/app/oracle/
[root@oracle ~]# vim /home/oracle/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
umask 022
ORACLE_BASE=/orc/app/oracle
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
3.5, Oracle 사용자 리소스 제한
pam_limits 인증 모듈 사용
[root@oracle ~]# vim /etc/pam.d/login
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required /lib/security/pam_limits.so 新增下面两行添加资源限制模块
session required pam_limits.so
...省略下面内容
[root@oracle ~]# 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
[root@oracle ~]# vim /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
[root@oracle ~]# source /etc/profile
3.6, 오라클 설치
[root@oracle ~]# mkdir /abc
[root@oracle ~]# cd /abc
이때 xshell을 사용하여 압축 해제를 위해 설치 패키지를 abc 디렉토리에 넣습니다.
[root@oracle abc]# unzip linuxx64_12201_database.zip
그래픽 인터페이스 작동
[root@oracle ~]# xhost +
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ cd abc
[oracle@oracle abc]$ export DISPLAY=:0.0
[oracle@oracle abc]$ cd database/
[oracle@oracle database]$ ./runInstaller
그래픽 설치 프로그램을 실행하면
Windows 샷 거래가 설치됩니다.
루트 사용자로 다음 두 명령을 입력하십시오.
[root@oracle ~]# /orc/app/oraInventory/orainstRoot.sh
[root@oracle ~]# /orc/app/oracle/product/12.2.0/dbhome_1/root.sh
스크립트가로드 될 때까지 기다린 다음 계속해서 설치를 선택해야
설치가 완료됩니다.
3.7, Oracle 데이터베이스 테스트
[oracle@oracle database]$ sqlplus / as sysdba
连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> ## 已连接
SQL> show user ## 查看下当前用户
USER 为 "SYS"