Selasa, 06 Januari 2015

instal vps

Catatan:

Saya Menggunakan Ubuntu 14.04 LTS
Silahkan dicoba di vps yang tdk kepake atau vps baru untuk percobaan
Ini setingan standar alias belum di optimasi


Download Putty Installer

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Buka Putty, Masukan Username dan Password VPS


Copy Perintah Dibawah dan kelik kanan untuk mempaste lalu tekan ENTER

apt-get update
apt-get upgrade

1. Install Nginx

apt-get install nginx -y
service nginx start

2. Install PHP5-FPM

apt-get install php5-fpm php5-mysql php5-curl php5-gd php5-mcrypt php5-cli -y
php5enmod mcrypt
cd /etc/php5/cli
mv php.ini php.ini.backup
ln -s ../fpm/php.ini
service php5-fpm restart

3. Install MySQL


apt-get install mysql-server mysql-client -y
/usr/bin/mysql_secure_installation


Change the root password? [Y/n] n
Yang Seterusnya Ketik y

Sampai
Reload privilege tables now? [Y/n] y
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

4. Install PhpMyadmin

apt-get install phpmyadmin -y


lanjutkan instruksinya

Lalu bikin shortcut agar phpmyadmin bisa di akses via browser

ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html


5. Install Webmin


nano /etc/apt/sources.list


tekan enter
tekan tombol arah atas keyboard
lalu copy perintah dibawah, klik kanan untuk mempaste lalu tekan ENTER

deb http://download.webmin.com/download/repository sarge contrib



tekan CTRL + SHIFT + X untuk Keluar lalu ketik Y lalu tekan ENTER untuk Mensave

wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
apt-get update
apt-get install webmin

5. Setup Nginx
nano /etc/nginx/sites-available/default





Hapus Semua, Ganti Dengan

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

root /usr/share/nginx/html;
index index.php index.html index.htm;

# Make site accessible from http://localhost/
server_name localhost;

location / {

try_files $uri $uri/ /index.php;

}

location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}

#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ \.php$ {

# With php5-fpm:
try_files $uri =404;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}

7. Restart Service nginx dan php5-fpm

service nginx restart
service php5-fpm restart