启动rpcbind和nfs服务
时间: 2023-07-10 09:13:39 浏览: 87
启动rpcbind服务的命令是:
```
sudo systemctl start rpcbind
```
启动nfs服务的命令是:
```
sudo systemctl start nfs-server
```
如果你的操作系统不是基于systemd的,则可以使用以下命令启动服务:
```
sudo service rpcbind start
sudo service nfs-server start
```
相关问题
linux如何设置rpcbind先于nfs启动
你可以通过修改/etc/systemd/system/nfs-server.service.d/rpcbind.conf文件来实现rpcbind优先于nfs启动。具体步骤如下:
1. 打开终端并用管理员权限打开rpcbind.conf文件:
sudo nano /etc/systemd/system/nfs-server.service.d/rpcbind.conf
2. 在该文件中添加以下内容:
[Unit]
Wants=rpcbind.socket
After=rpcbind.socket
3. 保存并关闭文件,然后重新加载systemctl配置:
sudo systemctl daemon-reload
4. 重新启动nfs-server服务:
sudo systemctl restart nfs-server.service
现在rpcbind将在nfs之前启动,从而确保nfs服务可以访问rpc绑定端口。
安装nfs-utils rpcbind软件包并启动该服务指令
安装nfs-utils和rpcbind软件包的指令可以根据不同的Linux发行版来进行安装,以下是常见的几种发行版的指令:
- Ubuntu/Debian:
```
sudo apt-get update
sudo apt-get install nfs-common nfs-kernel-server rpcbind
```
- CentOS/RHEL:
```
sudo yum install nfs-utils rpcbind
sudo systemctl enable rpcbind.service
sudo systemctl start rpcbind.service
sudo systemctl enable nfs-server.service
sudo systemctl start nfs-server.service
```
启动nfs-utils和rpcbind服务的指令如下:
- Ubuntu/Debian:
```
sudo systemctl start nfs-common.service
sudo systemctl start rpcbind.service
```
- CentOS/RHEL:
```
sudo systemctl start nfs-utils.service
sudo systemctl start rpcbind.service
```
请注意,以上指令需要在管理员权限下执行。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)