Replace old text with new text Linux Command
[root@srv01 demo]# grep -rl ‘from test old’ . | xargs sed -i ‘s/from test old/from test new/g’
Making the following update to your Nginx .conf file will prevent your website from being accessed directly by it’s IP address You’ll need to create a new server block and configure it such that any requests to the servers IP address will instead be redirected to the domain name. Now, when a request is made…
How to Install Nginx, MySQL, PHP (LEMP) Stack on CentOS This guide will help you install Nginx, MySQL, PHP (LEMP) Stack on CentOS machine i.e. Server. LEMP is a software stack comprised of Nginx as Web Server and MySQL as Database server along with PHP as the dynamic content processor for websites. LEMP term is…
OpenVZ useful commands Here is the list of some useful OpenVZ commands which should be run from the main node : 1. To fetch the consumption of disk for each container in the node along its it’s hostname and ctid vzlist -H -o veid,hostname,diskspace | awk ‘{ printf(“%d\t%s\t%.2f GB\n”, $1, $2, $3/(1024*1024))}’ 2. To…
I am getting an error message that read as follows: rmdir: failed to remove ‘trip-pictures’: Directory not empty How can I remove non empty directory in Linux using the cli? There are two commands that one can use to delete non empty directories in Linux operating system: rmdir command – Delete directory only if it…
Have a website which needs Node.js to work and have no idea how to install it on your Server? No Problem, this guide will how you how you can install Node.js on your Server with CentOS Machine. Requirements Server with CentOS 6/7 Root Access to Server Procedure Login to Server using SSH Add Node.js repo…
Disk Extend EXT2/3/4 and XFS root partition without LVM Looking for steps to grow your KVM VM/Container’s partition after extending root OS size or extending ext2/3/4 and XFS root partition without LVM at runtime. Steps to extend root partition without LVM are quite easy and can be followed without going into many technical details. This…