Skip to content

Instantly share code, notes, and snippets.

@cwolferh
Created April 19, 2013 22:15
Show Gist options
  • Select an option

  • Save cwolferh/5423591 to your computer and use it in GitHub Desktop.

Select an option

Save cwolferh/5423591 to your computer and use it in GitHub Desktop.
# On Fedora 18, install libvirt dependencies (and a few more) and
# start libvirtd. turn off selinux, enable ip forwarding, turn off
# firewall.
sudo sysctl -w net.ipv4.ip_forward=1
sudo sed -i 's/net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/g' /usr/lib/sysctl.d/00-system.conf
sudo setenforce 0
sudo systemctl stop firewalld
depends="nfs-utils libguestfs-tools libvirt virt-manager git mysql-server tigervnc-server tigervnc-server-module tigervnc xorg-x11-twm xorg-x11-server-utils"
depends="$depends python-virtinst"
# nice to have
depends="$depends oz wget git curl"
for dep in $depends; do
if ! `rpm -q --quiet --nodigest $dep`; then
install_list="$install_list $dep"
fi
done
# Install the needed packages
if [ "x$install_list" != "x" ]; then
sudo yum install -y $install_list
fi
# Verify the dependencies did install
fail_list=""
for dep in $depends; do
if ! `rpm -q --quiet --nodigest $dep`; then
fail_list="$fail_list $dep"
fi
done
# If anything failed verification, we tell the user and exit
if [ "x$fail_list" != "x" ]; then
echo "ABORTING: FAILED TO INSTALL $fail_list"
exit 1
fi
sudo systemctl start libvirtd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment