Config files
/etc/nginx/nginx.conf # Generated by nginxconfig.io # https://www.digitalocean.com/community/tools/nginx user www-data; pid /run/nginx.pid; worker_processes auto; worker_rlimit_nofile 65535; # Load modules include /etc/nginx/modules-enabled/*.conf; events { multi_accept on; worker_connections 65535; } http { charset utf-8; sendfile on; tcp_nopush on; tcp_nodelay on; server_tokens off; log_not_found off; types_hash_max_size 2048; types_hash_bucket_size 64; client_max_body_size 16M; # MIME include mime.types; default_type application/octet-stream; # Logging access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log warn; # SSL ssl_session_timeout 1d; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; # Diffie-Hellman parameter for DHE ciphersuites ssl_dhparam /etc/nginx/dhparam....
Export a PostgreSQL database dump To export PostgreSQL database we will need to use the pg_dump tool, which will dump all the contents of a selected database into a single file.
We need to run pg_dump in the command line on the computer where the database is stored. So, if the database is stored on a remote server, you will need to SSH to that server in order to run the following command:...
1. Using ‘sendmail’ Command Sendmail is a most popular SMTP server used in most of Linux/Unix distribution. Sendmail allows sending email from command line. Use below instructions to send email using ‘sendmail‘ command.
Created a file with email content:
cat /tmp/email.txt Subject: Terminal Email Send Email Content line 1 Email Content line 2 Subject: line will be used as subject for email.
Now send email using the following command....
You can create a script in /etc/profile.d/ to make aliases for all users:
Create a file called 00-aliases.sh (or any other fancy name) in /etc/profile.d:
gksu gedit /etc/profile.d/00-aliases.sh Put you aliases in this file. Example:
alias foo='bar --baz' alias baz='foo --bar' Save the file
Restart any open terminals to apply the changes.
How To Create Permanent Aliases In Linux?...
RHEL/CentOS v.s. Ubuntu Differences (Commands and Configuration)
Table of Contents Differences Packages yum vs apt rpm vs dpkg Service OS configuration files Log Differences Note RHEL Ubuntu Support 10years 10years LTS(Long Term Support) Defautl Editor vi nano Access control SELinux AppArmor Apach HTTP Server httpd apache2 Firewall firewalld (CentOS7)iptables (CentOS5, 6) ufw(Uncomplicated FireWall) Packages yum vs apt The apt command is a command for integration of apt-get / apt-cache....