To update the DNS server that the operating system will refer to, please follow below easy steps
1. Edit /etc/resolv.conf. In this example I use nano text editor. If you do not have nano, you can install it by running "yum install nano -y"
# nano /etc/resolv.conf
2. Type in "nameserver" followed by a space, and followed by your DNS server ip address. Please remember that the sequence of the entry is important. So please put your primary DNS server on top of your secondary server in the /etc/resolv.conf. In this example, my primary DNS is 192.168.1.1 and my secondary DNS is 192.168.1.2
nameserver 192.168.1.1
nameserver 192.168.1.2
3. Save and exit. For nano, you can simply press Ctrl-x, y and Enter.
4. Check if you have added the configuration correctly
# cat /etc/resolv.conf
nameserver 192.168.1.1
nameserver 192.168.1.2
Friday, May 8, 2020
Update DNS Server Information on Linux CentOS 7
Thursday, May 7, 2020
Update Proxmox Network Configuration Without Restarting
In proxmox 6.1-7, if you make any changes to network configuration using the web interface, you either have to reboot the box, or press the "Apply Configuration" button to apply the changes. But the "Apply Configuration" button needs a package named ifupdown2 from proxmox repository to operate correctly.
So in order to make the button usable, so that we do not have to reboot the box every time we change proxmox network configuration, please follow below simple steps
1. Enable pve no-subscription repository, and disable proxmox default enterprise repository by referring here
2. Update proxmox package information
# apt update
3. Install ifupdown2
# apt install ifupdown2 -y
4. Now you can change any network settings in the proxmox web ui, and apply the configuration by pressing "Apply Configuration" button like below
Wednesday, May 6, 2020
Using Openvpn Client in Alpine Linux
Installing openvpn client in alpine linux is very easy. Just follow below command
Thursday, April 30, 2020
Run a Joomla CMS in Podman Pod
One of the special feature of podman over docker is, podman has the concept of pod. Pod is a feature to group containers together. One example is, is lets say we want to deploy a joomla stack. The stack can be deployed in a pod, so that the containers can be managed together, without having to operate on each single component of the stack.
To create a pod with port 8080 on localhost will be redirected to port 80 in a pod
$ podman pod create --name mypod --publish 8080:80
Next, create a container for database that belongs to our pod above
$ podman run -dit --pod mypod -e MYSQL_DATABASE=joomla -e MYSQL_USER=joomlauser -e MYSQL_PASSWORD=joomlapassword -e MYSQL_ROOT_PASSWORD=rootpw --name mariadb docker.io/library/mariadb
Check whether your mariadb container is ready, by viewing its logs
$ podman logs -f mariadb
After that create a joomla container. Since both the containers are in the same pod, joomla container can refer to mariadb with just 127.0.0.1 since both of them share the same network namespace in a pod
$ podman run -dit --pod mypod -e JOOMLA_DB_HOST=127.0.0.1 -e JOOMLA_DB_USER=joomlauser -e JOOMLA_DB_PASSWORD=joomlapassword -e JOOMLA_DB_NAME=joomla --name joomla docker.io/library/joomla
Similar to mariadb container, you can check whether your joomla container is ready by viewing its logs
$ podman logs -f joomla
Start a browser, and browse to http://0.0.0.0:8080. You should be able to access the joomla web interface. Continue with the installation using the web interface. Make sure you put 127.0.0.1 for the database host information in the web installer.
Saturday, April 25, 2020
Starting a Web Server using Podman
To start a web server using podman, in this case we are using nginx from docker repository, just run below command to start a webserver and expose it on port 8080 localhost
$ podman run -dit -p 8080:80 docker.io/library/nginx
Test our brand new web server
$ curl -s localhost:8080 | tail
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>