링크 ux (centos) 침묵 (명령 행, 그래 픽 인터페이스 없 음) Oacle11g R2 설치

① 시스템 요구 및 설치 준비
1. Oracle 설치 패키지 다운로드 (홈 페이지 다운로드)
 https://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/index.html
2. 물리 적 메모리 1G 이하
grep MemTotal /proc/meminfo
3. 사용 가능 한 하 드 디스크 는 8G 이하 가 아 닙 니 다.
df
4. Swap 파 티 션 공간 이 2G 보다 작 지 않 음
grep SwapTotal /proc/meminfo
5. 방화벽 닫 기
systemctl status firewalld.service      #방화벽 상태 보기
systemctl stop firewalld.service         #방화벽 닫 기
systemctl disable firewalld.service    #firewalld 방화벽 사용 금지
6. CentOS 시스템 표지 수정 (Oracle 은 기본적으로 Centos 를 지원 하지 않 기 때문에)
파일 수정: vi   /etc/redhat-release
파일 내용 바 꾸 기: redhat - 7
7. 커 널 파라미터 수정
파일 수정: vi / etc / sysctl. conf
다음 내용 추가:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
kernel.shmall = 2097152
kernel.shmmax = 2147483648
net.ipv4.ip_local_port_range = 9000 65500
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
net.core.rmem_default = 262144
net.core.rmem_max= 4194304
net.core.wmem_default= 262144
net.core.wmem_max= 1048576

수정 후 새 설정 사용 하기
sysctl -p
8. 필수 패키지 설치
yum -y install binutils* compat-libcap1* compat-libstdc++* gcc* gcc-c++* glibc* glibc-devel* ksh* libaio* libaio-devel* libgcc* libstdc++* libstdc++-devel* libXi* libXtst* make* sysstat* elfutils* unixODBC* unzip lrzsz

9. 사용자 및 그룹 만 들 기
groupadd oinstall                                       #설치 Oacle 프로그램 사용자 그룹 만 들 기
groupadd dba                                            #DBA 사용자 그룹 만 들 기
useradd -g dba -m oracle                          #사용자 Oacle 을 만 들 고 dba 그룹 에 가입 합 니 다.
usermod -a -G oinstall oracle                    #사용자 Oacle 을 oinstall 그룹 에 추가 합 니 다.
passwd oracle                                           #사용자 oracle 비밀번호 수정
10. 설치 디 렉 터 리 만 들 기
mkdir -p /data/oracle                                     #Oacle 홈 디 렉 터 리 만 들 기
mkdir -p /data/inventory                                #Oacle 설정 디 렉 터 리 만 들 기
mkdir -p /data/src                                          #Oacle 압축 패키지 압축 해제 디 렉 터 리 만 들 기
chown -R oracle:oinstall /data/oracle            #디 렉 터 리 권한 수정
chown -R oracle:oinstall /data/inventory
chown -R oracle:oinstall /data/src
11. Oacle 사용자 의 보안 성능 설정 수정
파일 수정: vi / etc / security / limits. conf
파일 마지막 줄 에 다음 내용 을 추가 합 니 다.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

12. 사용자 환경 변수 수정
파일 수정: vim / home / oracle /. bashrc
다음 내용 추가
export PATH
export ORACLE_BASE=/data/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=orcl
export ORACLE_UNQNAME=orcl
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LANG=C
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

수정 후 바로 사용
source /home/oracle/.bashrc
13. 압축 풀기 zip 패키지 / data / src
unzip linux.x64_11gR2_database_1of2.zip -d /data/src/
unzip linux.x64_11gR2_database_2of2.zip -d /data/src/
chown -R oracle:oinstall /data/src/

14. selinux 닫 기
파일 수정: vi / etc / selinux / config
저장 후 기기 재 부팅
SELINUX=disabled      # ********    (           )******

재 부팅: 재 부팅
② Oracle 설치
Oracle 사용자 진입
su oracle
1. Oracle 메 인 프로그램 설치
데이터베이스 설치 파일 편집: vi / data / src / 데이터베이스 / response / dbinstall.rsp
oracle.install.option=INSTALL_DB_SWONLY                # 설치 유형 ORACLEHOSTNAME=oracle.server                                   # 호스트 이름 UNIXGROUP_NAME=oinstall                                                     # 설치 그룹 INVENTORYLOCATION=/data/inventory                                    # INVENTORY 디 렉 터 리 SELECTEDLANGUAGES=en,zh_CN                                         # 언어 선택 ORACLEHOME=/data/oracle/product/11.2.0/db_1                     # oracle_home ORACLE_BASE=/data/oracle                                                       # oracle_base oracle.install.db.InstallEdition=EE                                                 # oracle 버 전 oracle. install. db. DBAGROUP=dba                                             # dba 사용자 그룹 oracle. install. db. OPERGROUP=oinstall                                     # oper 사용자 그룹 oracle. install. db. config. starterdb. type = GENERALPURPOSE    # 데이터베이스 형식 oracle. install. db. config. starterdb. globalDBName = orcl                 # globalDBName oracle.install.db.config.starterdb.SID=orcl                                   # SID oracle.install.db.config.starterdb.characterSet=AL32UTF8         # 기본 데이터베이스 인 코딩 oracle. install. db. config. starterdb. memoryLimit = 800                    # 메모리 의 최소 메모리 (M) oracle. install. db. config. starterdb. password. ALL = oracle 자동 관리              # 모든 데이터베이스 사용자 가 같은 암 호 를 사용 하도록 설정 DECLINESECURITY_UPDATES=true                                      # 보안 업데이트 설정
Oracle 설치
/data/src/database/runInstaller -silent -responseFile /data/src/database/response/db_install.rsp -ignorePrereq

