Difference between revisions of "Server Administration"

From Rhomicom Wiki
Jump to navigation Jump to search
m (Admin moved page Web Hosting Services to Server Administration: Page is more about server administration than web hosting)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
=== SYSTEM LOGS ===
 
<syntaxhighlight>
 
<syntaxhighlight>
 
du -csh /var/log/*
 
du -csh /var/log/*
Line 5: Line 6:
 
nano /etc/systemd/journald.conf
 
nano /etc/systemd/journald.conf
 
service systemd-journald restart
 
service systemd-journald restart
 +
</Syntaxhighlight>
 +
 +
=== SWAPPINESS ===
 +
<syntaxhighlight>
 +
nano /etc/sysctl.conf
 +
vm.overcommit_memory=1
 +
vm.swappiness=80
 +
# restart server
 +
 +
grep processor /proc/cpuinfo | wc -l
 +
nano /etc/nginx/nginx.conf
 +
ulimit -n
 +
 +
# CREATE 4GB SWAP FILE
 +
sudo dd if=/dev/zero of=/swapfile bs=128M count=32
 +
sudo chmod 600 /swapfile
 +
sudo mkswap /swapfile
 +
sudo swapon /swapfile
 +
sudo swapon -s
 +
sudo vi /etc/fstab
 +
    /swapfile swap swap defaults 0 0
 +
 +
 +
nano /etc/sysctl.conf
 +
free -h
 +
sudo swapon --all --verbose