Last Updated:
error

Mengecek Dan Mengatasi Port Konflik Di GNU/Linux

root
root GNU/Linux

Ada pesan error yang muncul ketika saya ingin menjalankan amp stack bitnami.

Syntax OK
/home/ludy/server/apache2/scripts/ctl.sh : apache not running
/home/ludy/server/mariadb/scripts/ctl.sh : mariadb stopped
/home/ludy/server/mariadb/scripts/ctl.sh : mariadb  started at port 3306
Syntax OK
(98)Address already in use: AH00073: make_sock: unable to listen for connections on address [::]:8080
(98)Address already in use: AH00073: make_sock: unable to listen for connections on address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
/home/ludy/server/apache2/scripts/ctl.sh : httpd could not be started

Ternyata ada port yang biasa digunakan apache2 yaitu port :8080, konflik dengan aplikasi lain.

Mengecek Port Melalui GNU/Linux

Untuk melihat paket apa yang konflik, kita bisa menggunakan Terminal dengan mengetik perintah netstat -tulpn seperti berikut lengkapnya;

ludy@gnulinux:~/server$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:789             0.0.0.0:*               LISTEN      2037/python     
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1707/dnsmasq    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1046/cupsd      
tcp        0      0 127.0.0.1:6341          0.0.0.0:*               LISTEN      2382/megasync   
tcp        0      0 127.0.0.1:6342          0.0.0.0:*               LISTEN      2382/megasync   
tcp        0      0 0.0.0.0:6600            0.0.0.0:*               LISTEN      1969/forked-daapd
tcp        0      0 0.0.0.0:3689            0.0.0.0:*               LISTEN      1969/forked-daapd
tcp        0      0 0.0.0.0:6665            0.0.0.0:*               LISTEN      1930/crtmpserver
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      6405/mysqld.bin 
tcp        0      0 0.0.0.0:6666            0.0.0.0:*               LISTEN      1930/crtmpserver
tcp        0      0 0.0.0.0:9999            0.0.0.0:*               LISTEN      1930/crtmpserver
tcp        0      0 0.0.0.0:1935            0.0.0.0:*               LISTEN      1930/crtmpserver
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      1930/crtmpserver
tcp6       0      0 ::1:631                 :::*                    LISTEN      1046/cupsd      
udp        0      0 0.0.0.0:42128           0.0.0.0:*                           1969/forked-daapd
udp        0      0 224.0.0.251:5353        0.0.0.0:*                           3553/opera --enable
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           904/avahi-daemon: r
udp        0      0 0.0.0.0:48644           0.0.0.0:*                           1707/dnsmasq    
udp        0      0 127.0.1.1:53            0.0.0.0:*                           1707/dnsmasq    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1696/dhclient   
udp        0      0 0.0.0.0:49560           0.0.0.0:*                           904/avahi-daemon: r
udp        0      0 0.0.0.0:45609           0.0.0.0:*                           1969/forked-daapd
udp        0      0 0.0.0.0:631             0.0.0.0:*                           1052/cups-browsed
udp6       0      0 :::5353                 :::*                                904/avahi-daemon: r
udp6       0      0 :::60220                :::*                                904/avahi-daemon: r

Seperti hasil diatas, port :8080 digunakan oleh crtmserver yang terbawa ketika memasang ubuntustudio-desktop. 

Menghapus Paket Konflik

Sebenarnya ada cara lain yaitu mengganti port yang sudah dipakai menjadi port lain. Namun karena saya malas untuk itu, dan tidak membutuhkan crtmserver, akhirnya saya pilih jalan pintas saja.

Hapus crtmpserver dan mencoba menjalankan kembali amp stack. Berikut lengkapnya;

ludy@gnulinux:~$ sudo apt remove crtmpserver
[sudo] password for ludy: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  crtmpserver-apps
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  crtmpserver
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 96,3 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 572079 files and directories currently installed.)
Removing crtmpserver (1.0~dfsg-5.1) ...
Processing triggers for man-db (2.7.5-1) ...
ludy@gnulinux:~$ sudo apt autoremove 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  crtmpserver-apps
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 687 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 572069 files and directories currently installed.)
Removing crtmpserver-apps (1.0~dfsg-5.1) ...
ludy@gnulinux:~$ cd server/
ludy@gnulinux:~/server$ ./ctlscript.sh restart
Syntax OK
/home/ludy/server/apache2/scripts/ctl.sh : apache not running
/home/ludy/server/mariadb/scripts/ctl.sh : mariadb stopped
/home/ludy/server/mariadb/scripts/ctl.sh : mariadb  started at port 3306
Syntax OK
/home/ludy/server/apache2/scripts/ctl.sh : httpd started at port 8080
ludy@gnulinux:~/server$ 

Sekarang semua sudah bisa berjalan lancar.

Memasang WordPress Pada GNU/Linux

Berbeda dengan AMP Stack yang dipasang secara manual, yaitu dengan menginstall satu per satu paket.

Bitnami stack ini memakai port 8080 pada localhost untuk menjalankan web servernya.

Namun jika dibanding XAMPP, saya rasa AMP Stack jauh lebih ringan dan tentunya lebih cocok untuk pemula.

Comments