In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces how emq monitors ports below 1024. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
The application listens for ports below 1024
Our own application listens for the port number of the service. Ordinary users can only access ports above 1024. When you need to use port numbers of 1024 or less, you need the application to obtain root user rights as follows (assuming that the name of the application we wrote is myproc):
Chown root:root myprocchmod Utility myproc
Change systemctl to emqx so that root user startup is invalid
Vim / usr/lib/systemd/system/ emqx.service[Unit] Description=emqx daemonAfter= network.target[Service] User=emqxGroup=emqxType=forkingEnvironment=HOME=/var/lib/emqxExecStart=/bin/sh / usr/bin/emqx startLimitNOFILE=1048576ExecStop=/bin/sh / usr/bin/emqx stop[Install] WantedBy=multi-user.target
Later, it is found that emqx is a script file, not a binary file, and the startup user has been specified in the file, so if you change the startup user, you need to change the script file vim / usr/bin/emqx.
Emq is run as an emqx user by default, and the following error is reported in the log after the command line starts emqx start
The following has no effect after modifying the emqx permissions (because emqx is a file, as mentioned earlier)
Chown root:root emqxchmod Utility emqx
After looking at the process after emqx starts normally, it is found that the startup file is this / usr/lib/emqx/erts-10.3.5.1/bin/beam.smp
Chmod Utility beam.smp
After modification, the permissions are as follows, which can be started normally.
Reference: https://blog.csdn.net/weixin_43050332/article/details/89420007
This is enough about how emq monitors the ports below 1024. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.