node.js – 如何在beaglebone上释放端口80,以便我可以使用它?

我有一个beaglebone,我已经配置lighttpd运行.目前我已经运行8080端口,它的工作正常.除非我真的想在端口80上使用它.不幸的是,它不会在端口80上启动,因为它失败,并报告端口已经在使用.当我通过端口80上的HTTP访问beaglebone时,当然我得到了beaglebone 101屏幕.

This page建议我运行systemctl禁用bone101.service,但该服务甚至不存在于我的Angstrom版本上.我使用了从here获得的Angstrom img,这是Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.04.13.img.xz.

我目前正在运行所有以下禁用:

systemctl disable cloud9.service                  
systemctl disable gateone.service                 
systemctl disable bonescript.service              
systemctl disable bonescript-autorun.service      
systemctl disable avahi-daemon.service            
systemctl disable gdm.service     # this disables the Gnome desktop which is maybe irrelevant here,but saves a ton of memory

但是我仍然在80端口上遇到问题.

我知道node.js是提供内容的东西,但是即使ps aux显示node.js没有运行(我可以杀死它),似乎再次访问端口会调用node.js.

如何禁用端口80一次,所以我可以释放它供lighttpd使用?

以下是ps aux的完整输出

root         1  0.2  1.0   4820  2684 ?        Ss   17:58   0:01 /sbin/init run_hardware_tests
root         2  0.0  0.0      0     0 ?        S    17:58   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    17:58   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   17:58   0:00 [kworker/0:0H]
root         7  0.0  0.0      0     0 ?        S<   17:58   0:00 [kworker/u:0H]
root         8  0.0  0.0      0     0 ?        S    17:58   0:00 [migration/0]
root         9  0.0  0.0      0     0 ?        S    17:58   0:00 [rcu_bh]
root        10  0.0  0.0      0     0 ?        S    17:58   0:00 [rcu_sched]
root        11  0.0  0.0      0     0 ?        S    17:58   0:00 [watchdog/0]
root        12  0.0  0.0      0     0 ?        S<   17:58   0:00 [khelper]
root        13  0.0  0.0      0     0 ?        S    17:58   0:00 [kdevtmpfs]
root        14  0.0  0.0      0     0 ?        S<   17:58   0:00 [netns]
root        15  0.0  0.0      0     0 ?        S    17:58   0:00 [kworker/0:1]
root        16  0.0  0.0      0     0 ?        S    17:58   0:00 [bdi-default]
root        17  0.0  0.0      0     0 ?        S<   17:58   0:00 [kintegrityd]
root        18  0.0  0.0      0     0 ?        S<   17:58   0:00 [kblockd]
root        19  0.0  0.0      0     0 ?        S    17:58   0:00 [khubd]
root        20  0.0  0.0      0     0 ?        S    17:58   0:00 [irq/86-44e0b000]
root        21  0.0  0.0      0     0 ?        S    17:58   0:00 [kworker/u:1]
root        26  0.0  0.0      0     0 ?        S    17:58   0:00 [irq/46-4819c000]
root        35  0.0  0.0      0     0 ?        S<   17:58   0:00 [rpciod]
root        37  0.0  0.0      0     0 ?        S    17:58   0:00 [khungtaskd]
root        38  0.0  0.0      0     0 ?        S    17:58   0:00 [kswapd0]
root        39  0.0  0.0      0     0 ?        S    17:58   0:00 [fsnotify_mark]
root        40  0.0  0.0      0     0 ?        S<   17:58   0:00 [nfsiod]
root        41  0.0  0.0      0     0 ?        S<   17:58   0:00 [crypto]
root        44  0.0  0.0      0     0 ?        S<   17:58   0:00 [pencrypt]
root        45  0.0  0.0      0     0 ?        S<   17:58   0:00 [pdecrypt]
root        52  0.0  0.0      0     0 ?        S<   17:58   0:00 [OMAP UART0]
root        54  0.0  0.0      0     0 ?        S<   17:58   0:00 [kpsmoused]
root        66  0.0  0.0      0     0 ?        S<   17:58   0:00 [deferwq]
root        67  0.0  0.0      0     0 ?        S    17:58   0:00 [kworker/u:2]
root        68  0.1  0.0      0     0 ?        D    17:58   0:00 [mmcqd/0]
root        71  0.0  0.0      0     0 ?        S<   17:58   0:00 [kworker/0:1H]
root        72  0.0  0.0      0     0 ?        S    17:58   0:00 [jbd2/mmcblk0p2-]
root        73  0.0  0.0      0     0 ?        S<   17:58   0:00 [ext4-dio-unwrit]
root        81  0.6  2.0 260668  5212 ?        Ss   17:58   0:06 /lib/systemd/systemd-journald
root        83  0.0  0.6   3732  1668 ?        Ss   17:58   0:00 /lib/systemd/systemd-udevd
root        86  0.0  0.0      0     0 ?        S    17:58   0:00 [kworker/0:2]
root        93  0.0  0.0      0     0 ?        S<   17:58   0:00 [krfcommd]
root       164  0.0  0.4   3008  1196 ?        Ss   17:58   0:00 /usr/sbin/crond -n
root       166  0.0  0.3   2464   916 ?        Ss   17:58   0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd.conf
root       167  0.0  0.8   5524  2260 ?        Ss   17:58   0:00 /usr/sbin/connmand -n
root       169  0.0  0.5   3012  1332 ?        Ss   17:58   0:00 /bin/sh /usr/bin/g-ether-load.sh
root       173  0.0  0.5   3056  1396 ?        Ss   17:58   0:00 /bin/sh /usr/bin/MysqLd_safe
root       175  0.0  0.4   2976  1156 ?        Ss   17:58   0:00 /lib/systemd/systemd-logind
999        185  0.0  0.5   2840  1380 ?        Ss   17:58   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       191  0.0  0.2   1992   724 tty1     Ss+  17:58   0:00 /sbin/agetty --noclear tty1 38400 linux
root       234  0.0  0.2   1992   712 ttyO0    Ss+  17:58   0:00 /sbin/agetty -s ttyO0 115200
root       335  0.0  0.0      0     0 ?        S    17:58   0:00 [flush-179:0]
root       394  0.0  0.0      0     0 ?        S    17:58   0:00 [file-storage]
root       407  0.0  0.2   2152   688 ?        S    17:58   0:00 /usr/sbin/udhcpd -f -S /etc/udhcpd.conf
MysqL      448  0.0  1.6  26604  4064 ?        Sl   17:59   0:00 /usr/libexec/MysqLd --basedir=/usr --datadir=/var/MysqL --user=MysqL --log-error=/var/log/MysqLd.err --pid-file=/var/lib/MysqL/MysqLd.p
root       479  0.0  0.4   3564  1216 ?        Ss   17:59   0:00 /usr/bin/ntpd -p /run/ntpd.pid
root       491  0.1  0.5   3028  1320 ?        Ss   18:03   0:00 /usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -p 22
root       492  0.0  0.6   3164  1688 pts/0    Ss   18:03   0:00 -sh
root       508  0.0  0.0      0     0 ?        S    18:08   0:00 [kworker/0:0]

