2016-06-14 3 views
0

내 게스트 우분투 14.04 OS를 프로비저닝하기 위해 여러 개의 bash 스크립트를 만들었습니다. 지금 당장 문제가되는 것은 ffmpeg를 설치하는 것입니다. 스크립트가 끝나면 방황하는 사람은 단순히 SSH 연결 유지를 보내지 만 아무 것도하지 않습니다.방탕 한 방제가 명백한 이유없이 다음 스크립트를 실행하지 못합니다.

호스트 OS : 윈도우 7 64

무한히 반복 연결 유지 전에 마지막 출력은 다음과 같습니다

INSTALL libavutil/sha.h 
INSTALL libavutil/sha512.h 
INSTALL libavutil/stereo3d.h 
INSTALL libavutil/threadmessage.h 
INSTALL libavutil/time.h 
INSTALL libavutil/timecode.h 
INSTALL libavutil/timestamp.h 
INSTALL libavutil/tree.h 
INSTALL libavutil/twofish.h 
INSTALL libavutil/version.h 
INSTALL libavutil/xtea.h 
INSTALL libavutil/tea.h 
INSTALL libavutil/lzo.h 
INSTALL libavutil/avconfig.h 
INSTALL libavutil/ffversion.h 

DEBUG ssh: stdout: INSTALL  libavutil/libavutil.pc 

DEBUG ssh: stdout: Done 

DEBUG ssh: Sending SSH keep-alive... 
DEBUG ssh: Sending SSH keep-alive... 
DEBUG ssh: Sending SSH keep-alive... 
다음

있는 관련 스크립트 :

Vagrantfile
# -*- mode: ruby -*- 
# vi: set ft=ruby : 

# All Vagrant configuration is done below. The "2" in Vagrant.configure 
# configures the configuration version (we support older styles for 
# backwards compatibility). Please don't change it unless you know what 
# you're doing. 
Vagrant.configure(2) do |config| 
    # The most common configuration options are documented and commented below. 
    # For a complete reference, please see the online documentation at 
    # https://docs.vagrantup.com. 

    # Every Vagrant development environment requires a box. You can search for 
    # boxes at https://atlas.hashicorp.com/search. 
    config.vm.box = 'ubuntu/trusty64' 
    config.vm.hostname = 'dev' 

    config.ssh.forward_agent = true 
    config.ssh.pty = true 

    # Create a private network, which allows host-only access to the machine 
    # using a specific IP. 
    config.vm.network :private_network, type: :dhcp, auto_config: false 

    # Create a public network, which generally matched to bridged network. 
    # Bridged networks make the machine appear as another physical device on 
    # your network. 
    config.vm.network :public_network, 
        ip: '192.168.11.14', 
        bridge: 'Realtek PCIe GBE Family Controller' 

    # Share an additional folder to the guest VM. The first argument is 
    # the path on the host to the actual folder. The second argument is 
    # the path on the guest to mount the folder. And the optional third 
    # argument is a set of non-required options. 
    # 
    # Do not share root directory of vagrant 
    # config.vm.synced_folder '.', '/vagrant', disabled: true 
    # Share ruby repository directories 
    config.vm.synced_folder '.', 
          '/home/vagrant/apps', 
          nfs: true, 
          mount_options: [ 
          'nfsvers=3', 
          'vers=3', 
          'actimeo=1', 
          'rsize=8192', 
          'wsize=8192', 
          'timeo=14', 
          :nolock, 
          :udp, 
          :intr, 
          :user, 
          :auto, 
          :exec, 
          :rw 
          ] 

    # Provider-specific configuration so you can fine-tune various 
    # backing providers for Vagrant. These expose provider-specific options. 
    # Example for VirtualBox: 
    # 
    config.vm.provider :virtualbox do |vb| 
    # Display the VirtualBox GUI when booting the machine 
    vb.gui = true 

    # Use VBoxManage to customize the VM. 
    vb.name = 'Ubuntu' 
    vb.cpus = 4 
    vb.memory = 2048 
    vb.customize ['modifyvm', :id, '--vram', 64] 
    vb.customize ['modifyvm', :id, '--audio', :dsound] 
    vb.customize ['modifyvm', :id, '--audiocontroller', :ac97] 
    vb.customize ['modifyvm', :id, '--clipboard', :bidirectional] 
    end 

    # Provisioning 
    config.vm.provision :shell, path: './provisioning/user/install-apps.sh', 
           privileged: false, name: 'Applications' 
    config.vm.provision :shell, path: './provisioning/user/install-rvm.sh', 
           args: 'stable', privileged: false, name: 'RVM' 
    config.vm.provision :shell, path: './provisioning/user/install-ruby.sh', 
           args: '2.3.1', privileged: false, name: 'Ruby' 
    config.vm.provision :shell, path: './provisioning/user/install-ruby-gems.sh', 
           privileged: false, name: 'Ruby Gems' 
    config.vm.provision :shell, path: './provisioning/root/install-nginx.sh', 
           args: '1.9.9', name: 'Nginx' 

    config.vm.provision :chef_solo do |chef| 
    # chef.version = '12.10.40' 

    # Paths to your cookbooks (on the host) 
    chef.cookbooks_path = ['cookbooks'] 
    # Add chef recipes 
    chef.add_recipe 'apt' 
    chef.add_recipe 'git' # Is required for NPM 
    chef.add_recipe 'sqlite' 
    chef.add_recipe 'mysql' 
    chef.add_recipe 'nodejs' 
    chef.add_recipe 'memcached' 
    chef.add_recipe 'imagemagick' 
    chef.add_recipe 'optipng' 
    chef.add_recipe 'sublime-text' 
    chef.add_recipe 'tomcat' 
    end 
