Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 06-05-2024, 08:01 PM   #1
admin2
Administrator
 
Gia nhập: Oct 2021
Trả Lời: 22
Hướng dẫn cài đặt Oracle 12c trên Redhat 7 - CentOS 7
Hướng dẫn cài đặt Oracle 12c trên Redhat 7 - CentOS 7


B1: yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip

B2: Off selinux

vi /etc/sysconfig/selinx

Đổi:

SELINUX=disabled

B3: đặt tên máy

vi /etc/hostname

serverdb.local

B4: chỉnh file host:
vi /etc/hosts

127.0.0.1 serverdb.local

B5: Disable Fireall

systemctl disable firewalld

B6: Reboot

B7: tạo group và folder

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle

đặt password oracle

passwd oracle --> nhập pass oracle


mkdir -p /u01/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /u01
chmod -R 777 /u01


B8:

Gõ copy và paste từng dòng lệnh sau:

MEMTOTAL=$(free -b | sed -n '2p' | awk '{print $2}')
SHMMAX=$(expr $MEMTOTAL / 2)
SHMMNI=4096
PAGESIZE=$(getconf PAGE_SIZE)

Dòng này thì copy hết paste vào

----------------
cat >> /etc/sysctl.conf << EOF
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = $SHMMAX
kernel.shmall = $(expr \( $SHMMAX / $PAGESIZE \) \* \( $SHMMNI / 16 \))
kernel.shmmni = $SHMMNI
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
EOF
--------------------
Gõ:

sysctl -p


Thêm nội dung sau vào file:

vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768


SSH vào bằng user Oracle pass word là oracle


B9: sau khi enable đồ họa X11 trên SSH thì trên máy Windows bạn cài thêm Xming trên máy windows và mở Xming lên trước khi SSH vào bằn tài khoản Oracle để cài bằng tài khoản Oracle ---> Chọn SSH --> X11 --> Chọn forward check.


- vi /home/oracle/.bash_profile và đưa nội dung sau:

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=serverdb.local
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=orcl
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

- Tạo các thư mục sau để chứa oracle

mkdir -p /u01/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /u01
chmod -R 777 /u01


B10: trên máy Windows bạn download source Oracle DB về rồi dùng winscp đưa lên

http://dl.vietsens.vn:14080/index.ph...ZNrG4?path=%2F

Unzip 2 file:

Di chuyển thư mục database đã Unzip vào vào /home/oracle/

chmod 777 /home/oracle/*

cd /home/oracle/

Chạy file

./runinstall

Chọn: Create and Configure a Database
Chọn Server class
Chọn: Single instance database
Chọn Advanced install

- Ở bước này đặt pass cho các User odb, adminodb, sys... ---> đặt pass là: orcl


Next

Đến bước như hình thì SSH vào bằng user root chạy 2 lệnh như trong hình báo




Global Database name: orcl
System Database name: orcl
bỏ check
chọn kiểu DATA ở Unica o giua

Theo hướng dẫn Next...

Cách kiểm tra DB đã chạy: Check:

su - oracle
sqlplus / as sysdba
lsnrctl
lsnrctl status

https://www.techoism.com/wp-content/...-Install-7.png


==================================

https://chuyengiao.vietsens.vn/ords/...008660928,1901

Tham khảo:

https://www.techoism.com/install-ora...se-2-in-linux/

Chúc bạn thành công
admin2 vắng mặt   Trả lời ngay kèm theo trích dẫn này
Gửi trả lời



Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 05:57 AM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.