cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
时间: 2024-01-13 15:20:22 浏览: 142
以下是将/usr/local/keepalived/etc/rc.d/init.d/keepalived复制到/etc/init.d/的命令:
```shell
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
```
这个命令将会把/usr/local/keepalived/etc/rc.d/init.d/keepalived文件复制到/etc/init.d/目录下。
相关问题
源码安装keepalived
回答: 源码安装keepalived的步骤如下:
1. 首先解压源码包:使用命令"tar -xvf keepalived-1.3.9.tar.gz"解压源码包。
2. 进入解压后的目录:使用命令"cd keepalived-1.3.9/"进入解压后的目录。
3. 进行配置:使用命令"./configure -prefix=/usr/local/keepalived-1.3.9"进行配置。
4. 编译:使用命令"make"进行编译。
5. 安装:使用命令"make install"进行安装。
6. 创建配置文件目录:使用命令"mkdir /etc/keepalived"创建配置文件目录。
7. 拷贝配置文件:使用命令"cp /usr/local/keepalived-1.3.9/etc/keepalived/keepalived.conf /etc/keepalived/"将配置文件拷贝到配置文件目录。
8. 将启动脚本放到/etc/init.d/目录下:使用命令"cp /usr/local/keepalived/keepalived/etc/init.d/keepalived /etc/rc.d/init.d/"将keepalived启动脚本放到/etc/init.d/目录下。[1][2][3]
阅读全文