另外,/etc/xinetd.conf文件是相当荒谬的:

# Simple configuration file for xinetd
#
# Some defaults,and include /etc/xinetd.d/

defaults
{


}

includedir /etc/xinetd.d

并且/etc/xinetd.d文件夹为空.

我也试过使用netstat,但是由于某种原因,它无法在beaglebone上提供-p开关,所以我没有得到有关哪个进程负责的信息.

从netstat可以得到最好的输出是netstat -nl | grep tcp给出:

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 :::53                   :::*                    LISTEN

netstat -p表示无效选项 – ‘p’

解决方法

我终于找到了解决方案.
秘密也是禁用套接字以及服务.

systemctl disable bonescript.service              
systemctl disable bonescript.socket
systemctl disable bonescript-autorun.service

现在我可以使用端口80的lighttpd.

相关文章

这篇文章主要介绍“基于nodejs的ssh2怎么实现自动化部署”的...
本文小编为大家详细介绍“nodejs怎么实现目录不存在自动创建...
这篇“如何把nodejs数据传到前端”文章的知识点大部分人都不...
本文小编为大家详细介绍“nodejs如何实现定时删除文件”,内...
这篇文章主要讲解了“nodejs安装模块卡住不动怎么解决”,文...
今天小编给大家分享一下如何检测nodejs有没有安装成功的相关...