Oracle 12C Centos7.4桌面版本安裝
1.系統安裝: 安裝Centos7.4 桌面版本,注意,swap分割槽要是記憶體的2倍
2.系統安裝完成後
#安裝工具包
yum install -y vim wget net-tools unzip zip
#安裝依賴
yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.devel compat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686
#關閉selinux、防火牆
systemctl stop firewalld.service
systemctl disable firewalld.service
firewall-cmd --state
sed -i '/^SELINUX=.*/c SELINUX=disabled' /etc/selinux/config
sed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g' /etc/selinux/config
grep --color=auto '^SELINUX' /etc/selinux/config
setenforce 0
# 建立使用者和組
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle
echo "123456" | passwd --stdin oracle #oracle使用者的登入密碼,後續登入要用,記著。
#建立目錄
mkdir -p /u01/app/oracle/
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app
#修改系統引數
echo '
* soft nofile 655350
* hard nofile 655350
* soft nproc 655350
* hard nproc 655350
* soft stack 6553600
* hard stack 655360
* soft memlock unlimited
* hard memlock unlimited
* soft core unlimited
* hard core unlimited
'>>/etc/security/limits.conf
echo '
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536
# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
#表示當keepalive起用的時候,TCP傳送keepalive訊息的頻度。預設是2小時,改為20分鐘。
net.ipv4.ip_local_port_range = 1024 65000
##表示用於向外連線的埠範圍。預設情況下很小:32768到61000,改為1024到65000。
net.ipv4.tcp_max_syn_backlog = 8192
##表示SYN佇列的長度,預設為1024,加大佇列長度為8192,可以容納更多等待連線的網路連線數。
net.ipv4.tcp_max_tw_buckets = 5000
##表示系統同時保持TIME_WAIT套接字的最大數量,如果超過這個數字,TIME_WAIT套接字將立刻被清除並列印警告資訊。
vm.max_map_count=655360
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.ip_local_port_range = 9000 65500
'>/etc/sysctl.conf
新增系統變數
vi ~oracle/.bash_profile
export PATH
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH:HOME/bin
export EDITOR=/bin/vi
#上傳下載的安裝包
wget -P /u01/app/oracle
cd /orcl/app/oracle
#切換使用者
su oracle
cd /u01/app/oracle
unzip linuxx64_12201_database.zip
export
cd /u01/app/oracle/database
#重啟
reboot
oracle使用者登入系統執行安裝
cd /u01/app/oracle/database
./runInstaller
#出現上圖畫面時,新開一個命令列,切換到root使用者 執行2個指令碼
su root
sh /u01/app/oraInventory/orainstRoot.sh #回車
sh /u01/app/oracle/product/12.2.0/dbhome_1/root.sh #回車
#常用命令 # 增加檔案,擴充套件表空間 ALTER TABLESPACE USERS ADD DATAFILE '/u01/app/oracle/oradata/orcl/users03.dbf' size 200m autoextend on next 100m maxsize unlimited; #建立使用者和表空間,並授權 create tablespace fang datafile '/u01/app/oracle/oradata/fang.dbf' size 200m autoextend on next 100m maxsize unlimited; create user fang identified by 123456 default tablespace fang; grant connect,resource to fang; grant dba to fang; #遠端訪問命令 sqlplus fang/123456@172.16.2.170:1521/orcl sqlplus sys/password@192.168.0.1:1521/orcl as sysdba #修改資料庫自動增長空間 ALTER DATABASE DATAFILE 'c:SmartDB01.ora' AUTOEXTEND ON NEXT 2G 匯入資料 imp fang/123456@172.16.2.170:1521/orcl file=./fang_2020_11_09.dmp log=./imp_fang_new.log full=y ignore=y statistics=none exp fang/123456@172.16.2.170:1521/orcl file=./bj202011211.dmp full=y #檢視錶空間大小 select sum(bytes)/(1024*1024) as free_space,tablespace_name from dba_free_space group by tablespace_name; #查詢表空間剩餘大小 SELECT temp_used.tablespace_name, total - used as "Free", total as "Total", round(nvl(total - used, 0) * 100 / total, 3) "Free percent"FROM (SELECT tablespace_name, SUM(bytes_used) / 1024 / 1024 used FROM GV_$TEMP_SPACE_HEADER GROUP BY tablespace_name) temp_used, (SELECT tablespace_name, SUM(bytes) / 1024 / 1024 total FROM dba_temp_files GROUP BY tablespace_name) temp_total WHERE temp_used.tablespace_name = temp_total.tablespace_name ORDER BY B.TABLESPACE, B.SEGFILE#, B.SEGBLK#, B.BLOCKS; alter database tempfile '/u01/app/oracle/oradata/orcl/temp01.dbf' autoextend on next 500m maxsize unlimited; drop tablespace fang including contents and datafiles cascade constraint;–刪除表空間 #資料庫狀態 lsnrctl status dbca 安裝資料庫 netca 監聽器啟動安裝 netmgrselect * from dual; 檢視資料庫的併發連線數:select count(*) from v$session where status=‘ACTIVE’; 檢視當前資料庫建立的會話情況:select sid,serial#,username,program,machine,status from v$session; 查詢資料庫允許的最大連線數:select value from v$parameter where name = ‘processes’; 或者:show parameter processes; 修改資料庫允許的最大連線數: alter system set processes = 5000 scope = spfile; (需要重啟資料庫才能實現連線數的修改) 一、停止EXP/IMP最佳化速度 可以直接KILL 程式,但先要KILL 父程式,然後KILL子程式,只KILL子程式,EXP/IMP還會在後臺執行的 樣例:ps -ef |grep imp 查詢到pid,kill -9 pid 、kill -9 ppid,就可以了 一、停止EXP/IMP最佳化速度 可以直接KILL 程式,但先要KILL 父程式,然後KILL子程式,只KILL子程式,EXP/IMP還會在後臺執行的 樣例:ps -ef |grep imp 查詢到pid,kill -9 pid 、kill -9 ppid,就可以了 ps -ef |grep exp 重啟資料庫: shutdown immediate; startup;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31547066/viewspace-2900252/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12C安裝Oracle
- oracle 12c release 2 安裝Oracle
- oracle 12c 靜默安裝Oracle
- Centos 7.4 安裝Oracle 12cCentOSOracle
- Ubuntu下安裝oracle 12cUbuntuOracle
- 安裝centOS版本oracleCentOSOracle
- Oracle 12c資料庫安裝Oracle資料庫
- Oracle Linux 7上安裝Oracle 12cOracleLinux
- 在Oracle Linux 6.6上安裝Oracle 12cOracleLinux
- RedHat6.5 安裝Oracle 12c RACRedhatOracle
- Oracle 12c 安裝記錄(-)準備Oracle
- Oracle Enterprise Linux下安裝Oracle 12cOracleLinux
- 12c安裝
- CentOS7.4使用rpm包安裝mysql5.7.17CentOSMySql
- CentOS7.4安裝php配置php-fpm服務CentOSPHP
- Oracle 12c OEM Cloud Control AGENT 安裝OracleCloud
- Oracle 12c OEM Cloud Control OMS安裝OracleCloud
- Oracle 12C 單例項安裝文件( 官方文件)Oracle單例
- centos7.4原始碼安裝php,swoole,nginx,redis,mariadbCentOS原始碼PHPNginxRedis
- 12c em安裝
- aix不同版本安裝oracle的不同版本時的要求AIOracle
- ORACLE各個版本系統安裝需求Oracle
- Oracle 12c GI/RAC Step-by-Step安裝指南(一)Oracle
- Oracle 12c GI/RAC Step-by-Step安裝指南(二)Oracle
- Oracle 12c GI/RAC Step-by-Step安裝指南(三)Oracle
- Oracle 12c GI/RAC Step-by-Step安裝指南(四)Oracle
- Oracle 12c GI/RAC Step-by-Step安裝指南(五)Oracle
- Oracle 12c GI/RAC Step-by-Step安裝指南(六)Oracle
- RedHat 6 桌面安裝Redhat
- 破解RCU安裝對Oracle版本及其它限制Oracle
- redhat開源版本(如centos)oracle安裝事宜RedhatCentOSOracle
- windows7 可以安裝oracle 版本說明WindowsOracle
- Linux系統oracle 12c VMware Tools 的安裝教程LinuxOracle
- Oracle 12C 單例項資料庫靜默安裝Oracle單例資料庫
- Linux-6-64下安裝Oracle 12C筆記LinuxOracle筆記
- Centos7.4安裝kvm虛擬機器(使用virt-manager管理)CentOS虛擬機
- ORACLE---Aix7.1 安裝Oracle11.2.0.4版本資料庫OracleAI資料庫
- oracle安裝:OUI安裝Oracle(圖形介面安裝)OracleUI