{"id":3837,"date":"2024-07-11T20:13:17","date_gmt":"2024-07-11T20:13:17","guid":{"rendered":"https:\/\/orfeolibre.org\/inicio\/?post_type=knowledgebase&#038;p=3837"},"modified":"2025-08-13T16:10:23","modified_gmt":"2025-08-13T16:10:23","slug":"ng-sockets-2-0","status":"publish","type":"knowledgebase","link":"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/","title":{"rendered":"NG Sockets 2.0"},"content":{"rendered":"<h2>Descripci\u00f3n<\/h2>\n<p>Este manual indica como hacer la instalaci\u00f3n del backend de SGDEA OrfeoNG v2.0 partiendo de los fuentes en un Debian 13 o Ubuntu 24.04 o Windows XAMP.<\/p>\n<h2>Prerequistos<\/h2>\n<p>Arrancamos con un Linux preferible Kuine-LAMP v7 o Kuine-LAMaP v7 actualizado\u00a0 o con un Windows usando XAMP configurado seg\u00fan <a href=\"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-1-0-windows\/instalar-en-ms-windows\/\">esta guia<\/a>.<\/p>\n<h2>Configuraci\u00f3n<\/h2>\n<h3>0. Instale NODE\u00a0 Linux \/ Kuine<\/h3>\n<p>La documentaci\u00f3n para instalar nodejs en GNU \/ Linux<\/p>\n<p>https:\/\/github.com\/nodesource\/distributions\/blob\/master\/README.md<\/p>\n<p>Por ejemplo para instalar la version 20 en <strong>Debian 13 \/ Ubuntu 24<br \/>\n<\/strong><\/p>\n<pre>$&gt; sudo su - \r\n$&gt; apt-get install nodejs npm\r\n\r\nSi la version no es la 20+ (ejm <strong>Ubuntu 24.04<\/strong>) y toca a mano .. pues viene asi\r\n\r\n$&gt; sudo su - \r\n$&gt; curl -fsSL https:\/\/deb.nodesource.com\/setup_20.x | sudo -E bash -\r\n$&gt; sudo apt-get install -y nodejs\r\n\r\n<\/pre>\n<p>https:\/\/github.com\/nodesource\/distributions\/blob\/master\/README.md<\/p>\n<p>** Si tiene un conflicto entre nodejs y npm y no encuentra dependencias .. el truco esta en instalar aptitude en Debian \/ Ubuntu<\/p>\n<h3>0. Instale NODE\u00a0 Windows<\/h3>\n<p>Descargue e instale Node de <a href=\"https:\/\/nodejs.org\/en\/download\">https:\/\/nodejs.org\/en\/download<\/a>\u00a0 (le dije que si que instalara todos los addons)<\/p>\n<h3>0.1 Instale Angular<\/h3>\n<p>Y ahora si &#8230; monte el angular cli<\/p>\n<pre>$&gt; sudo su -  (Linux)\r\n$&gt; sudo npm install -g @angular\/cli\r\n** Ignore las alertas por versiones \r\n$&gt; sudo ng version<\/pre>\n<pre>     _                      _                 ____ _     ___\r\n    \/ \\   _ __   __ _ _   _| | __ _ _ __     \/ ___| |   |_ _|\r\n   \/ \u25b3 \\ | '_ \\ \/ _` | | | | |\/ _` | '__|   | |   | |    | |\r\n  \/ ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\r\n \/_\/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\r\n                |___\/<\/pre>\n<p>Angular CLI: 16.1.2<br \/>\nNode: 19.9.0 (Unsupported)<br \/>\nPackage Manager: npm 9.6.3<br \/>\nOS: linux x64<\/p>\n<p>Angular: undefined<br \/>\n&#8230;<\/p>\n<p>Package Version<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n@angular-devkit\/architect 0.1601.2 (cli-only)<br \/>\n@angular-devkit\/core 16.1.2 (cli-only)<br \/>\n@angular-devkit\/schematics 16.1.2 (cli-only)<br \/>\n@schematics\/angular 16.1.2 (cli-only)<\/p>\n<h3>1. Descargue el sockets del repositorio<\/h3>\n<pre>$&gt; git config --global http.sslVerify false\u00a0\u00a0\r\n$&gt; git clone https:\/\/aruba.skinatech.com\/Orfeo-NG\/ng_sockets.git<\/pre>\n<p>y en el directorio creado corra<\/p>\n<pre>$&gt; npm install<\/pre>\n<p>para instalar todas las dependencias y tengo 0 obsoletos<\/p>\n<h3>2. Active el Servicio &#8211; probando<\/h3>\n<h4>2.1 Instalaci\u00f3n<\/h4>\n<p>Pruebe el servicio de angular para que todo este bien<\/p>\n<pre>$&gt; npm run dev<\/pre>\n<p>En windows XAMP el firewall va a preguntar si se permite el acceso al puerto 3005 que abren los sockets<\/p>\n<p>En Linux puede mandarlo a background para liberar la consola<\/p>\n<pre>$&gt; npm start &amp;&gt; \/dev\/null &amp;                                                 \r\n<\/pre>\n<p>Pruebe que el puerto esta abierto<\/p>\n<pre>$&gt; telnet localhost 3005                                                            \r\n<\/pre>\n<h4>2.2 Agregue un servicio al arranque en Linux \/ Kuine<\/h4>\n<p>Los pasos a seguir del proceso anterior:<\/p>\n<pre>\u00a0 \u00a0$&gt; sudo su                                                                      \r\n\u00a0 \u00a0$&gt; vim \/etc\/systemd\/system\/ng_sockets.service                                                                      \r\n<\/pre>\n<p>Agrege el siguiente texto<\/p>\n<pre>[Unit]\r\nDescription=OrfeoNG Sockets\r\nDocumentation=http:\/\/www.orfeolibre.org\r\nAfter=network.target remote-fs.target nss-lookup.target \r\n\r\n[Service]\r\nType=simple\r\nUser=admin\r\nGroup=nogroup\r\nWorkingDirectory=\/var\/www\/html\/ng_sockets\r\nExecStart=\/usr\/bin\/npm start\r\nRestart=on-abort\r\nStartLimitInterval=60\r\nStartLimitBurst=10\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/pre>\n<p>Incluirlo en la secuencia de arranque<\/p>\n<pre>$&gt; sudo systemctl daemon-reload                                                             \r\n$&gt; sudo systemctl enable ng_sockets.service                                                                      \r\n$&gt; sudo systemctl start ng_sockets.service                                                                      \r\n<\/pre>\n<p>Verifique que esta corriendo con<\/p>\n<pre>$&gt; sudo systemctl status ng_sockets.service<\/pre>\n<h4>2.2 Agregue un servicio al arranque en Windows<\/h4>\n<p>&nbsp;<\/p>\n<p><strong>2.1. Ahora <\/strong><strong>exponga el servicio con apache<\/strong><\/p>\n<p>Habilite los modulos de proxy<\/p>\n<p>$&gt;\u00a0 a2enmod proxy proxy_http<\/p>\n<p>Agregue a apache la redireccion \/ proxy inverso (conf-enable\/orfeong.conf)<\/p>\n<pre>&lt;IfModule mod_proxy.c&gt;\r\n\u00a0 \u00a0 \u00a0 ProxyPreserveHost On\r\n\u00a0 \u00a0 \u00a0 ProxyPass \"\/socket\" \"http:\/\/localhost:3005\/\"\r\n\u00a0 \u00a0 \u00a0 ProxyPassReverse \"\/socket\" \"http:\/\/localhost:3005\/\"\r\n      # Esto ayuda con algunas consultas perdidas\r\n      ProxyPass \"\/socket.io\" \"http:\/\/localhost:3005\/socket.io\"\r\n      ProxyPassReverse \"\/socket.io\" \"http:\/\/localhost:3005\/socket.io\"\r\n&lt;\/IfModule&gt;<\/pre>\n<h2>Trucos<\/h2>\n<h3><strong>1. Evite que se caiga con Monit en Linux \/Kuine<\/strong><\/h3>\n<p>Para evitar que el servico muera y se quede asi usamos monit<\/p>\n<p>En \/etc\/monit\/conf-available\/ng_sockets<\/p>\n<pre>set daemon 60\r\n \r\ncheck host ng_sockets with address 127.0.0.1\r\n\u00a0\u00a0\u00a0 start program = \"\/usr\/bin\/systemctl start ng_sockets.service\"\r\n\u00a0\u00a0\u00a0 stop program = \"\/usr\/bin\/systemctl stop ng_sockets.service\"\r\n\u00a0\u00a0\u00a0 if failed port 3005 then restart\r\n\u00a0\u00a0\u00a0 if 5 restarts within 5 cycles then timeout<\/pre>\n<h2>Problemas<\/h2>\n<h2>Referencias<\/h2>\n<p>&#8211;<\/p>\n<p>FIN<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Descripci\u00f3n Este manual indica como hacer la instalaci\u00f3n del backend de SGDEA OrfeoNG v2.0 partiendo de los fuentes en un Debian 13 o Ubuntu 24.04 o Windows XAMP. Prerequistos Arrancamos con un Linux preferible Kuine-LAMP [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","knowledgebase_cat":[58],"class_list":["post-3837","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-orfeong-sgdea-2-0-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>NG Sockets 2.0 - Orfeo SGDEA - Gesti\u00f3n Documental<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NG Sockets 2.0 - Orfeo SGDEA - Gesti\u00f3n Documental\" \/>\n<meta property=\"og:description\" content=\"Descripci\u00f3n Este manual indica como hacer la instalaci\u00f3n del backend de SGDEA OrfeoNG v2.0 partiendo de los fuentes en un Debian 13 o Ubuntu 24.04 o Windows XAMP. Prerequistos Arrancamos con un Linux preferible Kuine-LAMP [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/\" \/>\n<meta property=\"og:site_name\" content=\"Orfeo SGDEA - Gesti\u00f3n Documental\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-13T16:10:23+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/documentacion-orfeo\\\/documentacion-orfeong\\\/orfeong-sgdea-2-0-linux\\\/ng-sockets-2-0\\\/\",\"url\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/documentacion-orfeo\\\/documentacion-orfeong\\\/orfeong-sgdea-2-0-linux\\\/ng-sockets-2-0\\\/\",\"name\":\"NG Sockets 2.0 - Orfeo SGDEA - Gesti\u00f3n Documental\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/#website\"},\"datePublished\":\"2024-07-11T20:13:17+00:00\",\"dateModified\":\"2025-08-13T16:10:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/documentacion-orfeo\\\/documentacion-orfeong\\\/orfeong-sgdea-2-0-linux\\\/ng-sockets-2-0\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/documentacion-orfeo\\\/documentacion-orfeong\\\/orfeong-sgdea-2-0-linux\\\/ng-sockets-2-0\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/documentacion-orfeo\\\/documentacion-orfeong\\\/orfeong-sgdea-2-0-linux\\\/ng-sockets-2-0\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NG Sockets 2.0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/#website\",\"url\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/\",\"name\":\"Orfeo SGDEA - Gesti\u00f3n Documental\",\"description\":\"Sistema de Gesti\u00f3n Documental de Archivo Electr\u00f3nico\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/orfeolibre.org\\\/inicio\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NG Sockets 2.0 - Orfeo SGDEA - Gesti\u00f3n Documental","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/","og_locale":"es_ES","og_type":"article","og_title":"NG Sockets 2.0 - Orfeo SGDEA - Gesti\u00f3n Documental","og_description":"Descripci\u00f3n Este manual indica como hacer la instalaci\u00f3n del backend de SGDEA OrfeoNG v2.0 partiendo de los fuentes en un Debian 13 o Ubuntu 24.04 o Windows XAMP. Prerequistos Arrancamos con un Linux preferible Kuine-LAMP [&hellip;]","og_url":"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/","og_site_name":"Orfeo SGDEA - Gesti\u00f3n Documental","article_modified_time":"2025-08-13T16:10:23+00:00","twitter_card":"summary_large_image","twitter_misc":{"Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/","url":"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/","name":"NG Sockets 2.0 - Orfeo SGDEA - Gesti\u00f3n Documental","isPartOf":{"@id":"https:\/\/orfeolibre.org\/inicio\/#website"},"datePublished":"2024-07-11T20:13:17+00:00","dateModified":"2025-08-13T16:10:23+00:00","breadcrumb":{"@id":"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/orfeolibre.org\/inicio\/documentacion-orfeo\/documentacion-orfeong\/orfeong-sgdea-2-0-linux\/ng-sockets-2-0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/orfeolibre.org\/inicio\/"},{"@type":"ListItem","position":2,"name":"NG Sockets 2.0"}]},{"@type":"WebSite","@id":"https:\/\/orfeolibre.org\/inicio\/#website","url":"https:\/\/orfeolibre.org\/inicio\/","name":"Orfeo SGDEA - Gesti\u00f3n Documental","description":"Sistema de Gesti\u00f3n Documental de Archivo Electr\u00f3nico","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/orfeolibre.org\/inicio\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"}]}},"_links":{"self":[{"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/knowledgebase\/3837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/comments?post=3837"}],"version-history":[{"count":15,"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/knowledgebase\/3837\/revisions"}],"predecessor-version":[{"id":6640,"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/knowledgebase\/3837\/revisions\/6640"}],"wp:attachment":[{"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/media?parent=3837"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/orfeolibre.org\/inicio\/wp-json\/wp\/v2\/knowledgebase_cat?post=3837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}