debian_common

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
debian_common [2019/05/27 09:12] โ€“ [Upgrade php 7.x] Jรบne Parkdebian_common [2019/06/23 15:11] โ€“ [Delete unnecessary files regularly] Jรบne Park
Line 330: Line 330:
 ---- ----
  
-==== Delete unnecessary files regularly ====  
-''sudo crontab -e'' Add command line to find & delete. e.g.) Delete all ''.nfo'' file in target directory and its sub-directories at 30 minutes past every 6 hours.  
- 
-<code bash> 
-  30 */6 * * * /usr/bin/find /..((your path)).../ -name '*.nfo' -exec rm -f {} \; 
-</code> 
- 
-Delete empty directory at 30 minutes past every 12 hours  
- 
-<code bash> 
-  30 */12 * * * /usr/bin/find /..((your path)).../ -type d -empty -delete 
-</code> 
- 
----- 
  
 ==== Delete all files except for desired file types ====  ==== Delete all files except for desired file types ==== 
Line 427: Line 413:
 </code>  </code> 
    
 +
 +----
 +===== Nginx repository ===== 
 +
 +Install the prerequisites:
 +
 +<code bash>
 +sudo apt install curl gnupg2 ca-certificates lsb-release
 +</code> 
 +
 +To set up the apt repository for stable nginx packages, run the following command:
 +<code bash> 
 +echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
 +    | sudo tee /etc/apt/sources.list.d/nginx.list
 +</code> 
 +
 +If you would like to use mainline nginx packages, run the following command instead:
 +
 +<code bash> 
 +echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
 +    | sudo tee /etc/apt/sources.list.d/nginx.list
 +</code> 
 +
 +Next, import an official nginx signing key so apt could verify the packages authenticity:
 +
 +<code bash> 
 +curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
 +</code> 
 +
 +Verify that you now have the proper key:
 +
 +<code bash> 
 +sudo apt-key fingerprint ABF5BD827BD9BF62
 +</code>
 +
 +The output should contain the full fingerprint ''573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62'' as follows:
 +
 +<code txt> 
 +pub   rsa2048 2011-08-19 [SC] [expires: 2024-06-14]
 +      573B FD6B 3D8F BC64 1079  A6AB ABF5 BD82 7BD9 BF62
 +uid   [ unknown] nginx signing key <signing-key@nginx.com>
 +</code> 
 +
 +To install nginx, run the following commands:
 +
 +<code bash> 
 +sudo apt update
 +sudo apt install nginx
 +</code> 
  
 ---- ----
  • debian_common
  • Last modified: 2024/04/18 08:58
  • by Jรบne Park