1
我创建了新的vagrant框,使用我安装的CentOS 6.5的virtualbox映像。内部一切看起来不错,但从外部我不能访问80端口。“systemctl:命令未找到”与新鲜的CentOS 6.5安装vagrant的
当我编辑我Vagrantfile并增加固定IP: config.vm.network “private_network” IP: “10.10.10.10” ,我跑了无业游民了,我得到了 “没有发现systemctl命令”。
我认为这是它试图设置网络接口,但因为它使用systemctl而失败,我认为这个版本或发行版不可用。 有没有办法添加它,或手动配置IP /网络接口?让流浪汉连接到它?
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
systemctl stop etcd
ifconfig 10.10.10.10 netmask 255.255.255.0
mv /tmp/etcd-cluster.service /media/state/units/
systemctl restart local-enable.service
# Restart default etcd
systemctl start etcd
Stdout from the command:
Stderr from the command:
bash: line 3: systemctl: command not found
SIOCSIFNETMASK: No such device
SIOCGIFADDR: No such device
SIOCSIFBROADCAST: No such device
mv: cannot move `/tmp/etcd-cluster.service' to `/media/state/units/': No such file or directory
bash: line 6: systemctl: command not found
bash: line 9: systemctl: command not found
'systemctl'是新centos7的一部分,它在centos65上不可用 - 您是从provision脚本运行此命令还是如何运行? –
不,这是由vagrant在更改Vagrantfile并添加固定IP时生成的: config.vm.network“private_network”,ip:“10.10.10.10” –
sytemd不是Centos6的init系统,因此无法进行systemctl可用。 –