#一台虚拟机
hostname:myhost
ip:ip_address
[root@myhost ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@myhost ~]# firewall-cmd --state #查看防火墙的状态
running
[root@myhost ~]# firewall-cmd --list-ports #查看防火墙已经开放的端口
5666/tcp 10050/tcp
[root@myhost ~]# firewall-cmd --list-services #查看防火墙开放的服务
dhcpv6-client ssh
#假设设置oracle的服务端口为1521,允许1521/tcp端口访问
[root@myhost ~]# firewall-cmd --zone=public --permanent --add-port=1521/tcp
success
[root@myhost ~]# firewall-cmd --reload #重新加载防火墙配置
success
[root@myhost ~]# setenforce 0 && getenforce
Permissive
[root@myhost ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/sysconfig/selinux
[root@myhost ~]# cat /etc/sysconfig/selinux
/home/oracle/app
/home/oracle/app/tools #oracle数据库安装包存放目录
/home/oracle/app/oracle #oracle数据库安装目录
/home/oracle/app/oraInventory #oracle数据库配置文件目录
/home/oracle/app/oracle/product
[root@myhost ~]# yum install epel* -y
[root@myhost ~]# yum install -y gcc* gcc-* gcc-c++-* glibc-devel-* glibc-headers-* compat-libstdc* libstdc* elfutils-libelf-devel* libaio-devel* sysstat* unixODBC-* pdksh-* ksh* binutils
[root@myhost ~]# rpm -qa |grep oracle
#创建用户组oinstall
[root@myhost ~]# groupadd oinstall
#创建用户组dba
[root@myhost ~]# groupadd dba
#创建oracle用户,并加入到oinstall和dba用户组
[root@myhost ~]# useradd -g oinstall -G dba oracle
#查看oracle用户所属主
[root@myhost ~]# groups oracle
oracle : oinstall dba
#设置用户oracle的登陆密码,如果不设置密码,后面CentOS的图形登陆界面没法登陆。
[root@myhost ~]# passwd oracle
更改用户 oracle 的密码 。
新的 密码:
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
[root@myhost ~]# id oracle
uid=1001(oracle) gid=1001(oinstall) 组=1001(oinstall),1002(dba)
链接:为啥要创建oinstall用户组及dba组
理论上oracle单实例需要3种用户组,实际只建两个oinstall和dba,后面再安装oracle数据库的时候把osoper组也设置是dba组。
oinstall 组的成员被视为 Oracle 软件的“所有者”,拥有对 Oracle 中央清单 (oraInventory) 的写入权限。在一个 Linux 系统上首次安装 Oracle 软件时,oui 会创建 /etc/oraInst.loc 文件。该文件指定 Oracle 清单组的名称(默认为 oinstall)以及 Oracle 中央清单目录的路径。
osdba 组的成员可通过操作系统身份验证使用 SQL 以 sysdba身份连接到一个 Oracle 实例。该组的成员可执行关键的数据库管理任务,如创建数据库、启动和关闭实例。该组的默认名称为dba。sysdba 系统权限甚至在数据库未打开时也允许访问数据库实例。对此权限的控制完全超出了数据库本身的范围。不要混淆 sysdba系统权限与数据库角色 DBA。DBA 角色不包括 sysdba或 sysoper系统权限。
osoper 组的成员可通过操作系统身份验证使用 SQL 以 sysoper身份连接到一个 Oracle 实例。这个可选组的成员拥有一组有限的数据库管理权限,如管理和运行备份。该组的默认名称为oper。 sysoper系统权限甚至在数据库未打开时也允许访问数据库实例。对此权限的控制完全超出了数据库本身的范围。要使用该组,选择 Advanced 安装类型来安装 Oracle 数据库软件。
根据自己的情况来定,注意磁盘空间即可,这里我直接把其放到oracle用户家目录下
[root@myhost local]# mkdir /home/oracle/app
[root@myhost local]# mkdir /home/oracle/app/tools
[root@myhost local]# mkdir /home/oracle/app/oracle
[root@myhost local]# mkdir /home/oracle/app/oraInventory
[root@myhost local]# mkdir /home/oracle/app/oracle/product
[root@myhost local]# chown -R oracle:oinstall /home/oracle/app
[root@myhost local]# ll /home/oracle/app
总用量 0
drwxr-xr-x 3 oracle oinstall 20 5月 12 17:40 oracle
drwxr-xr-x 2 oracle oinstall 6 5月 12 17:40 oraInventory
drwxr-xr-x 2 oracle oinstall 6 5月 12 17:40 tools
链接:为啥要修改操作系统的系统标识文件 /etc/redhat-release
因为Oracle默认不支持CentOS系统安装
[root@myhost ~]# cat /proc/version
Linux version 3.10.0-1127.19.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Aug 25 17:23:54 UTC 2020
[root@myhost ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@myhost ~]# vi /etc/redhat-release
[root@myhost ~]# cat /etc/redhat-release
#CentOS Linux release 7.2.1511 (Core)
redhat-7
[root@myhost ~]# vi /etc/security/limits.conf
[root@myhost ~]# tail -5 /etc/security/limits.conf
#End of file
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@myhost ~]# vi /etc/pam.d/login
[root@myhost ~]# tail -2 /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
[root@myhost ~]# vi /etc/sysctl.conf
[root@myhost ~]# tail -11 /etc/sysctl.conf
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
#使配置生效
[root@myhost ~]# sysctl -p
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@myhost ~]# vi /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@myhost ~]# source /etc/profile
将本机IP地址和主机名映射起来
[root@myhost ~]# hostname
myhost
[root@myhost ~]# ifconfig
eth0: flags=4163 mtu 1500
inet 10.199.41.21 netmask 255.255.255.0 broadcast 10.199.41.255
inet6 fe80::215:5dff:fe2c:6e04 prefixlen 64 scopeid 0x20
ether 00:15:5d:2c:6e:04 txqueuelen 1000 (Ethernet)
RX packets 20209986 bytes 1860837415 (1.7 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29198 bytes 2430041 (2.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 5636 bytes 308232 (301.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5636 bytes 308232 (301.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@myhost ~]# hostname
myhost
[root@myhost ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.199.41.21 myhost
[root@myhost ~]# yum -y groups install "GNOME Desktop"
#启动图形界面
[root@myhost ~]# startx &
[root@myhost ~]# yum --enablerepo=epel -y install xrdp
[root@myhost ~]# rpm -qa |grep xrdp
xrdp-0.9.19-1.el7.x86_64
[root@myhost~]# systemctl start xrdp
[root@myhost ~]# systemctl enable xrdp
Created symlink from /etc/systemd/system/multi-user.target.wants/xrdp.service to /usr/lib/systemd/system/xrdp.service.
[root@myhost ~]# systemctl status xrdp
● xrdp.service - xrdp daemon
Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled; vendor preset: disabled)
Active: active (running) since 三 2022-05-11 15:28:55 CST; 16s ago
Docs: man:xrdp(8)
man:xrdp.ini(5)
Main PID: 108615 (xrdp)
CGroup: /system.slice/xrdp.service
└─108615 /usr/sbin/xrdp --nodaemon
5月 11 15:28:55 myhost systemd[1]: Started xrdp daemon.
5月 11 15:28:55 myhost xrdp[108615]: [INFO ] starting xrdp with pid 108615
5月 11 15:28:55 myhost xrdp[108615]: [INFO ] address [0.0.0.0] port [3389] mode 1
5月 11 15:28:55 myhost xrdp[108615]: [INFO ] listening to port 3389 on 0.0.0.0
5月 11 15:28:55 myhost xrdp[108615]: [INFO ] xrdp_listen_pp done
[root@myhost ~]#
[root@myhost ~]# firewall-cmd --permanent --zone=public --add-port=3389/tcp
success
[root@myhost ~]# firewall-cmd --reload
success
打开Windows的远程mstsc工具输入linux服务器IP用root账号登录
1)Win系统按下“Win+R”键,在弹出的“运行”框中输入“mstsc“命令,
2)按“确定”,打开Windows远程连接,输入linux服务器IP地址开始远程连接,
3)在弹出的xrdp用户验证窗口中输入linux服务器的用户名和密码登录即可。
[root@myhost ~]# whoami
root
[root@myhost ~]# su - oracle
[oracle@myhost ~]$ whoami
oracle
[oracle@myhost ~]$ pwd
/home/oracle
[oracle@myhost ~]$ ll
总用量 0
drwxr-xr-x 4 oracle oinstall 33 5月 11 14:46 app
[oracle@myhost ~]$ vi /home/oracle/.bash_profile
[oracle@myhost ~]$ tail -8 /home/oracle/.bash_profile
export ORACLE_BASE=/home/oracle/app/oracle #oracle数据库安装目录
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 #oracle数据库路径
export ORACLE_SID=orcl #oracle启动数据库实例名
export ORACLE_TERM=xterm #xterm窗口模式安装
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin #添加系统环境变量
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib #添加系统环境变量
#export LC_ALL=en_US #防止安装过程出现乱码
#export LANG=en_US #防止安装过程出现乱码
export LC_ALL=C #防止安装过程出现乱码
export LANG=C #防止安装过程出现乱码
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK #设置Oracle客户端字符集
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
#使配置文件生效
[oracle@myhost ~]$ source /home/oracle/.bash_profile
[适用于 Linux x86-64 的Oracle Database 11g 第2版|中国]
[root@myhost app]# su - oracle
上一次登录:三 5月 11 16:50:14 CST 2022pts/5 上
[oracle@myhost ~]$ ll
total 0
drwxr-xr-x 5 oracle oinstall 45 May 11 16:56 app
[oracle@myhost ~]$ cd app/
[oracle@myhost app]$ ll
total 0
drwxr-xr-x 3 oracle oinstall 20 May 11 14:46 oracle
drwxrwx--- 5 oracle oinstall 137 5月 11 18:03 oraInventory
drwxr-xr-x 2 oracle oinstall 86 May 11 16:49 tools
[oracle@myhost app]$ cd tools/
[oracle@myhost tools]$ rz -y
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring linux.x64_11gR2_database_2of2.zip...
100% 1085367 KB 7980 KB/sec 00:02:16 0 Errors
[oracle@myhost tools]$ rz -y
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring linux.x64_11gR2_database_1of2.zip...
100% 1210223 KB 10256 KB/sec 00:01:58 0 Errors
[oracle@myhost tools]$ ll
total 2295592
-rw-r--r-- 1 oracle oinstall 1239269270 May 11 16:45 linux.x64_11gR2_database_1of2.zip
-rw-r--r-- 1 oracle oinstall 1111416131 May 11 16:31 linux.x64_11gR2_database_2of2.zip
[oracle@myhost tools]$ unzip linux.x64_11gR2_database_1of2.zip
[oracle@myhost tools]$ unzip linux.x64_11gR2_database_2of2.zip
##两个安装包都是默认解压到安装包所在目录的database下面##
[oracle@myhost tools]$ ll
total 2295592
drwxr-xr-x 8 oracle dba 120 Aug 21 2009 database
-rw-r--r-- 1 oracle oinstall 1239269270 May 11 16:45 linux.x64_11gR2_database_1of2.zip
-rw-r--r-- 1 oracle oinstall 1111416131 May 11 16:31 linux.x64_11gR2_database_2of2.zip
[oracle@myhost database]$ pwd
/home/oracle/app/tools/database
[oracle@myhost database]$ ll
total 24
drwxr-xr-x 12 oracle dba 4096 Aug 17 2009 doc
drwxr-xr-x 4 oracle dba 4096 Aug 15 2009 install
drwxrwxr-x 2 oracle dba 58 Aug 15 2009 response
drwxr-xr-x 2 oracle dba 33 Aug 15 2009 rpm
-rwxr-xr-x 1 oracle dba 3226 Aug 15 2009 runInstaller ##安装脚本#
drwxrwxr-x 2 oracle dba 28 Aug 15 2009 sshsetup
drwxr-xr-x 14 oracle dba 4096 Aug 15 2009 stage
-rw-r--r-- 1 oracle dba 5402 Aug 18 2009 welcome.html
[oracle@myhost ~]$ whoami
oracle
[oracle@myhost ~]$ pwd
/home/oracle
[oracle@myhost ~]$ ll
total 0
drwxr-xr-x 5 oracle oinstall 50 May 12 17:40 app
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Desktop
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Documents
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Downloads
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Music
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Pictures
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Public
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Templates
drwx------ 1 oracle oinstall 0 May 12 18:52 thinclient_drives
drwxr-xr-x 2 oracle oinstall 6 May 12 18:56 Videos
[oracle@myhost ~]$ cd app/
[oracle@myhost app]$ ll
total 0
drwxr-xr-x 3 oracle oinstall 20 May 12 17:40 oracle
drwxr-xr-x 2 oracle oinstall 6 May 12 17:40 oraInventory
drwxr-xr-x 3 oracle oinstall 101 May 12 18:05 tools
[oracle@myhost app]$ cd tools/database/
[oracle@myhost database]$ ll
total 24
drwxr-xr-x 12 oracle oinstall 4096 Aug 17 2009 doc
drwxr-xr-x 4 oracle oinstall 4096 Aug 15 2009 install
drwxrwxr-x 2 oracle oinstall 58 Aug 15 2009 response
drwxr-xr-x 2 oracle oinstall 33 Aug 15 2009 rpm
-rwxr-xr-x 1 oracle oinstall 3226 Aug 15 2009 runInstaller
drwxrwxr-x 2 oracle oinstall 28 Aug 15 2009 sshsetup
drwxr-xr-x 14 oracle oinstall 4096 Aug 15 2009 stage
-rw-r--r-- 1 oracle oinstall 5402 Aug 18 2009 welcome.html
##执行oracle安装脚本##
[oracle@cfz-66 database]$ sh ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 40463 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3967 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 4294967296 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2022-05-12_06-59-18PM. Ple[[o[or[ora[orac[o[ora[[or[or[o[[ora[[[or[[[[[oracle@cfz-66 database]$
安全选项,选择创建和配置一个数据库(安装完数据库管理软件后,系统会自动创建一个数据库实例)。
建议只需要将Oracle目录更新下,目录路径不要含有中文或其它的特殊字符。全局数据库名可以默认,但口令密码,必须要牢记。密码输入时,有提示警告,不符合Oracel建议时不用管。 (因Oracel建议的密码规则比较麻烦, 必须是大写字母加小写字母加数字,而且必须是8位以上。麻烦,可以输入平常自己习惯的短小密码即可,但是这里我不按照标准设置,点击下一步不成功)
安装程序主要检查软硬件系统是否满足oracle数据库安装,即安装此Oracle版本的最低要求。
有些系统报错是因为现有的包的版本比检测要高,最后右上角忽略即可。
安装前的一些相关选择配置信息。 可以保存成文件或不保存文件直接点完成即可,然后开始进行安装。
oracle数据库管理软件文件及dbms文件安装完后,会自动创建安装一个实例数据库,数据库的名称默认是前面设置的orcl。
实例数据库创建完成之后,系统默认把所有账户都锁定不可用(除sys和system账户可用外),建议点右边的口令管理,将常用的scott账户解锁并为其设置密码。
oracle数据库安装完成之后,通过netca打开监听配置页面,通过执行dbca命令,启动oracle实例安装界面,一个Oracle服务可以对应多个实例,一个Oracle数据库对应多个表空间和用户名,每个用户名又可管理表空间。
[oracle@myhost etc]$ whoami
oracle
[oracle@myhost ~]$ cd /home/oracle/app/etc/
[oracle@myhost etc]$ ll
total 16
-rw-r--r-- 1 oracle oinstall 15704 May 12 19:40 db.rsp
[oracle@myhost etc]$ vi netca.rsp
[oracle@myhost etc]$ cat netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="11.2"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
[oracle@myhost etc]$ which netca
~/app/oracle/product/11.2.0/bin/netca
[oracle@myhost etc]$ /home/oracle/app/oracle/product/11.2.0/bin/netca /silent /responsefile /home/oracle/app/etc/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /home/oracle/app/etc/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Listener "LISTENER" already exists.
Oracle Net Services configuration successful. The exit code is 0
[oracle@myhost ~]$ netstat -tnulp | grep 1521
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::1521 :::* LISTEN 4908/tnslsnr
提示:TOTALMEMORY 设置为总内存的80%。
[oracle@myhost ~]$ free -m
total used free shared buff/cache available
Mem: 3770 207 1369 7 2193 3314
Swap: 3967 2 3965
## 3770*0.8=3016
[oracle@myhost ~]$ vi /home/oracle/app/etc/dbca.rsp
## 修改以下变量的值:
GDBNAME = "orcl"
SID = "orcl"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
SYSMANPASSWORD = "oracle"
DBSNMPPASSWORD = "oracle"
DATAFILEDESTINATION =/home/oracle/app/oraInventory
RECOVERYAREADESTINATION=/home/oracle/app/oracle/fast_recovery_area
CHARACTERSET = "AL32UTF8"
TOTALMEMORY = "3016"
修改后文件内容:
[oracle@myhost ~]$ cat /home/oracle/app/etc/dbca.rsp
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "orcl"
SID = "orcl"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
SYSMANPASSWORD = "oracle"
DBSNMPPASSWORD = "oracle"
DATAFILEDESTINATION =/home/oracle/app/oraInventory
RECOVERYAREADESTINATION=/home/oracle/app/oracle/fast_recovery_area
CHARACTERSET = "AL32UTF8"
TOTALMEMORY = "3016"
TEMPLATENAME = "General_Purpose.dbc"
[createTemplateFromDB]
SOURCEDB = "myhost:1521:orcl"
SYSDBAUSERNAME = "system"
TEMPLATENAME = "My Copy TEMPLATE"
[createCloneTemplate]
SOURCEDB = "orcl"
TEMPLATENAME = "My Clone TEMPLATE"
[DELETEDATABASE]
SOURCEDB = "orcl"
[generateScripts]
TEMPLATENAME = "New Database"
GDBNAME = "orcl11.us.oracle.com"
[CONFIGUREDATABASE]
[ADDINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
NODELIST=
SYSDBAUSERNAME = "sys"
[DELETEINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
INSTANCENAME = "orcl11g"
SYSDBAUSERNAME = "sys"
[oracle@myhost ~]$ whoami
oracle
[oracle@myhost ~]$ which dbca
~/app/oracle/product/11.2.0/bin/dbca
[oracle@myhost ~]$ pwd
/home/oracle
[oracle@myhost ~]$ /home/oracle/app/oracle/product/11.2.0/bin/dbca -silent -responseFile /home/oracle/app/etc/dbca.rsp
Copying database files
1% complete
2% complete
4% complete
11% complete
19% complete
26% complete
37% complete
Creating and starting Oracle instance
100% complete
Look at the log file "/home/oracle/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
[oracle@myhost ~]$ ps -ef | grep ora_ | grep -v grep
oracle 5376 1 0 16:23 ? 00:00:00 ora_pmon_orcl
oracle 5378 1 0 16:23 ? 00:00:00 ora_vktm_orcl
oracle 5382 1 0 16:23 ? 00:00:00 ora_gen0_orcl
oracle 5384 1 0 16:23 ? 00:00:00 ora_diag_orcl
oracle 5386 1 0 16:23 ? 00:00:00 ora_dbrm_orcl
oracle 5388 1 0 16:23 ? 00:00:00 ora_psp0_orcl
oracle 5390 1 0 16:23 ? 00:00:00 ora_dia0_orcl
oracle 5392 1 0 16:23 ? 00:00:00 ora_mman_orcl
oracle 5394 1 0 16:23 ? 00:00:00 ora_dbw0_orcl
oracle 5396 1 0 16:23 ? 00:00:00 ora_lgwr_orcl
oracle 5398 1 0 16:23 ? 00:00:00 ora_ckpt_orcl
oracle 5400 1 0 16:23 ? 00:00:00 ora_smon_orcl
oracle 5402 1 0 16:23 ? 00:00:00 ora_reco_orcl
oracle 5404 1 0 16:23 ? 00:00:00 ora_mmon_orcl
oracle 5406 1 0 16:23 ? 00:00:00 ora_mmnl_orcl
oracle 5408 1 0 16:23 ? 00:00:00 ora_d000_orcl
oracle 5410 1 0 16:23 ? 00:00:00 ora_s000_orcl
oracle 5420 1 0 16:23 ? 00:00:00 ora_qmnc_orcl
oracle 5435 1 0 16:23 ? 00:00:00 ora_cjq0_orcl
oracle 5437 1 0 16:24 ? 00:00:00 ora_q000_orcl
oracle 5439 1 0 16:24 ? 00:00:00 ora_q001_orcl
[oracle@myhost ~]$ whoami
oracle
[oracle@myhost ~]$ which lsnrctl
~/app/oracle/product/11.2.0/bin/lsnrctl
[oracle@myhost ~]$ pwd
/home/oracle
[oracle@myhost ~]$ /home/oracle/app/oracle/product/11.2.0/bin/lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-MAY-2022 20:23:09
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-MAY-2022 19:47:50
Uptime 0 days 0 hr. 35 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/cfz-66/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully
参考之前的文章: 如何在Linux上安装Oracle客户端连接工具sqlplus