Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
debian_common [2020/07/10 19:47] โ [Major LTS upgrade] Jรบne Park | debian_common [2024/03/13 06:44] โ [Watchlist for backup] Jรบne Park | ||
---|---|---|---|
Line 19: | Line 19: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
+ | * [[: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
Line 30: | Line 31: | ||
---- | ---- | ||
===== Initial steps ===== | ===== Initial steps ===== | ||
+ | |||
+ | ==== Watchlist for backup ==== | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | /var/www/* | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | **MariaDB** '' | ||
+ | **update-motd** | ||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | === 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/ / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Configure log files ==== | ||
+ | |||
+ | Edit ''/ | ||
+ | <code nginx> | ||
+ | access_log / | ||
+ | error_log / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ==== Purge log files ==== | ||
+ | |||
+ | == Cleaning compressed log files == | ||
+ | <code bash> | ||
+ | sudo find /var/log -name ' | ||
+ | </ | ||
+ | |||
+ | ---- | ||
==== Enable SSH ==== | ==== Enable SSH ==== | ||
Line 53: | Line 109: | ||
Append '' | Append '' | ||
- | === Enable colorful terminal === | + | ---ย |
+ | ย | ||
+ | === SSH Key to ED25519 === ย | ||
+ | ย | ||
+ | <code bash> ย | ||
+ | ssh-keygen -o -a 100 -t ed25519 -f ~/ | ||
+ | </ | ||
+ | ย | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | ย | ||
+ | ---ย | ||
+ | ย | ||
+ | ==== Enable colorful terminal | ||
Comment out **'' | Comment out **'' | ||
Line 62: | Line 132: | ||
</ | </ | ||
+ | === Time stamp prompt === | ||
+ | |||
+ | Edit '' | ||
+ | |||
+ | <code bash> | ||
+ | if [ " | ||
+ | PS1=' | ||
+ | else | ||
+ | PS1=' | ||
+ | fi | ||
+ | </ | ||
+ | |||
+ | Save and load '' | ||
+ | |||
+ | <code bash> | ||
+ | source ~/ | ||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 172: | Line 260: | ||
---- | ---- | ||
+ | === NO-IP with ddclient === | ||
+ | |||
+ | <code ini> | ||
+ | protocol=dyndns2 | ||
+ | server=dynupdate.no-ip.com | ||
+ | login=your_login_id | ||
+ | password=your_password | ||
+ | your_domain.com | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
=== Google Domains with API === | === Google Domains with API === | ||
Line 382: | Line 482: | ||
---- | ---- | ||
+ | ==== Configure locales ==== | ||
+ | <code bash> | ||
+ | sudo dpkg-reconfigure locales | ||
+ | </ | ||
+ | |||
+ | Deselect unused '' | ||
+ | |||
+ | ---- | ||
Line 435: | Line 543: | ||
Append additional source for php7.x latest, | Append additional source for php7.x latest, | ||
- | + | <code bash> ย | |
+ | sudo apt install software-properties-commonย | ||
+ | sudo add-apt-repository ppa: | ||
+ | </ | ||
<code bash> | <code bash> | ||
wget -q https:// | wget -q https:// | ||
- | echo "deb https:// | + | echo "deb https:// |
</ | </ | ||
+ | |||
+ | Append '' | ||
+ | |||
+ | <code bash> | ||
+ | sudo add-apt-repository ppa: | ||
+ | </ | ||
+ | |||
+ | Update source lists | ||
<code bash> | <code bash> | ||
Line 520: | Line 640: | ||
sudo apt install nginx | sudo apt install nginx | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Upgrade mariadb ==== | ||
+ | |||
+ | <button type=" | ||
+ | |||
+ | Select '' | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get install software-properties-common | ||
+ | sudo apt-key adv --fetch-keys ' | ||
+ | sudo add-apt-repository 'deb [arch=amd64, | ||
+ | </ | ||
+ | |||
+ | Once the key is imported and the repository added you can install MariaDB 10.5 from the MariaDB repository with: | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt update | ||
+ | sudo apt install mariadb-server | ||
+ | </ | ||
+ | |||
+ | Check service is working correctly and installed version. | ||
+ | |||
+ | <code bash> | ||
+ | sudo mysql -uroot -p | ||
+ | </ | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | < | ||
+ | # MariaDB 10.5 repository list - created 2020-08-31 04:34 UTC | ||
+ | # http:// | ||
+ | deb [arch=amd64] https:// | ||
+ | deb-src https:// | ||
+ | </ | ||
+ | |||
+ | If you need debug packages, add the debug component to your sources.list with: | ||
+ | |||
+ | <code bash> | ||
+ | sudo add-apt-repository 'deb [arch=amd64, | ||
+ | </ | ||
+ | |||
+ | MariaDB debug packages will now show up when searching for ' | ||
---- | ---- | ||
Line 639: | Line 803: | ||
</ | </ | ||
Both the standard output and standard error streams will be copied to the file while still being visible in the terminal. If the file already exists, the new data will get appended to the end of the file. | Both the standard output and standard error streams will be copied to the file while still being visible in the terminal. If the file already exists, the new data will get appended to the end of the file. | ||
- | |||
---- | ---- | ||
+ | |||