Last active
July 13, 2017 19:40
-
-
Save jbalzar/7b6c1ddafd77bbd868a7f07a03fe5374 to your computer and use it in GitHub Desktop.
Setup Laravel on LAMP stack on CentOS
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
# Commands to install required packages | |
sudo yum -y update | |
sudo yum -y install epel-release | |
sudo yum -y wget | |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm | |
wget https://centos6.iuscommunity.org/ius-release.rpm | |
sudo rpm -Uvh ius-release*.rpm | |
sudo yum -y update | |
sudo yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath | |
# Verify PHP version | |
php -v | |
# Install MySQL | |
sudo yum -y install mysql-server | |
# Start MySQL | |
sudo service mysqld start | |
# Setup MySQL | |
sudo /usr/bin/mysql_secure_installation | |
# Update httpd conf file | |
sudo vi /etc/httpd/conf/httpd.conf # Change DocumentRoot to /var/www/public , also change AllowOverride None to AllowOverride All | |
# Restart apache | |
sudo service httpd restart | |
# Download Composer by following the commands here https://getcomposer.org/download/ | |
# To use globally | |
sudo mv composer.phar /usr/local/bin/composer | |
# Enable Composer to root user | |
sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment