2022
我们一起努力

VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办(vmware安装centos7报错)

VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办

VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办及vmware安装centos7报错

VMware workstation是一款常用的虚拟机软件,它可以在Windows、Linux和Mac OS X等平台上运行,提供了一个虚拟化环境,使用户可以在一台计算机上同时运行多个操作系统。然而,在安装Centos mini时,有时会遇到/etc/rc5.d/s99local报错的问题,这该怎么办呢?

首先,我们需要了解一下Centos mini是什么。Centos是一种基于Red Hat Enterprise Linux(RHEL)的开源操作系统,它被广泛应用于服务器领域。而Centos mini则是一个精简版的Centos,只包含最基本的软件包,适合用于构建轻量级的服务器。

当我们使用VMware workstation安装Centos mini时,可能会出现以下提示:

/etc/rc5.d/S99local: line 3: /etc/rc.d/init.d/local: No such file or directory

/etc/rc5.d/S99local: line 4: /etc/rc.d/init.d/functions: No such file or directory

这是因为Centos mini缺少一些必要的文件,导致在启动时无法找到这些文件。为了解决这个问题,我们需要手动创建这些文件,并将其放置到正确的位置上。

具体步骤如下:

1. 创建local文件

在终端中输入以下命令:

sudo nano /etc/rc.d/init.d/local

在打开的文件中,输入以下内容:

#!/bin/sh

#

# Local initialization script

#

touch /var/lock/subsys/local

保存并退出。

2. 创建functions文件

在终端中输入以下命令:

sudo nano /etc/rc.d/init.d/functions

在打开的文件中,输入以下内容:

#!/bin/bash

# /etc/rc.d/init.d/functions

# This file contains functions to be used by most or all shell scripts in the

# /etc/init.d directory.

# Check for interactive shell

if [ -z "$PS1" ]; then

return

fi

# Source function library.

. /etc/init.d/functions

保存并退出。

3. 设置权限

在终端中输入以下命令:

sudo chmod 755 /etc/rc.d/init.d/local

sudo chmod 755 /etc/rc.d/init.d/functions

4. 创建软链接

在终端中输入以下命令:

sudo ln -s /etc/rc.d/init.d/local /etc/rc5.d/S99local

完成以上步骤后,再次启动Centos mini,就不会再出现/etc/rc5.d/s99local报错的问题了。

除了在安装Centos mini时可能会遇到问题外,有时在安装Centos 7时也会出现类似的报错。例如,当我们使用VMware workstation安装Centos 7时,可能会出现以下提示:

The installation of VMware Tools 10.3.22 build-15902021 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want this program to invoke the command for you now? [yes]

Initializing...

Stopping VMware Tools services in the virtual machine:

Guest operating system daemon: [FAILED]

VMware User Agent (vmware-user): [ OK ]

Unable to start services for VMware Tools

这是因为安装VMware Tools时出现了错误,导致无法启动服务。为了解决这个问题,我们需要手动安装VMware Tools,并重新配置它。

具体步骤如下:

1. 安装VMware Tools

在VMware workstation中,选择“VM”菜单下的“Install VMware Tools”,然后将光盘映像挂载到虚拟机中。

在终端中输入以下命令:

mkdir /mnt/cdrom

mount /dev/cdrom /mnt/cdrom

tar xzf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/

进入解压后的目录,执行以下命令:

cd /tmp/vmware-tools-distrib

sudo ./vmware-install.pl

按照提示进行安装。

2. 配置VMware Tools

在终端中输入以下命令:

sudo /usr/bin/vmware-config-tools.pl

按照提示进行配置。

3. 启动VMware Tools服务

在终端中输入以下命令:

sudo systemctl start vmtoolsd.service

完成以上步骤后,再次启动Centos 7,就不会再出现Unable to start services for VMware Tools的问题了。

总之,无论是在安装Centos mini还是Centos 7时遇到问题,我们都可以通过手动创建文件、安装VMware Tools、重新配置等方法来解决。这些方法虽然有些繁琐,但可以帮助我们顺利地完成虚拟机的安装和配置。

赞(0)
文章名称:《VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办(vmware安装centos7报错)》
文章链接:https://www.fzvps.com/85463.html
本站文章来源于互联网,如有侵权,请联系管理删除,本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
图片版权归属各自创作者所有,图片水印出于防止被无耻之徒盗取劳动成果的目的。

评论 抢沙发

评论前必须登录!