Centos610快照克隆后网络配置

VMware中安装的Centos610快照并克隆后网络配置

1.网卡配置

 vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=00:0c:29:29:35:32
TYPE=Ethernet
#UUID=1b7a2a9f-e1b1-401f-aa16-e3761f8b74f6
ONBOOT=yes
NM_CONTROLLED=no
#BOOTPROTO=dhcp
BOOTPROTO=static

IPADDR=192.168.125.150
NETMASK=255.255.255.0
GATEWAY=192.168.125.2
DNS1=192.168.125.2

2.重启服务

service network restart

3.删除网卡信息

rm -rf  /etc/udev/rules.d/70-persistent-net.rules

4.重命名系统

vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=centos610-nodesk-oracle-main
# oracle-rdbms-server-11gR2-preinstall : Add NOZEROCONF=yes

5.重启系统

 reboot

 ifconfig 查看网路新,如果提示Device eth0 does not seem to be present,delaying initialization

 则vi /etc/udev/rules.d/70-persistent-net.rules ,把网卡名不等于 eth0以及多个等于eth0的网卡删掉保留一个,再次重启

此时Ok

6.oracle配置更新

监听修改

[oracle@centos610-nodesk-oracle-main ~]$ cat /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.125.150)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /home/oracle/app/oracle

外部连接监听IP配置

show parameter local_listener
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.125.150)(PORT=1521)(SID=ORCL))';
alter system register;

重启监听

LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.125.150)(PORT=1521)))
The command completed successfully
LSNRCTL> start
Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/centos610-nodesk-oracle-main/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.125.150)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.125.150)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                24-OCT-2019 01:07:53
Uptime                    0 days 0 hr. 0 min. 55 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/centos610-nodesk-oracle-main/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.125.150)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

监听状态

LSNRCTL> [oracle@centos610-nodesk-oracle-main ~]$ clear
[oracle@centos610-nodesk-oracle-main ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 24-OCT-2019 01:10:24

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.125.150)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                24-OCT-2019 01:07:53
Uptime                    0 days 0 hr. 2 min. 55 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/centos610-nodesk-oracle-main/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.125.150)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ORCL" has 2 instance(s).
  Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

7.重启

reboot

猜你喜欢

转载自www.cnblogs.com/oumi/p/11729986.html