end 

install-apps.sh

#!/usr/bin/env bash 

echo Turning off console beeps... 
grep '^set bell-style none' /etc/inputrc || echo 'set bell-style none' >> /etc/inputrc 

echo Installing languages 
sudo apt-get -y update 
sudo locale-gen en_US en_US.UTF-8 
sudo dpkg-reconfigure locales 

echo Installing essential apps 
sudo apt-get -y install build-essential curl yasm 

echo Installing desktop apps 
sudo apt-get -y install ubuntu-desktop 

hash ffmpeg 2>/dev/null || { 
    # Build ffmpeg 
    echo Installing ffmpeg 

    sudo apt-get -y install autoconf automake libass-dev libfreetype6-dev \ 
    libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \ 
    libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev libx264-dev libmp3lame-dev libopus-dev 

    mkdir ~/ffmpeg_sources 
    cd ~/ffmpeg_sources 
    wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 
    tar xjvf ffmpeg-snapshot.tar.bz2 
    cd ffmpeg 
    PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ 
    --prefix="$HOME/ffmpeg_build" \ 
    --pkg-config-flags="--static" \ 
    --extra-cflags="-I$HOME/ffmpeg_build/include" \ 
    --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ 
    --bindir="$HOME/bin" \ 
    --enable-gpl \ 
    --enable-libass \ 
    --enable-libfreetype \ 
    --enable-libmp3lame \ 
    --enable-libopus \ 
    --enable-libtheora \ 
    --enable-libvorbis \ 
    --enable-libx264 \ 
    --enable-nonfree 

    PATH="$HOME/bin:$PATH" make 
    make install 
    make distclean 
    hash -r 

    source ~/.profile 
} 

echo Done 
exit 0 

install-rvm.sh 내가 간결성에 대한 다른 스크립트가 포함되지 않습니다

#!/usr/bin/env bash 

echo Installing RVM gpg key 
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 --trust-model always 

echo Installing RVM 
\curl -sSL https://get.rvm.io | bash -s $1 

exit 0 

. gui와 함께 방황하는 사람에게 로그인 할 때 평범하지 않은 것으로 보이지 않고 ffmpeg를 사용할 수 있습니다 ... 그러나 그 밖의 것은 준비되지 않았습니다. RVM이 없으며 Nginx도 없습니다.

답변

1

당신은 당신이 오류를 무슨 짓을했는지

config.ssh.forward_agent = false 
    config.ssh.pty = false 
+0

을 전달할 수 있도록 Vagrantfile에서 다음과 같은 설정으로 실행할 수 있습니다 프로비저닝, 방랑의 bug에 충돌했을 수 있습니다! 감사! – JakeTheSnake