Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
debian_common [2022/02/28 10:45] โ [Configure Dynamic DNS] Jรบne Park | debian_common [2024/04/18 07:49] โ [Major LTS upgrade] Jรบne Park | ||
---|---|---|---|
Line 32: | Line 32: | ||
===== Initial steps ===== | ===== Initial steps ===== | ||
+ | ==== Watchlist for backup ==== | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | /var/www/* | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | **update-motd** | ||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | **crontab** | ||
+ | <code bash> | ||
+ | sudo crontab -l | ||
+ | sudo -u www-data crontab -l | ||
+ | crontab -l | ||
+ | </ | ||
+ | |||
+ | **MariaDB** '' | ||
+ | === Backup MariaDB DATABASE === | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Backup using rsync command === | ||
+ | |||
+ | == Backup Nginx configuration files == | ||
+ | <code bash> | ||
+ | sudo rsync -avh --progress / | ||
+ | </ | ||
+ | |||
+ | == Backup HTML source files == | ||
+ | <code bash> | ||
+ | sudo rsync -avh --progress /var/www/ / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | === Remote backup for webpages === | ||
+ | Rsync with '' | ||
+ | <code bash> | ||
+ | sudo -u www-data rsync -azP --exclude ' | ||
+ | </ | ||
+ | Put '' | ||
+ | |||
+ | ---- | ||
+ | ==== Configure log files ==== | ||
+ | |||
+ | Edit ''/ | ||
+ | <code nginx> | ||
+ | access_log / | ||
+ | error_log / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ==== Purge log files ==== | ||
+ | |||
+ | == Cleaning compressed log files == | ||
+ | <code bash> | ||
+ | sudo find /var/log -name ' | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Set hostnames ==== | ||
+ | |||
+ | <code bash> | ||
+ | sudo hostname HOSTiD | ||
+ | sudo hostnamectl HOSTiD | ||
+ | </ | ||
+ | |||
+ | Edit ''/ | ||
+ | |||
+ | <code bash> | ||
+ | hostid.mydomain.com | ||
+ | </ | ||
+ | |||
+ | ---- | ||
==== Enable SSH ==== | ==== Enable SSH ==== | ||
Line 77: | Line 160: | ||
</ | </ | ||
+ | === Time stamp prompt === | ||
+ | |||
+ | Edit '' | ||
+ | |||
+ | <code bash> | ||
+ | if [ " | ||
+ | PS1=' | ||
+ | else | ||
+ | PS1=' | ||
+ | fi | ||
+ | </ | ||
+ | |||
+ | Save and load '' | ||
+ | |||
+ | <code bash> | ||
+ | source ~/ | ||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 419: | Line 520: | ||
---- | ---- | ||
+ | |||
+ | |||
+ | |||
+ | ===== Install Services ===== | ||
+ | |||
+ | ==== Nextcloudโข ==== | ||
+ | |||
+ | [[os_nextcloud|Nextcloud 101]] --- Nextcloud user's Guides | ||
+ | |||
+ | ---- | ||
===== Upgrade & Maintenance ===== | ===== Upgrade & Maintenance ===== |