≡ Menu

CentOS

How to add an extra second hard drive on Linux LVM and increase the size of storage

I have 250GB disk installed on my home Linux server. I just bought a brand new 250GB SATA disk and I want to add a new disk to my existing LVM volume to increase its size total size to 500GB. How do I add a disk to LVM and extend an LVM volume on Linux operating system?
[click to continue…]

How to create a new config file in Ansible playbook

I wanted to create a file named /etc/apt/apt.conf.d/1000-force-ipv4-transport with the value set to ‘Acquire::ForceIPv4 true;’ on 20 cloud servers hosted in AWS. I already setup Ansible playbook to automate stuff. How do I create a new file using Ansible playbook? Is it possible to create a complex file with many lines of text (say squid.conf) using Ansible IT automation tool?
[click to continue…]

How to disable ssh password login on Linux to increase security

I want to disable ssh clients from accessing using the password and only allow ssh login using SSH keys. How do I disable password authentication for SSH on Linux operating systems?
[click to continue…]

How to add disk image to KVM virtual machine with virsh command

How do I add additional disk storage to a guest operating system to KVM virtual machine with virsh command on Linux operating system?
[click to continue…]

How to rename KVM virtual machine (VM) domain with virsh command

How do I rename KVM-powered virtual machine from foo to bar using virsh command line option on Linux?
[click to continue…]

How to clone existing KVM virtual machine images on Linux

I wanted to clone my Debian or Ubuntu Linux KVM VM for testing purpose. How do I clone existing virtual machine images under KVM?
[click to continue…]

How to rename LXD / LXC container

How do I rename an LXD managed LXC container under a Linux operating system?
[click to continue…]

PHP Fatal error: Call to undefined function curl_init() in /home/httpd/a/includes/functions.php(1)

I setup a LEMP (Linux, Nginx,MySQL, PHP ) stack. But, getting the following error in /var/log/nginx/error.log file:
    PHP Fatal error: Call to undefined function curl_init() in /home/httpd/a/includes/functions.php(1)
How do I solve this problem on Linux server?
[click to continue…]

How to configure Nginx for WordPress permalinks

I switched from Apache to Nginx web server. How do I configure permalinks under WordPress blog?
[click to continue…]

How to open a file in vim in read-only mode on Linux/Unix

I need of opening necessary files in reading (read-only) mode to avoid accidental editing of files such as /etc/resolv.conf or a large config or programming file on a production server. How do I open files in read-only mode in vim text editor on Linux or Unix-like system?
[click to continue…]