Last active
May 12, 2020 13:14
-
-
Save joramkimata/62c785c5ab8543373fd74adc4d1ab17d to your computer and use it in GitHub Desktop.
Laravel Installation on Linode Server
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
#Install Apache, PHP and MySQL | |
1. apt update | |
2. apt install apache2 apache2-utils curl mysql-server mysql-client php libapache2-mod-php php-mysql php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-mysql php-cli php-mcrypt php-zip -y | |
3. access http://<IP> | |
## Install Composer | |
1. apt install composer | |
2. Then run composer | |
## Install Laravel | |
1. cd /var/www/ | |
2. Using git or filezilla | |
## Configure Apache | |
1. Edit ```nano /etc/apache2/sites-enabled/000-default.conf``` | |
2. add ```DocumentRoot /var/www/project/public``` | |
3. Setup server to accept .htaccess file as shown below | |
``` | |
<Directory /var/www/project/public> | |
Require all granted | |
AllowOverride All | |
</Directory> | |
``` | |
4. Enable rewrite module ```a2enmod rewrite``` | |
5. Confirm everything is OK!, ```apachectl configtest``` && ```apachectl restart``` | |
6. Access the project again, ```http://<IP>``` | |
## Configure MySQL | |
1. mysql_secure_installation | |
2. mysql -u root -p | |
3. nano /var/www/project/.env | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment