Sadržaj
CF i Google DNS i name servers: md-solutions.hr
CF nameserver keaton.ns.cloudflare.com paityn.ns.cloudflare.com
google DNS 8.8.8.8 8.8.4.4
litespeed +cyberpanel(ssl php versions cache etc) http server : https://computingforgeeks.com/install-and-configure-litespeed-web-server-on-ubuntu-debian/ ssl: https://openlitespeed.org/kb/ssl-setup/ https://bobcares.com/blog/openlitespeed-configure-ssl/ https://cyberpanel.net/docs/installing-cyberpanel/?utm_source=cyberpanel&utm_medium=website&utm_campaign=cloud_menu
Virtualmin: https://www.virtualmin.com/node/67871
Swap should not be seen as a replacement to physical memory. Since swap space is a section of the hard drive, it has a slower access time than physical memory. If your system constantly runs out of memory, you should add more RAM.
Generally, the size of the swap file depends on how much RAM your system has:
Systems with less than 2 GB RAM - 2 times the amount of RAM. Systems with 2 to 8 GB RAM - the same size as the amount of RAM. Systems with more than 8 GB RAM - at least 4 GB of Swap. Only root or user with sudo privileges can activate the swap file.
Creating a Swap File In this example, we will create 2 GB swap file. If you want to add more swap, replace 2G with the size of the swap space you need. Complete the steps below to add swap space on Ubuntu 20.04:
First, create a file that will be used as swap:
sudo fallocate -l 2G /swapfile Copy If the fallocate utility is not present on your system, or you get an error message saying fallocate failed: Operation not supported, use the following command to create the swap file:
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2097152 Copy Set the file permissions to 600 to prevent regular users to write and read the file:
sudo chmod 600 /swapfile Copy Create a Linux swap area on the file:
sudo mkswap /swapfile Copy Setting up swapspace version 1, size = 2 GiB (2147479552 bytes) no label, UUID=fde7d2c8-06ea-400a-9027-fd731d8ab4c8 Copy Activate the swap file by running the following command:
sudo swapon /swapfile Copy To make the change permanent open the /etc/fstab file:
sudo nano /etc/fstab Copy and paste the following line:
/etc/fstab /swapfile swap swap defaults 0 0 Copy Verify that the swap is active by using either the swapon or the free command, as shown below:
sudo swapon --show Copy NAME TYPE SIZE USED PRIO /swapfile file 2G 0B -1Copy sudo free -h Copy total used free shared buff/cache available Mem: 981Mi 97Mi 68Mi 0.0Ki 814Mi 735Mi Swap: 2.0Gi 10Mi 1.9GiCopy Adjusting the Swappiness Value Swappiness is a Linux kernel property that defines how often the system will use the swap space. It can have a value between 0 and 100. A low value will make the kernel to try to avoid swapping whenever possible, while a higher value will make the kernel to use the swap space more aggressively.
On Ubuntu, the default swappiness value is set to 60. You can check the current value by typing the following command:
cat /proc/sys/vm/swappiness Copy 60 Copy While the swappiness value of 60 is OK for most Linux systems, for production servers, you may need to set a lower value.
For example, to set the swappiness value to 10, run: sudo sysctl vm.swappiness=10 Copy To make this parameter persistent across reboots, append the following line to the /etc/sysctl.conf file:
/etc/sysctl.conf vm.swappiness=10 Copy The optimal swappiness value depends on your system workload and how the memory is being used. You should adjust this parameter in small increments to find an optimal value.
Removing a Swap File To deactivate and delete the swap file, follow these steps:
First, deactivate the swap space:
sudo swapoff -v /swapfile Copy Next, remove the swap file entry /swapfile swap swap defaults 0 0 from the /etc/fstab file.
Finally, remove the actual swapfile file using the rm command:
sudo rm /swapfile Copy Conclusion We have shown you how to create a swap file and activate and configure swap space on your Ubuntu 20.04 system.
Varnish install https://www.virtualmin.com/documentation/system/varnish
Composer install + Node JS https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04 https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-20-04
Run sudo apt-get install -y nodejs
to install Node.js 14.x and npm
You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn