Hello :)Selamat datang ! Terima kasih sudah berkunjung.

Cara Install Nginx di Ubuntu 18.04 LTS

Nah setelah sebelumnya saya membahas cara install apache di ubuntu, kurang lengkap jika saya tidak melakukan installasi web server yang satu ini yaitu nginx. Perlu diketahui untuk jenis-jenis web server memang beragam, ada apache, nginx sampai yang berbayar yaitu litespeed.

Pada artikel kali ini saya akan membahas tentang bagaimana cara install nginx di ubuntu 18.04. Oke langsung saja simak langkah berikut

Lankah pertama lakukan update OS yang digunakan dengan perintah berikut

sudo apt-get update

Setelah update selesai lakukan reboot server dengan perintah berikut

reboot

Jika server sudah uptime, langkah selanjutnya yaitu melakukan installasi nginx, jalankan perintah berikut

sudo apt-get install nginx -y

Lalu tunggu sampai selesai, kurang lebih outputnya seperti berikut

root@os:~# sudo apt-get install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
fontconfig-config fonts-dejavu-core geoip-database libfontconfig1 libgd3 libgeoip1
libjbig0 libjpeg-turbo8 libjpeg8 libnginx-mod-http-geoip
libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail
libnginx-mod-stream libtiff5 libwebp6 libxpm4 libxslt1.1 nginx-common nginx-core
Suggested packages:
libgd-tools geoip-bin fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
fontconfig-config fonts-dejavu-core geoip-database libfontconfig1 libgd3 libgeoip1
libjbig0 libjpeg-turbo8 libjpeg8 libnginx-mod-http-geoip
libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail
libnginx-mod-stream libtiff5 libwebp6 libxpm4 libxslt1.1 nginx nginx-common nginx-core
0 upgraded, 21 newly installed, 0 to remove and 4 not upgraded.
Need to get 4,769 kB of archives.
After this operation, 15.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libjpeg-turbo8 amd64 1.5.2-0ubuntu5.18.04.1 [110 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 geoip-database all 20180315-1 [2,090 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libgeoip1 amd64 1.6.12-1 [71.8 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 fonts-dejavu-core all 2.37-1 [1,041 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 fontconfig-config all 2.12.6-0ubuntu2 [55.8 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libfontconfig1 amd64 2.12.6-0ubuntu2 [137 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libjpeg8 amd64 8c-2ubuntu8 [2,194 B]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libjbig0 amd64 2.1-3.1build1 [26.7 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libtiff5 amd64 4.0.9-5 [152 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libwebp6 amd64 0.6.1-2 [185 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libxpm4 amd64 1:3.5.12-1 [34.0 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libgd3 amd64 2.2.5-4 [118 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 nginx-common all 1.14.0-0ubuntu1 [37.0 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libnginx-mod-http-geoip amd64 1.14.0-0ubuntu1 [10.8 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libnginx-mod-http-image-filter amd64 1.14.0-0ubuntu1 [14.2 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libxslt1.1 amd64 1.1.29-5 [150 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libnginx-mod-http-xslt-filter amd64 1.14.0-0ubuntu1 [12.6 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libnginx-mod-mail amd64 1.14.0-0ubuntu1 [41.4 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libnginx-mod-stream amd64 1.14.0-0ubuntu1 [63.3 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 nginx-core amd64 1.14.0-0ubuntu1 [412 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 nginx all 1.14.0-0ubuntu1 [3,596 B]
Fetched 4,769 kB in 5s (989 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libjpeg-turbo8:amd64.
(Reading database ... 46868 files and directories currently installed.)
Preparing to unpack .../00-libjpeg-turbo8_1.5.2-0ubuntu5.18.04.1_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.1) ...
Selecting previously unselected package geoip-database.
Preparing to unpack .../01-geoip-database_20180315-1_all.deb ...
Unpacking geoip-database (20180315-1) ...
Selecting previously unselected package libgeoip1:amd64.
Preparing to unpack .../02-libgeoip1_1.6.12-1_amd64.deb ...
Unpacking libgeoip1:amd64 (1.6.12-1) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../03-fonts-dejavu-core_2.37-1_all.deb ...
Unpacking fonts-dejavu-core (2.37-1) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../04-fontconfig-config_2.12.6-0ubuntu2_all.deb ...
Unpacking fontconfig-config (2.12.6-0ubuntu2) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../05-libfontconfig1_2.12.6-0ubuntu2_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.12.6-0ubuntu2) ...
Selecting previously unselected package libjpeg8:amd64.
Preparing to unpack .../06-libjpeg8_8c-2ubuntu8_amd64.deb ...
Unpacking libjpeg8:amd64 (8c-2ubuntu8) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../07-libjbig0_2.1-3.1build1_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-3.1build1) ...
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../08-libtiff5_4.0.9-5_amd64.deb ...
Unpacking libtiff5:amd64 (4.0.9-5) ...
Selecting previously unselected package libwebp6:amd64.
Preparing to unpack .../09-libwebp6_0.6.1-2_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.1-2) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../10-libxpm4_1%3a3.5.12-1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.12-1) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../11-libgd3_2.2.5-4_amd64.deb ...
Unpacking libgd3:amd64 (2.2.5-4) ...
Selecting previously unselected package nginx-common.
Preparing to unpack .../12-nginx-common_1.14.0-0ubuntu1_all.deb ...
Unpacking nginx-common (1.14.0-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-http-geoip.
Preparing to unpack .../13-libnginx-mod-http-geoip_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-http-geoip (1.14.0-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-http-image-filter.
Preparing to unpack .../14-libnginx-mod-http-image-filter_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.14.0-0ubuntu1) ...
Selecting previously unselected package libxslt1.1:amd64.
Preparing to unpack .../15-libxslt1.1_1.1.29-5_amd64.deb ...
Unpacking libxslt1.1:amd64 (1.1.29-5) ...
Selecting previously unselected package libnginx-mod-http-xslt-filter.
Preparing to unpack .../16-libnginx-mod-http-xslt-filter_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-mail.
Preparing to unpack .../17-libnginx-mod-mail_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-mail (1.14.0-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-stream.
Preparing to unpack .../18-libnginx-mod-stream_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-stream (1.14.0-0ubuntu1) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../19-nginx-core_1.14.0-0ubuntu1_amd64.deb ...
Unpacking nginx-core (1.14.0-0ubuntu1) ...
Selecting previously unselected package nginx.
Preparing to unpack .../20-nginx_1.14.0-0ubuntu1_all.deb ...
Unpacking nginx (1.14.0-0ubuntu1) ...
Setting up geoip-database (20180315-1) ...
Setting up libjbig0:amd64 (2.1-3.1build1) ...
Setting up fonts-dejavu-core (2.37-1) ...
Setting up nginx-common (1.14.0-0ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service.
Setting up libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.1) ...
Setting up libgeoip1:amd64 (1.6.12-1) ...
Setting up libxslt1.1:amd64 (1.1.29-5) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.3) ...
Setting up libnginx-mod-mail (1.14.0-0ubuntu1) ...
Setting up libxpm4:amd64 (1:3.5.12-1) ...
Setting up libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1) ...
Setting up libnginx-mod-http-geoip (1.14.0-0ubuntu1) ...
Setting up libwebp6:amd64 (0.6.1-2) ...
Setting up libjpeg8:amd64 (8c-2ubuntu8) ...
Setting up fontconfig-config (2.12.6-0ubuntu2) ...
Setting up libnginx-mod-stream (1.14.0-0ubuntu1) ...
Setting up libtiff5:amd64 (4.0.9-5) ...
Setting up libfontconfig1:amd64 (2.12.6-0ubuntu2) ...
Setting up libgd3:amd64 (2.2.5-4) ...
Setting up libnginx-mod-http-image-filter (1.14.0-0ubuntu1) ...
Setting up nginx-core (1.14.0-0ubuntu1) ...
Setting up nginx (1.14.0-0ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

Setelah installasi selesai, makan bisa dicek dengan mengakses ip server menggunakan link berikut http://ip-server.

Jika berhasil maka pada browser anda akan muncul pesan seperti gambar dibawah 

Nah sekian saja artikel mengenai cara install nginx di ubuntu 18.04, sangat mudah bukan ? Selamat mencoba ya, semoga berhasil. 😀

Add a Comment

Your email address will not be published. Required fields are marked *