pidof systemd
2733
If this return a number then your system supports systemd. Most Linux distributions in 2017 support systemd.
Since systemd starts the process then all processes will be children of systemd
function btoa(str) { | |
if ((typeof str) !== 'string') { | |
str = JSON.stringify(str); | |
} | |
var buffer; | |
if (str instanceof Buffer) { | |
buffer = str; |
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y | |
# Set the Server Timezone to CST | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
ufw enable | |
ufw allow 22 |
##rsync
If your folder contains subfolders and more importantly symlinks you want to use rsync:
rsync -aruv localfolder/ user@server:destination/
Or in reverse:
rsync -aruv user@server:destination/ localfolder/
// String utils | |
// | |
// resources: | |
// -- mout, https://github.com/mout/mout/tree/master/src/string | |
/** | |
* "Safer" String.toLowerCase() | |
*/ | |
function lowerCase(str){ | |
return str.toLowerCase(); |
The find()
operator creates a cursor to the data. The client can then parse through the data and do calculations on the data for reports purposes. However, with large data sets this is not practical. It makes far more sense for the server to do the calculations and return the result. This can save a considerable amount of unnecessary network traffic. You can however run the count on the cursor without much overhead.
db.mycollection.find().count()
Mongo has two other methods for reporting on data:
Letsencrypt is an initative which aims to increase the use of encryption for websites. It basically allows people to apply for free certificates provided that they prove the they control the requested domain. We will look at the what is needed to secure your MongoDB installation. For more details on setting up a MongoDB server see MongoDB 3.2.x.
We sould to set the hostname to match the name of the certificate we are going to optain.
sudo hostname mongo0.example.com
Then update the hostname file to set the server name permanently.
#MongoDB 3.2.x Security
##Network Ports The standard ports used by mongo are:
Process | Role | Default Port |
---|