$ sudo apt-get install cups $ sudo apt-get install lpr $ sudo service cups start
一回ログアウトしてHalt
$ vagrant halt
631番ポートをフォワーディングする
Vagrantfileに以下を追記(Ubuntuの631ポートをMacの3000ポートにフォワード)
config.vm.network "forwarded_port", guest: 631, host: 3000
VagrantをUpする
$ vagrant up $ vagrant ssh
cupsd.confを書き換える
http://esoz.blog.fc2.com/blog-entry-53.html
http://stackoverflow.com/questions/19571708/vagrant-port-forwarding-not-working-cups-not-accesible-from-host
https://ariejan.net/2006/11/13/cups-426-upgrade-required/
/etc/cups/cupsd.conf
Listen 0.0.0.0:631 #Listen localhost:631をコメントアウト ServerAlias * #必要 DefaultEncryption Never #必要 <Location /> Order allow,deny Allow from All #追記 </Location> # Restrict access to the admin pages... <Location /admin> Order allow,deny Allow from All #追記
CUPSを再起動
$ sudo service cups restart