{Tanya} Apa Saja yang di Instal di VPS Untuk Membangun Web Wordpress?


Status
Not open for further replies.

damblue

Poster 2.0
Buat nambah catatan aja biar ga lupa :D
cara simple ini buat yg masih awam aja kyak saya :D
sebelumnya saya dah share cara simple instal php5-fpm, nginx, dan mysql di Post 15
untuk tutor simple yang ini hanya mengganti database dari mysql menjadi mariadb.
karena saya baca2 artikel mariadb lebih bagus performanya bahkan si google make mariadb.
Di tutorial ini cuma menambah repositorynya di /etc/apt/sources.list
oke langsung aja ya. Tutor ini khusus DO ya ga tau klo penyedia vps lain bisa ga :D tapi klo cara manual instal mariadb bisa di vps mana aja :D
##################################################
DEBIAN 7
##################################################
Pertama edit dan tambah repositorynya dengan perintah dibawah ini.
klo di digital ocean nano (fitur edit) udah terinstal dari sononya. klo penyedia vps yg lain kurang tau jjuga sih :D
Code:
# nano /etc/apt/sources.list

kemudian tambahkan data dibawah ini.
lalu exit dengan tekan tombol CTRL+X kemudian Y dan enter.
Code:
deb http://ftp.osuosl.org/pub/mariadb/repo/10.2/debian wheezy main
deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.2/debian wheezy main

lalu update, Ketik aja perintah dibawah ini.
Code:
# wget http://www.dotdeb.org/dotdeb.gpg
# apt-key add dotdeb.gpg
# apt-get install python-software-properties -y
# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
# apt-get update && apt-get upgrade -y
# rm -f dotdeb.gpg

Kemudian Instal php5-fpm, nginx dan mariadb dengan perintah dibawah ini:
Code:
# apt-get install php5-fpm nginx php5-mysql mariadb-server

kemudian jalankan Nginxnya dengan perintah: ingat tanpa tanda #
Code:
# service nginx start

kemudian buat databasenya dengan nama databanya "blog" sebelum membuat database om harus masuk ke root databasenya jalankan perintah ini dan masukan pass root nya yg telah dibuat sebelumnya.
Code:
 # mysql -u root -p
kemudian script dibawah ini. satu persatu ya dan terakhir exit keluar dari database.
Code:
create database blog;
exit

Kemudian lanjutkan perintah dibawah ini. pergi ke cd /usr/share/nginx/www/ untuk mendownload wordpress dan mengextraknya serta mengahpus wordpressnya. kita akan menghapus wordpress .zip nya bukan hasil extraknya :D ikuti perintah dibwah ini
Code:
# cd /usr/share/nginx/www/
# wget http://wordpress.org/latest.zip
# unzip latest.zip
# rm latest.zip
# mv wordpress/* .
# rmdir wordpress/
# rm index.html
# cd ..
# chown www-data.www-data -R www/

Kemudian ketik perintah dibwah ini untuk mengedit nginxnya.
Code:
 # nano /etc/nginx/sites-enabled/default
