On Ubuntu you should be able to install the necessary PDO parts from apt using
Installing PHP mysql and PDO driver on MySQL Linux server
sudo apt-get install php-mysql
sudo apt-get install pdo-mysql
On Ubuntu you should be able to install the necessary PDO parts from apt using
Installing PHP mysql and PDO driver on MySQL Linux server
sudo apt-get install php-mysql
sudo apt-get install pdo-mysql
It will ask you for the related password. Then once you get the mysql promt type the next command:
mysql> show variables like '%sock%'
and this script in file .env
DB_SOCKET=/opt/lampp/var/mysql/mysql.sock
Install Xampp/Lampp on Ubuntu 18.04
1.
sudo chmod +x namafilexampp.run
2.
sudo apt install curl php-cli php-mbstring git unzip'
sudo apt-get install composer
3.
composer --version
Install Laravel
1.
cd /opt/lampp/htdocs
2.
composer create-project --prefer-dist laravel/laravel test
3.
apt install php-xml
4.
php artisan serve
Go to
http://127.0.0.1:8000/
done
source : https://medium.com/@diszaid/instalasi-laravel-versi-5-7-pada-ubuntu-18-04-lts-78061b1f4a4f