Archivo del Autor: carlosap

Find the UUID of a filesystem and add to fstab

use blkid sudo blkid /dev/sda2: LABEL=»NTFSDISK» UUID=»8C14553212372BD7″ TYPE=»ntfs» PARTLABEL=»Basic data partition» PARTUUID=»6120d102-a321-2dg3-a3c2-abc3b31313a3″ /dev/sda1: UUID=»727cac18-044b-4504-87f1-a5aefa774bda» TYPE=»ext3″ /dev/sdb: UUID=»467c4aa9-963d-4467-8cd0-d58caaacaff4″ TYPE=»ext3″ Find UUID and add to fstab # # /etc/fstab # Created by anaconda on Fri Feb 2 13:55:13 2018 # # Accessible filesystems, by reference, are maintained under ‘/dev/disk’ # See man pages fstab(5), findfs(8), mount(8) and/or… Leer más »

Timeout systemctl systemd

systemctl cat Then you need to create a {service}.service file to override your settings with information from [Service] section from systemctl cat {service} command and restart daemon after that: echo «[Service] TimeoutSec=15min ExecStart=/etc/rc.d/init.d/ start ExecStop=/etc/rc.d/init.d/ stop ExecReload=/etc/rc.d/init.d/ reload» > /lib/systemd/system/{service}.service sudo systemctl daemon-reload Timeout set by systemd systemctl show SERVICE_NAME.service -p TimeoutStopUSec

change network to private windows 2012 windows server

Hit Winkey + R to open Run prompt and type gpedit.msc Navigate to: Computer Configuration/Windows Settings/Security Setting /Network List Manager Policies. Choose your Network name in the right pane. Note: To show networks not currently connected, right-click Network List Manager Policies in the left pane and choose Show All Networks. Go to Network Location tab and change the Location type from Public to Private.  Close… Leer más »

Text search mongo

db.employees.find({$text: {$search: «Jean Valjean»}}, {score: {$meta: «textScore»}}).sort({score:{$meta:»textScore»}})

Full-Text Search in MongoDB

https://code.tutsplus.com/tutorials/full-text-search-in-mongodb–cms-24835   MongoDB, one of the leading NoSQL databases, is well known for its fast performance, flexible schema, scalability and great indexing capabilities. At the core of this fast performance lies MongoDB indexes, which support efficient execution of queries by avoiding full-collection scans and hence limiting the number of documents MongoDB searches. Starting from version… Leer más »

Linux: Find Out Which Process Is Listening Upon a Port

How do I find out running processes were associated with each open port? How do I find out what process has open tcp port 111 or udp port 7000 under Linux? You can the following programs to find out about port numbers and its associated process: netstat – a command-line tool that displays network connections, routing… Leer más »

How to increase sort buffered data limit?

db.adminCommand({setParameter: 1, internalQueryExecMaxBlockingSortBytes: }) 256GB > db.adminCommand({setParameter: 1, internalQueryExecMaxBlockingSortBytes: 268435456}); { «was» : 33554432, «ok» : 1 } db.employee.find( {$text: { $search : «pedro mario gonzales lopez» } }, { score : { $meta: «textScore» } }) .sort({ score: { $meta : «textScore» } } )

fail2ban Centos 7 with firewalld

How to install Fail2Ban on CentOS 7 On this page Installing Fail2Ban Configure settings for Fail2Ban Add a jail file to protect SSH. Running Fail2Ban service Tracking Failed login entries Checking the banned IPs by Fail2Ban Check the Fal2Ban Status Unbanning an IP address Most Linux servers offer an SSH login via Port 22 for… Leer más »

firewalld centos 7 firewall

firewall-cmd –get-default-zone firewall-cmd –get-services sudo firewall-cmd –zone=public –permanent –add-service=http sudo firewall-cmd –zone=public –permanent –add-service=https sudo firewall-cmd –zone=public –permanent –add-service=samba sudo firewall-cmd –permanent –zone=public –add-port=3838/tcp sudo firewall-cmd –permanent –zone=public –add-port=8787/tcp sudo firewall-cmd –reload