Checking swap space: 0 MB available, 150 MB required. Failed < < < <
1、   Swap       Swap     ,                  Swap   。      :
 swapon -s
            ,    Swap      。
2、          Swap     ,             ,                Swap 。      :
 df -hal
3、      Swap        dd       Swap   。       ,            。
 dd if=/dev/zero of=/swapfile bs=1024 count=512k
    :if=   :     ,       。      。< if=input file >of=   :     ,       。       。< of=output file >bs=bytes:      /       bytes   count=blocks:   blocks  ,     bs      。
4、       Swap           Swap   ,           。    :
mkswap /swapfile
   Swap ,    :
swapon /swapfile
      ,      :
swapon -s

          /data/src/database/runInstaller -silent -responseFile /data/src/database/response/db_install.rsp -ignorePrereq

설 치 를 기다 리 면 아래 인터페이스 가 나타 날 것 을 알 수 있 습 니 다.
 
       ,       :
    1.        
    2. "root"    
    3.    
      /data/inventory/orainstRoot.sh
      /data/oracle/product/11.2.0/db_1/root.sh
    4.       "Enter"   

Oracle 메 인 절 차 는 완성 되 었 습 니 다.
2. Oracle 감청 프로그램 설정
감청 프로필 편집: vi /data/src/database/response/netca.rsp
아래 매개 변수 수정
INSTALL_TYPE=""custom""                               #      
LISTENER_NUMBER=1                                     #      
LISTENER_NAMES={"LISTENER"}                           #         
LISTENER_PROTOCOLS={"TCP;1521"}                       #             
LISTENER_START=""LISTENER""                           #         

명령 을 집행 하 다
/data/oracle/product/11.2.0/db_1/bin/netca /silent /responseFile /data/src/database/response/netca.rsp

감청 실행 여부 확인
netstat -tnulp | grep 1521

감청 의 시작 과 닫 기
    :
/data/oracle/product/11.2.0/db_1/bin/lsnrctl start
    :
/data/oracle/product/11.2.0/db_1/bin/lsnrctl stop

3. 데이터베이스 인 스 턴 스 추가
데이터베이스 인 스 턴 스 파일 편집: vi /data/src/database/response/dbca.rsp
다음 매개 변수 수정
RESPONSEFILE_VERSION ="11.2.0"                              //     
OPERATION_TYPE ="createDatabase"                            //          
GDBNAME ="orcl"                                             //       
SID ="orcl"                                                 //     
TEMPLATENAME = "General_Purpose.dbc"                        //         
SYSPASSWORD = "oracle"                                      // SYS     
SYSTEMPASSWORD = "oracle"                                   // SYSTEM     
SYSMANPASSWORD= "oracle"
DBSNMPPASSWORD= "oracle"
DATAFILEDESTINATION =/data/oracle/oradata                   //         
RECOVERYAREADESTINATION=/data/oracle/flash_recovery_area    //         
CHARACTERSET ="AL32UTF8"                                    //    
NATIONALCHARACTERSET= "AL16UTF16"                           //    
TOTALMEMORY ="1638"                                         // 1638MB,    2G*80%。

명령 을 집행 하 다
/data/oracle/product/11.2.0/db_1/bin/dbca -silent -responseFile /data/src/database/response/dbca.rsp

인 스 턴 스 실행 여부 보기
ps -ef | grep ora_ | grep -v grep

시작 및 닫 기 인 스 턴 스 수정
파일 수정 /data/oracle/product/11.2.0/db_1/bin/dbstart    /data/oracle/product/11.2.0/db_1/bin/dbshut
 
ORACLE_HOME_LISTNER=$1
   
ORACLE_HOME_LISTNER=/data/oracle/product/11.2.0/db_1

파일 수정: / etc / oratab
 
orcl:/data/oracle/product/11.2.0:N
   
orcl:/data/oracle/product/11.2.0:Y

인 스 턴 스 시작 및 닫 기
    :
/data/oracle/product/11.2.0/db_1/bin/dbstart
    :
/data/oracle/product/11.2.0/db_1/bin/dbshut

③ 마무리
1. Oracle 시작
루트 사용자 에서 실행
chmod +x /etc/rc.d/rc.local
     /etc/rc.d/rc.local
           :

su oracle -lc "/data/oracle/product/11.2.0/db_1/bin/lsnrctl start"
su oracle -lc "/data/oracle/product/11.2.0/db_1/bin/dbstart"

좋은 웹페이지 즐겨찾기