Nuestro ejemplo permité ejecutar un script cada cierto tiempo utilizando un servicio de una única ejecución en combinación con la unidad de timer.
Estaremos creando los siguientes archivos:
- tcp_server.sh
- [email protected]
- tcp_server.socket
Nuestro ejemplo permité ejecutar un script cada cierto tiempo utilizando un servicio de una única ejecución en combinación con la unidad de timer.
Estaremos creando los siguientes archivos:
Listado de comandos que debemos utilizar y comprender para dominar el uso de Linux.
pwd → muestra el directorio actual.ls, ls -l, ls -la → lista archivos y directorios.cd → cambiar de directorio.tree → muestra la estructura de directorios en forma de árbol.| <VirtualHost *:80> | |
| ServerAdmin [email protected] | |
| ServerName <<MiIP>> | |
| ProxyPreserveHost On | |
| ProxyRequests On | |
| #!/bin/sh | |
| FILE=/root/.ssh/id_rsa_nuevo.pub | |
| if [ ! -f "$FILE" ]; then | |
| yes yes | ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa_nuevo | |
| cp $FILE /home/ucjc/ | |
| fi | |
| if [ ! -f /home/ucjc/sshd_config ]; then | |
| cat /etc/ssh/sshd_config > /home/ucjc/sshd_config | |
| chmod 777 /home/ucjc/sshd_config | |
| fi |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| typedef struct { | |
| char clave[4]; | |
| char nombre[100]; | |
| } Carrera; | |
| typedef struct { |
| Javalin app = getInstanciaJavalin(); | |
| app.routes(()->{ | |
| path("/path/", () -> { | |
| before(ctx -> { | |
| System.out.println("Entrando a la ruta path..."); | |
| }); | |
| get("/", ctx -> { | |
| ctx.result("Ruta path /"); | |
| }); |
| listen aplicacion_web | |
| bind *:80 | |
| mode http | |
| stats enable | |
| stats uri /stats | |
| stats realm HAProxy\ Statistics | |
| stats auth cda:cda | |
| balance roundrobin | |
| cookie JSESSIONID prefix nocache | |
| server app-01 localhost:7000 check |
| listen aplicacion_web | |
| bind *:80 | |
| mode http | |
| stats enable | |
| stats uri /stats | |
| stats realm HAProxy\ Statistics | |
| stats auth cda:cda | |
| balance roundrobin | |
| cookie SERVERID insert indirect nocache | |
| server app-01 localhost:7000 check cookie s1 |
| listen aplicacion_web | |
| bind *:80 | |
| mode http | |
| stats enable | |
| stats uri /stats | |
| stats realm HAProxy\ Statistics | |
| stats auth cda:cda | |
| balance roundrobin | |
| server app-01 localhost:7000 check | |
| server app-02 localhost:7001 check |