kita mulai edit nginxnya, edit didalamnya seperti ini ya
Code:
# You may add here your
# server {
#  ...
# }
# statements for each of your virtual hosts to this file

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
server {
  #listen  80; ## listen for ipv4; this line is default and implied
  #listen  [::]:80 default_server ipv6only=on; ## listen for ipv6

  root /usr/share/nginx/www;
  index index.php;

  # Make site accessible from http://localhost/
  server_name localhost;
    
  location / {
  # First attempt to serve request as file, then
  # as directory, then fall back to displaying a 404.
  try_files $uri $uri/ /index.php;
  # Uncomment to enable naxsi on this location
  # include /etc/nginx/naxsi.rules
  }

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

  # Only for nginx-naxsi used with nginx-naxsi-ui : process denied reques$
  #location /RequestDenied {
  #  proxy_pass http://127.0.0.1:8080;
  #}

  #error_page 404 /404.html;

  # redirect server error pages to the static page /50x.html
  #
  #error_page 500 502 503 504 /50x.html;
  #location = /50x.html {
  #  root /usr/share/nginx/www;
  #}
  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  #
  location ~ \.php$ {
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  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;
  #}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#  listen 8000;
#  listen somename:8080;
#  server_name somename alias another.alias;
#  root html;
#  index index.html index.htm;
#
#  location / {
#  try_files $uri $uri/ =404;
#  }
#}


# HTTPS server
#
#server {
#  listen 443;
#  server_name localhost;
#
#  root html;
#  index index.html index.htm;
#
#  ssl on;
#  ssl_certificate cert.pem;
#  ssl_certificate_key cert.key;
#
#  ssl_session_timeout 5m;
#
#  ssl_protocols SSLv3 TLSv1;
#  ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
#  ssl_prefer_server_ciphers on;
#
#  location / {
#  try_files $uri $uri/ =404;
#  }
#}
lalu save dengan menetak keyword CTRL+X dan kemudian pilih Y dan Enter

Terakhir reload atau restart nginx, php5 dan sql nya dengan perintah ini:
Code:
# service nginx reload 
# service mysql restart
# service php5-fpm restart

Lalu buka browsernya om dan ketik ip VPSnya dan instal wordpressnya seperti biasa.
SELESAI
 

YuuNoa

Poster 1.0
Buat nambah catatan aja biar ga lupa :D
cara simple ini buat yg masih awam aja kyak saya :D
sebelumnya saya dah share cara simple instal php5-fpm, nginx, dan mysql di Post 15
untuk tutor simple yang ini hanya mengganti database dari mysql menjadi mariadb.
karena saya baca2 artikel mariadb lebih bagus performanya bahkan si google make mariadb.
Di tutorial ini cuma menambah repositorynya di /etc/apt/sources.list
oke langsung aja ya. Tutor ini khusus DO ya ga tau klo penyedia vps lain bisa ga :D tapi klo cara manual instal mariadb bisa di vps mana aja :D
##################################################
DEBIAN 7
##################################################
Pertama edit dan tambah repositorynya dengan perintah dibawah ini.
klo di digital ocean nano (fitur edit) udah terinstal dari sononya. klo penyedia vps yg lain kurang tau jjuga sih :D
Code:
# nano /etc/apt/sources.list

kemudian tambahkan data dibawah ini.
lalu exit dengan tekan tombol CTRL+X kemudian Y dan enter.
Code:
deb http://ftp.osuosl.org/pub/mariadb/repo/10.2/debian wheezy main
deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.2/debian wheezy main

lalu update, Ketik aja perintah dibawah ini.
Code:
# wget http://www.dotdeb.org/dotdeb.gpg
# apt-key add dotdeb.gpg
# apt-get install python-software-properties -y
# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
# apt-get update && apt-get upgrade -y
# rm -f dotdeb.gpg

Kemudian Instal php5-fpm, nginx dan mariadb dengan perintah dibawah ini:
Code:
# apt-get install php5-fpm nginx php5-mysql mariadb-server

kemudian jalankan Nginxnya dengan perintah: ingat tanpa tanda #
Code:
# service nginx start

kemudian buat databasenya dengan nama databanya "blog" sebelum membuat database om harus masuk ke root databasenya jalankan perintah ini dan masukan pass root nya yg telah dibuat sebelumnya.
Code:
 # mysql -u root -p
kemudian script dibawah ini. satu persatu ya dan terakhir exit keluar dari database.
Code:
create database blog;
exit

Kemudian lanjutkan perintah dibawah ini. pergi ke cd /usr/share/nginx/www/ untuk mendownload wordpress dan mengextraknya serta mengahpus wordpressnya. kita akan menghapus wordpress .zip nya bukan hasil extraknya :D ikuti perintah dibwah ini
Code:
# cd /usr/share/nginx/www/
# wget http://wordpress.org/latest.zip
# unzip latest.zip
# rm latest.zip
# mv wordpress/* .
# rmdir wordpress/
# rm index.html
# cd ..
# chown www-data.www-data -R www/

Kemudian ketik perintah dibwah ini untuk mengedit nginxnya.
Code:
 # nano /etc/nginx/sites-enabled/default
kita mulai edit nginxnya, edit didalamnya seperti ini ya
Code:
# You may add here your
# server {
#  ...
# }
# statements for each of your virtual hosts to this file

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
server {
  #listen  80; ## listen for ipv4; this line is default and implied
  #listen  [::]:80 default_server ipv6only=on; ## listen for ipv6

  root /usr/share/nginx/www;
  index index.php;

  # Make site accessible from http://localhost/
  server_name localhost;
   
  location / {
  # First attempt to serve request as file, then
  # as directory, then fall back to displaying a 404.
  try_files $uri $uri/ /index.php;
  # Uncomment to enable naxsi on this location
  # include /etc/nginx/naxsi.rules
  }

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

  # Only for nginx-naxsi used with nginx-naxsi-ui : process denied reques$
  #location /RequestDenied {
  #  proxy_pass http://127.0.0.1:8080;
  #}

  #error_page 404 /404.html;

  # redirect server error pages to the static page /50x.html
  #
  #error_page 500 502 503 504 /50x.html;
  #location = /50x.html {
  #  root /usr/share/nginx/www;
  #}
  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  #
  location ~ \.php$ {
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  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;
  #}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#  listen 8000;
#  listen somename:8080;
#  server_name somename alias another.alias;
#  root html;
#  index index.html index.htm;
#
#  location / {
#  try_files $uri $uri/ =404;
#  }
#}


# HTTPS server
#
#server {
#  listen 443;
#  server_name localhost;
#
#  root html;
#  index index.html index.htm;
#
#  ssl on;
#  ssl_certificate cert.pem;
#  ssl_certificate_key cert.key;
#
#  ssl_session_timeout 5m;
#
#  ssl_protocols SSLv3 TLSv1;
#  ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
#  ssl_prefer_server_ciphers on;
#
#  location / {
#  try_files $uri $uri/ =404;
#  }
#}
lalu save dengan menetak keyword CTRL+X dan kemudian pilih Y dan Enter

Terakhir reload atau restart nginx, php5 dan sql nya dengan perintah ini:
Code:
# service nginx reload
# service mysql restart
# service php5-fpm restart

Lalu buka browsernya om dan ketik ip VPSnya dan instal wordpressnya seperti biasa.
SELESAI

create user 'blog' identified by 'blogaku';

grant all on blog.* to 'blog';

ketinggalan mas, setting wordpressnya jangan pakek database root sama pw root ngeri kwkkw
 
Status
Not open for further replies.

Top