Intro
My server’s almost up. Renewed it last year, but this year, with all the deals popping up, renewing felt a bit pricey. After checking out some smaller server providers, I saw Alibaba Cloud offers discounts if you’ve been bill-free for 12 months. Since I was already looking at big names, Oracle popped into my head.
Figured I’d give it a shot. Used all my real info, and it actually got approved directly. Sweet!
But then it hit me: the last time I tinkered with a server was back in 2023. Two years zipped by just like that. Time flies, huh?
Oracle Linux
When creating the image, I found my preferred Debian wasn’t an option, so I decided to try Oracle Linux. Turns out, this thing comes with MySQL pre-installed (I’m a bit of a host minimalist with Docker, lol). Not only that, it takes up a ton of resources. For a free 1C1G instance, it just lagged out. Had to switch images.
Oracle Linux Usage Log
First, an upgrade. Seeing the dnf command actually reminded me of my Fedora days.
| |
Then I spotted MySQL in the upgrade list. Server was bogged down, so I planned to uninstall it. First, check MySQL service status.
| |
Service is running, so stop it first.
| |
Disable autostart on boot.
| |
Uninstall.
| |
Even after that, software upgrades were still slow. For Docker installation, refer to: https://oracle-base.com/articles/linux/docker-install-docker-on-oracle-linux-ol8
CentOS7 Software Update
First, change the repos. Oracle’s CentOS7 actually had a broken software list. Running sudo yum update threw an error:
| |
Update the software list.
| |
Then, update the software.
| |
Reference: mirrorlist.centos.org no longer resolve?
Install Docker
Install tools.
| |
Configure official repo.
| |
Install.
| |
Start.
| |
Set to autostart on boot.
| |
Reference: Install Docker on CentOS7 (refer to official docs)
Server Port Management
Open common ports 80 and 443. First, check firewall status.
| |
Output Active: active (running) means it’s running. Check currently open ports (permanently open).
| |
Add open port.
| |
Reload to take effect.
| |
To remove a rule:
| |
Security Group Port Whitelisting
Server-side port configuration handles system access, but you also need to whitelist inbound ports in the security group.
Navigate to Instances - Networking - Subnet to manage the instance’s Subnet.
Manage specific security group lists under its Security tab.
Add Ingress Rules under its Security rules.
For Source Type, use CIDR. Enter 0.0.0.0/0 for Source CIDR. Use TCP for IP Protocol. Enter 80, 443 for Destination Port Range. Description is optional, enter HTTP/S.
Then just ‘Add Ingress Rules’.
Install Nginx-UI
While my previous article, Server Deployment Log with Docker , covered its specific use, new features have emerged with updates.
To allow other containers to control Nginx and for easier updates, new directories need to be mapped. So the docker-compose.yml now looks like this:
| |
The reason for mapping /var/run/docker.sock, as explained by Nginx-UI:
Nginx UI’s official image uses
/var/run/docker.sockto communicate with the host Docker Engine via the Docker Client API. This feature is used to control Nginx in another container and to perform container replacement rather than binary replacement during Nginx UI’s OTA upgrade, ensuring container dependencies are also upgraded. If you don’t need this feature, add the environment variableNGINX_UI_IGNORE_DOCKER_SOCKET=trueto the container.
Other Services
Looks like everything else I use can just continue as is. This migration felt super fast; most of the time was spent on server configuration itself.