Last active
May 19, 2020 19:31
-
-
Save t18n/1ab5d1b25417baa734395beacb84dbb4 to your computer and use it in GitHub Desktop.
[Vagrant CentOS LAMP - PHP7] Vagrant CentOS LAMP stack #vagrant #php #lamp
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/bash | |
# Update CentOS with any patches | |
sudo yum update -y --exclude=kernel | |
# Tools | |
sudo yum install -y nano unzip screen wget | |
# Apache 2 | |
sudo yum install -y httpd httpd-devel httpd-tools | |
sudo systemctl start httpd.service | |
#Link files Vagrant | |
sudo rm -rf /var/www/html | |
sudo ln -s /vagrant /var/www/html | |
sudo systemctl enable httpd.service | |
# Nginx | |
# yum install -y nginx | |
# Start Nginx service and enable to start on boot using below commands. | |
# systemctl enable nginx.service | |
# systemctl start nginx.service | |
#MySQL/MariaDB | |
sudo yum install -y mariadb-server mariadb | |
sudo systemctl start mariadb | |
sudo systemctl enable mariadb.service | |
# PHP 7.1 | |
sudo yum install -y php php-mysql | |
sudo systemctl restart httpd.service | |
sudo yum install -y php-cli.x86_64 php-cmmon.x86_64 php-dba.x86_64 php-devel.x86_64 php-fpm.x86_64 php-mbstring.x86_64 php-mysql.x86_64 php-mysqlnd.x86_64 | |
# Download Starter Content | |
cd /vagrant | |
sudo -u vagrant wget -q https://raw.githubusercontent.com/tienthinhturbo/vagrant-provisioner/master/testing-files/index.html | |
sudo -u vagrant wget -q https://raw.githubusercontent.com/tienthinhturbo/vagrant-provisioner/master/testing-files/info.php | |
sudo systemctl start httpd.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment