باستخدام إجراء التثبيت القياسي discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub على Centos 7، ولكن:
تم اختبار الاتصال الشبكي على المنافذ 80 و 443 باستخدام nc كالتالي:
echo -e "HTTP/1.1 200 OK\n\n $VERIFY" | nc -w 4 -l -p $PORT >/dev/null 2>&1 &
if curl --proto =http -s $HOST:$PORT --connect-timeout 3 | grep $VERIFY >/dev/null 2>&1; then
:
ولكن nc يفشل مع:
nc: cannot use -p and -l
مما يجعل نص الإعداد يبلغ عن عدم توفر تلك المنافذ.
man nc يقول:
-l Listen for an incoming connection rather than initiating a connection to a remote host. Cannot be used together with any of the options -psxz. Additionally, any timeouts specified
with the -w option are ignored.
قد تكون مشكلة في إصدار nc، أرى أن nc linux command man page لا تقول أن هناك أي تعارض مع الاثنين. يمكن لـ netcat الخاص بي الاستماع، ولكن فقط باستخدام:
nc -w 4 -l <IP address> <port number>
لا يمكنني جعل netcat يخبرني برقم إصداره ![]()