Skip to content

Instantly share code, notes, and snippets.

@vutranvn
Last active November 8, 2017 19:51
Show Gist options
  • Save vutranvn/c976daa3346f82a1d997e58118ae72c8 to your computer and use it in GitHub Desktop.
Save vutranvn/c976daa3346f82a1d997e58118ae72c8 to your computer and use it in GitHub Desktop.
1. Install Nginx:
apt-get update && apt-get upgrade
- remove apache2
systemctl stop apache2
apt-get remove --purge apache2
apt-get install nginx
-start & enable nginx on boot
systemctl start nginx
systemctl enable nginx
systemctl status nginx
-set upload limit: nginx.conf
client_max_body_size 100m;
2. Install PHP-FPM
apt-get install -y php7.0 php7.0-fpm php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip
- Find php.ini: php --ini |grep Loaded
- In php.ini -> cgi.fix_pathinfo=0
systemctl restart php7.0-fpm
systemctl enable php7.0-fpm
- set upload limit in php.ini
upload_max_filesize = 100M
post_max_size = 100M
3. Install Mariadb
apt-get install mariadb-server mariadb-client
systemctl start mysql
systemctl enable mysql
mysql_secure_installation
4. Install phpmyadmin
apt-get update
apt-get install phpmyadmin php7.0-mbstring php7.0-gettext
Fix: #1698 - Access denied for user 'root'@'localhost'
use mysql;
update user set plugin='' where User='root';
flush privileges;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment