This is the series of articles about how to setup free own mailserver on OCI.
- Free Mail Server on OCI – Oracle Cloud Account
- Free Mail Server on OCI – Your Domain Name
- Free Mail Server on OCI – IPv4 Address, PTR
- Free Mail Server on OCI – Data Block Volume
- Free Mail Server on OCI – Virtual Cloud Network
- Free Mail Server on OCI – Compute Instance
- Free Mail Server on OCI – Swapfile
- Free Mail Server on OCI – Firewalld, OCFS2
- Free Mail Server on OCI – Docker, Cron, Certbot
- Free Mail Server on OCI – Docker-Mailserver
Swapfile
Even if you have great amount of memory allocated to your VM instance, it is still advised to create a swapfile and mount it to your VM.
For VM instances with 16GB of memory or more it is advised to create at least 4GB of swapfile, I have only 12GB of memory but I still think 4GB of swapfile will be beneficial. Run the following commands:
# Create swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=4000 status=progress
# Change the CHMOD for swapfile
sudo chmod 0600 /swapfile
# Make SWAP
sudo mkswap /swapfile
# Enable SWAP
sudo swapon /swapfile
# Add the SWAP record to FSTAB
echo "/swapfile swap swap defaults 0 0" | sudo tee -a /etc/fstab
# Remount FSTAB
sudo mount -a
If everything went OK, by running the free
command you should see your SWAP (bottom line):
ubuntu@mailserver:~$ free
total used free shared buff/cache available
Mem: 12226604 238280 11296260 4484 692064 11790644
Swap: 4095996 264 4095732
Let’s configure OCFS2, more details you can read on official Oracle documentation (this page, and this page). Follow this article.
Leave a Reply
You must be logged in to post a comment.