Created
June 10, 2017 19:06
-
-
Save puremourning/a41b4c6ac732091f63736e3ccb6d8d67 to your computer and use it in GitHub Desktop.
Setting up a Vagrant VM for CentOS 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
yum update -y | |
# Install the Parallels tools | |
mkdir /media/cdrom | |
mount /dev/cdrom /media/cdrom | |
/mdeia/cdmrom/install | |
# To get the version | |
yum install -y redhat-lsb | |
# Standard dev tools | |
yum groupinstall -y "Development tools" | |
# Install devtoolset-6 | |
yum install -y centos-release-scl | |
yum install -y devtoolset-6 | |
# Activate it | |
source /opt/rh/devtoolset-6/enable | |
# YCM Dependencies: cmake, python | |
yum install -y cmake | |
yum install -y python33 python33-devel | |
source /opt/rh/python33/enable | |
# golang, node, typescript | |
yum install -y epel-release | |
yum install -y golang | |
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - | |
yum install -y nodejs | |
npm install -g typescript | |
# mono | |
yum install -y yum-utils | |
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" | |
yum-config-manager --add-repo http://download.mono-project.com/repo/centos7/ | |
yum install -y mono-devel | |
# rust, llvm not done as root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
echo 'source /opt/rh/devtoolset-6/enable' >> ~/.profile | |
echo 'source /opt/rh/python33/enable' >> ~/.profile | |
# rust | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
source ~/.profile | |
# LLVM has to be built from source? | |
# And set up YouCompleteMe | |
git clone https://github.com/Valloric/YouCompleteMe $HOME/YouCompleteMe | |
cd $HOME/YouCompleteMe | |
git submodule update --init --recursive | |
./install.py --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "parallels/centos-7.3" | |
#config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "public_network" | |
config.vm.provider "parallels" do |v| | |
v.memory = 1024 * 8 | |
v.cpus = 6 | |
v.linked_clone = true | |
end | |
config.vm.provision "shell", path: "provision.root.sh" | |
config.vm.provision "shell", path: "provision.vagrant.sh", privileged: false | |
end |
LSB is Linux Standard Base Distribution
It is the version of Linux running in the system
cat /etc/rhedhat-release
cat /etc/release
cat /etc/os-release
Thanks
yeah I think that the ycmd build.py uses lsb-release to get the OS version
Thanks Ben
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
What is the usage of
yum install -y redhat-lsb
? You said# To get the version
, what version? If I'm not to install it, can I still install thedevtoolset-6
?Although I have searched
redhat-lsb
, I'm still not understand how it affects the whole script. Thanks.