cp /etc/apt/sources.list /etc/apt/sources.list.bak
vi /etc/apt/sources.list
deb ftp://ftp.itb.ac.id/pub/ubuntu xenial main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu xenial-updates main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu xenial-security main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu xenial-backports main restricted universe multiverse
deb ftp://ftp.itb.ac.id/pub/ubuntu xenial-proposed main restricted universe multiverse
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install xubuntu-restricted-extras vlc
reference : http://bit.ly/2pLnVJ0
sudo apt-get install build-essential vim git zsh openssh-server curl
I'm using prezto framework for zsh
please refer to this repo : https://github.com/sorin-ionescu/prezto for further information, another usefull things for zsh
configuration from joshsymonds's blog
LEMP is abbreviation from Linux, Nginx, MySql and PHP
- Nginx
sudo apt-get install nginx
Allowing Nginx HTTP usingufw
sudo ufw allow "Nginx HTTP"
You can check status of Nginx HTTP is active or inactive can use this command :sudo ufw status
Make sureufw
is enabled. Enabling it withsudo ufw enable
If everything is OK, the result would be like this :And also check your localhost or 127.0.01 ;)Status: active To Action From -- ------ ---- Nginx HTTP ALLOW Anywhere OpenSSH ALLOW Anywhere Nginx HTTP (v6) ALLOW Anywhere (v6) OpenSSH (v6) ALLOW Anywhere (v6)
- MySql
sudo apt-get install mysql-server
sudo mysql_secure_installation
for securing mysql - PHP
sudo apt-get install php-fpm php-mysql
Configure PHP Processorsudo vim /etc/php/7.0/fpm/php.ini
Uncommentcgi.fix_pathinfo
and set it to 0 Restart latest PHP configuration with :sudo systemctl restart php7.0-fpm.service
- Configure Nginx with PHP
/etc/nginx/sites-available/default
Update nginx config with :Check your configuration of nginx :server { listen 80 default_server; listen [::]:80 default_server; root /path/to/your/destination; index index.php index.html index.htm index.nginx-debian.html; server_name server_domain_or_IP; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; } }
sudo nginx -t
if success, the result would be like below :Reload withnginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
sudo systemctl reload nginx
reference: http://do.co/2oMskLG