Correr zend desde un puerto menor utilizando authbind
Definir una variable de puerto.
Instalar y configurar authbind
Actualizar la regla del firewall
Sobrescribir el la unidad de archivo zend y systemd y recargar el daemon.
Agregar el puerto al archivo zen.conf
Reiniciar zend y zentracker
NOTA: Después de ejecutar los siguientes pasos de la guía, si usted tiene ejecutando zend manualmente, usted tendrá que usar lo siguiente: authbind --deep /usr/bin/zend
Usted probablemente necesite correr zend manualmente, si usted ocupa correr un rescaneo o un reindex serán ejecutados de la siguiente manera.
authbind --deep /usr/bin/zend --rescan
authbind --deep /usr/bin/zend --reindex
Description | Command | |
|---|---|---|
| 1 | Establezca una variable de puerto, reemplace <port> con su número de puertos, remover <brackets> | PORT=<port> |
| 2 | Instale y configure authbind utilizando el puerto establecido en el paso previo. | sudo apt-get install authbind -ysudo touch /etc/authbind/byport/$PORTsudo chown $USER /etc/authbind/byport/$PORTchmod 755 /etc/authbind/byport/$PORT |
| 3 | Agregue su puerto a la reglas del firewall. | sudo ufw allow $PORT/tcp |
| 4 | Sobrescribir el la unidad de archivo zend y systemd, copie y pegue el bloque entero de texto. | echo \
"[Unit]
Description=Zen daemon
[Service]
User=$USER
Type=forking
ExecStart=/usr/bin/authbind --deep /usr/bin/zend -daemon -pid=$HOME/.zen/zend.pid
PIDFile=$HOME/.zen/zend.pid
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target" | sudo tee /lib/systemd/system/zend.service |
| 5 | Sobrescribe la unidad de archivo de zenupdate de systemd, copie y pegue el bloque entero de texto. | echo \
"[Unit]
Description=zenupdate.service
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot -q renew --pre-hook 'systemctl stop zend' --post-hook 'systemctl start zend'
PrivateTmp=true" | sudo tee /lib/systemd/system/zenupdate.service |
| 6 | Sobrescribe la unidad de archivo de zenupdate timer de systemd, copie y pegue el bloque entero de texto. | echo \
"[Unit]
Description=Run zenupdate unit twice a month @ 06:00:00 (UTC)
[Timer]
OnCalendar=*-*-01 06:00:00
OnCalendar=*-*-03 06:00:00
Unit=zenupdate.service
Persistent=true
[Install]
WantedBy=timers.target" | sudo tee /lib/systemd/system/zenupdate.timer |
| 7 | Recargue el daemon de systemd para aplicar los cambios. | sudo systemctl daemon-reload |
| 8 | Replace port 9033 with new port in zen.conf | sed -i "s/port=9033/port=$PORT/g" ~/.zen/zen.conf |
| 9 | Remover la regla del firewall anterior 9033 | sudo ufw delete allow 9033/tcp |
| 10 | Reinicie zend y zentracker | sudo systemctl restart zend zentracker |