Helpful collection of Terminal snippets for Linux Terminals and server management.
FIX Quota On Server:
- sudo /scripts/fixquotas --force
VIM
- save/quit [esc] => :wq => [enter]
Certbot Renew
- (Disable nginx first)
- sudo certbot renew
- certbot certonly --force-renew -d example.com
- sudo certbot renew --dry-run
CENTOS 7
check services:
- service --status-all
- service [name] status
Linux:
Updates:
- sudo yum check-update
- sudo yum update
- sudo reboot
Apache:
- sudo systemctl restart httpd.service
MySQL:
- sudo systemctl restart mysqld.service
PHP:
- sudo systemctl restart apache_php_fpm
- sudo systemctl restart cpanel_php_fpm
- systemctl restart php-fpm
Memcached:
- sudo systemctl restart memcached.service
- sudo systemctl stop memcached.service
- sudo systemctl start memcached.service
Varnish:
- sudo systemctl reload varnish.service
- sudo systemctl stop varnish.service
- sudo systemctl start varnish.service
Nginx
- systemctl restart nginx
- Gracefully: sudo systemctl reload nginx.
- hard: sudo systemctl restart nginx
CSF - ConfigServer Security & Firewall
- sudo systemctl unmask --now firewalld
- sudo systemctl restart firewalld
- sudo systemctl mask --now firewalld
- SSH
sudo systemctl restart ssh
File/Folder/Directory/Permissions/Users (CENTO OS)
- sudo chown -R nobody:useraccount /home/useraccount/public_html
Certbot:
- Disable: systemctl stop nginx
- Run certbot: certbot renew
- Enable: systemctl start nginx
USER: (run updates)
- sudo chown -R useraccount:useraccount /home/useraccount/public_html
SYSTEM:(lock)
- sudo chown -R nobody:nobody /home/useraccount/public_html