Skip to content

Instantly share code, notes, and snippets.

@glenntnorton
Last active January 25, 2018 17:33
Show Gist options
  • Save glenntnorton/a1f43bda3a93cf78873c374c4df2b86c to your computer and use it in GitHub Desktop.
Save glenntnorton/a1f43bda3a93cf78873c374c4df2b86c to your computer and use it in GitHub Desktop.
Vagrant provision script for CentOS7
#!/usr/bin/env bash
# changed init calls to systemctl
# update the box
sudo yum -y update
# apache2
sudo yum -y install httpd
# webtatic repo for php7
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# php7 & libs
sudo yum -y install php70w php70w-cli php70w-gd php70w-mcrypt php70w-mysql
sudo yum -y install php70w-mysqlnd php70w-pdo
# mariadb
sudo yum -y install mariadb mariadb-server mariadb-libs mariadb-test
# phpmyadmin
sudo yum -y install phpMyAdmin
# better vi usage
sudo yum -y install vim-enhanced
# basic .vimrc
cat > /home/vagrant/.vimrc << __VIMRC__
behave mswin
set nobackup
set noundofile
set ai
set smartindent
set expandtab
set tw=79
set sw=4
set sts=4
__VIMRC__
sudo chown vagrant:vagrant /home/vagrant/.vimrc
# start everything up!
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment