■環境
win10 home
vagrant : 1.8.1
virtualbox : 5.0.14
仮想OS : CentOS 6.5
■症状
Vagrant + Virtualbox + CentOS 6.5 でhttpdサーバを構築しようとしましたが、
192.168.33.10 にアクセスして /var/www/html/index.html を表示させることができませんでした。
■行った手順
(windows コマンドプロンプト)
vagrant reload ==> 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: 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: Warning: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 4.3.6 default: VirtualBox Version: 5.0 ==> default: Configuring and enabling network interfaces... ==> default: Mounting shared folders... default: /vagrant => C:/Users/USER/Documents/vagrant/centos65 ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision` ==> default: flag to force provisioning. Provisioners marked to run always will still run.
(CentOS)
sudo yum -y install httpd sudo service httpd start sudo chkconfig httpd on sudo service iptables stop 左を実行したとき、下3つの表示が出てこない iptables: Flushing firewall rules: [OK] iptables: Setting chains to policy ACCEPT: filter [OK] iptables: Unloading modules: [OK] sudo chkconfig iptables off Vagrantfileの下の部分のコメントアウトを解除 config.vm.network :private_network, ip: "192.168.33.10" 192.168.33.10 にアクセス→失敗
■iptablesの状態
startコマンドを入力しても常にファイアウォールが動いていない状態でした
[vagrant@vagrant-centos65 ~]$ sudo service iptables start
[vagrant@vagrant-centos65 ~]$ sudo service iptables status
iptables: Firewall is not running.
[vagrant@vagrant-centos65 ~]$ sudo service iptables stop
[vagrant@vagrant-centos65 ~]$ sudo service iptables status
iptables: Firewall is not running.
[vagrant@vagrant-centos65 ~]$ sudo service iptables restart
[vagrant@vagrant-centos65 ~]$ sudo service iptables status
iptables: Firewall is not running.
[vagrant@vagrant-centos65 ~]$
■httpdの状態
[vagrant@vagrant-centos65 ~]$ sudo service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for vagrant-centos65.vagrantup.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
[vagrant@vagrant-centos65 ~]$ sudo service httpd status
httpd (pid 8271) is running...
[vagrant@vagrant-centos65 ~]$
■補足
過去に同じ症状になった際にvagrant-vbguestを試してみましたが、さらに別のエラーが発生してしまい、
vagrant up 自体ができなくなってしまいました。
よろしくお願いいたします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/02/03 05:47
2016/02/03 06:54