Oracle Linux 8 : How to Restart Network Services (文档 ID 2579497.1)

本文介绍在Oracle Linux 8中如何重启网络服务。由于传统网络服务脚本已不再适用,提供了两种方法:一是使用NetworkManager服务,通过systemctl restart NetworkManager命令;二是利用nmcli工具,在GUI或控制台下运行#nmclinetworkingoff和#nmclinetworkingon命令,或在SSH会话中使用#nmclinetworkingoff;nmclinetworkingon。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Oracle Linux 8 : How to Restart Network Services (文档 ID 2579497.1)

APPLIES TO:

Linux OS - Version Oracle Linux 8.0 and later
Linux x86-64

GOAL

In Oracle Linux 8 the network services scripts are not presented anymore(systemctl start network.service or /etc/init.d/network script)

In order to restart the network services follow one of these two options.

SOLUTION

  • Using Network Manager

# systemctl restart NetworkManager

  • Using nmcli Tool

Note: Run these commands from the GUI or the console, as the network will disable.

====>>>务必注意:如下命令有使用的前提条件:那就是在机器旁边,

#nmcli networking off
#nmcli networking on

In case it is needed to run from the terminal from an ssh session, can be run it like this:

#nmcli networking off; nmcli networking on

====>>>务必注意:通过ssh远程连入服务器时,务必使用如上命令。

Note: It is recommendable to have accesses to the GUI or console in case the network doesn't come up.

### Linux Web Server Port Already In Use and Kill Command Not Working When encountering a situation where the web server cannot start because port 10023 is occupied by another process, and using `kill -9` does not terminate this process effectively, several strategies can help resolve the issue. A common misconception might lead one to believe that simply killing the offending process would free up the port immediately; however, sometimes processes do not respond as expected or may restart automatically depending on how they are managed within the system. Instead of relying solely on forceful termination methods like `kill -9`, consider these alternatives: #### Verify Process Ownership Firstly, identify which application owns the problematic port with greater precision than just finding its PID (Process ID). This approach ensures no critical services are inadvertently disrupted when attempting resolution actions. ```bash sudo lsof -i :10023 ``` This command lists all connections associated with port 10023 along with detailed information about each connection including owner details[^1]. #### Adjust Kernel Parameters Temporarily If binding issues arise due to kernel restrictions such as those mentioned regarding non-local IP bindings, adjusting relevant parameters temporarily could provide relief without modifying core configurations permanently: ```bash echo "1" | sudo tee /proc/sys/net/ipv4/ip_nonlocal_bind ``` Note that changing certain settings requires administrative privileges and should only occur after careful consideration since it affects network behavior globally across the entire machine. #### Restart Network Services Gracefully Instead of forcefully terminating specific PIDs via `kill -9`, restarting networking components gracefully often resolves lingering socket states more reliably while minimizing potential side effects: ```bash sudo systemctl restart network-manager.service # Or for older systems using init.d scripts instead of systemd units sudo service network-manager restart ``` For cases involving database listeners specifically bound to particular ports similar to what was described concerning Oracle instances listening on custom ports outside default ranges[^2]: - Ensure proper configuration files reflect intended operational modes post-restart. - Validate firewall rules permit necessary traffic patterns through specified endpoints before assuming connectivity problems stem from local resource conflicts alone. By following above suggestions rather than exclusively focusing on brute-force approaches towards managing stuck resources, smoother resolutions become attainable even under challenging circumstances encountered during troubleshooting sessions related to web servers operating inside Linux environments.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值