Skip to content

Instantly share code, notes, and snippets.

@diegomengarda
Last active March 26, 2018 01:42
Show Gist options
  • Save diegomengarda/4f12a5e177ed8455ab05f9150f6a605d to your computer and use it in GitHub Desktop.
Save diegomengarda/4f12a5e177ed8455ab05f9150f6a605d to your computer and use it in GitHub Desktop.
Configuration for Ubuntu to run Laravel
Start Server Laravel
*SWAP file - SOMENTE PARA SERVIDOR CLOUD
sudo fallocate -l 1G /swapfile // always 2x real memory
sudo mkswap /swapfile
sudo chmod 600 /swapfile
sudo swapon /swapfile
*Update repositories
sudo apt-get update
*Locale Config - SOMENTE PARA SERVIDOR CLOUD
locale-gen en_US en_US.UTF-8 pt_BR.UTF-8
*Install Mysql
sudo apt-get install -y mysql-server
mysql_secure_installation
*External access Mysql
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 127.0.0.1 to #bind-address = 127.0.0.1
sudo service mysql restart
- Grant all privileges to user that will access
mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'ROOTPASSWORDHERE' WITH GRANT OPTION;
FLUSH PRIVILEGES;
*Install PHP 7, Nginx, Zip, Git
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y nginx zip unzip mcrypt git
sudo apt-get install -y php7.1 php7.1-fpm php7.1-mysql php7.1-zip php7.1-gd php7.1-mbstring php7.1-xml php7.1-mcrypt php7.1-curl php7.1-json php7.1-intl
*Modify the PHP Configuration
sudo nano /etc/php/7.1/fpm/php.ini
cgi.fix_pathinfo=0 // change this line
sudo service php7.1-fpm restart
*Install Composer
cd ~
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
*Install NodeJS
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
*Install Gulp
sudo npm install -g gulp
*Install Bower
sudo npm install -g bower
@alexcamargoweb
Copy link

Legal, fera!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment