You are on page 1of 2

https://programacionymas.

com/blog/hacer-deploy-app-laravel-digital-ocean
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-
php-lamp-stack-on-ubuntu
https://cloud.google.com/community/tutorials/setting-up-lamp
https://www.techandme.se/install-php-7-on-ubuntu-14-04/

sudo apt-get update


sudo apt-get dist-upgrade
sudo apt-get install apache2
sudo a2enmod rewrite
sudo apt-get install mysql-server
sudo passwd
su
mysql_secure_installation
no
enter new password for mysql
yes
yes
yes
yes
yes
exit

--instalar php 7.3


IF UBUNTU < 19.10:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.3 php7.3-common php7.3-cli
sudo apt-get install php-mbstring
sudo apt-get install php7.3-bcmath php7.3-bz2 php7.3-curl php7.3-gd php7.3-intl
php7.3-json php7.3-mbstring php7.3-readline php7.3-xml php7.3-zip
sudo apt-get install php7.3-mysql

sudo apt-get install phpmyadmin


apache2 yes
Configure database for phpmyadmin with dbconfig-common? Yes
enter new password for phpmyadmin
sudo nano /etc/apache2/apache2.conf
Include /etc/phpmyadmin/apache.conf
sudo service apache2 restart

ip/phpmyadmin it is working
user root pass root no working
for it is working

console
su
mysql -u root
###cambiar el root por el password
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost';

Install composer for laravel

sudo curl -sS https://getcomposer.org/installer | php


sudo mv composer.phar /usr/local/bin/composer
sudo apt-get install git

now git clone your project in /var/www


example

cd /var/www
sudo git clone https://clasikman@bitbucket.org/clasikman/uis-marketing.git
cd PROJECT
sudo composer install
sudo chown -R www-data: storage
sudo chmod -R 755 storage
sudo nano /etc/apache2/sites-enabled/000-default.conf

and append the next lines


DocumentRoot /var/www/PROJECT/public

<Directory /var/www/RPOJECT/public/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /var/www/PROJECT/public
</Directory>

sudo service apache2 restart


sudo nano .env
sudo composer update --no-scripts
sudo php artisan key:generate
#after create database whit name in .env
php artisan migrate --seed

In case
Warning in ./libraries/sql.lib.php#601
count(): Parameter must be an array or an object that implements Countable

https://medium.com/@chaloemphonthipkasorn/fix-bug-phpmyadmin-sql-lib-php-php7-2-
ubuntu-16-04-836049630a40

sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php


line 601 in function PMA_isRememberSortingOrder
|| (count($analyzed_sql_results[�select_expr�] == 1)
change to
|| (count($analyzed_sql_results[�select_expr�]) == 1

and ready

desbilite strict mode for error id column


set global sql_mode='';

You might also like