Author: Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Some time we need to remove empty lines from a file. Its can be done manually if file have few lines but if file have thousands of line this is hard to be done manually. Use one of following method to remove empty lines from a file. Method 1 – Using sed Sed is an stream editor. We can easily remove all blank lines using sed command. Use one of following sed command to remove blank lines from file. For example main.txt is your original file from which you need to remove blank lines. Below command will remove all blank…

Read More

Debugging is the process of finding and resolving bugs within a computer program. It provides a huge output at the runtime to analyze each part of the execution. Which helps to identify the root cause of any error in the script. In this tutorial, you will learn how to Debug a shell script on the Linux command line. We can debug a shell script in two ways. Either add the debugging instruction in the shell script by using “set -xv” or using -xv on command line while executing script. Adding Debug Instructions in Shell Script Let’s create a small script…

Read More

MAC-based filtering is useful for networks using DHCP to assign IP addresses to systems. As we know MAC is hard coded on NIC and can’t be changed but IP addresses assigned by DHCP may change on next IP assignment. This tutorial will help you to how to Configure Squid Proxy Server Mac Address Based Filtering. If you do not have Squid installed, Go to below link for installing squid on CentOS/RHEL/Fedora systems. Install and Configure SQUID Proxy Server on CentOS/RHEL Linux ACL rules are need to add in squid configuration file /etc/squid/squid.conf. Remember that squid Squid always applied first matching…

Read More

Squid is the most popular Proxy server for Linux systems. The squid proxy server is also useful for the web packet filtering. Most of the web hosting providers use the Squid proxy for caching the repetitive data to increase website speed. This article will help you to Install and Configure SQUID Proxy Server on CentOS, Redhat and Fedora Linux systems. Step 1 – Install Squid Squid packages are available in default yum repositories. Execute below command on your server to install SQUID proxy server. sudo yum install squid # On CentOS/RedHat Systems sudo dnf install squid # On Fedora Systems…

Read More

Openfire is a real time collaboration server. It uses XMPP protocol for instant messaging. This tutorial will help you to install and configure your won instant messaging server using Openfire and Spark. You can configure it to use in your LAN as well as over internet also. Step 1 – Prerequisites Before installing Openfire make sure you have java installed on your system. If you do not have Java installed use following tutorials to install Java on your system. How to Install Oracle JAVA 8 on Debian How to Install Oracle JAVA 8 on Ubuntu & LinuxMint How to Install…

Read More

Varnish is an Web accelerator used for content-heavy dynamic web sites. Its used as front-end caching server for web servers. This tutorial will help you to setup Varnish on your System. Step 1: Add Atomic Repository There are latest release available in Atomic repository in RPM format. For RHEL/CentOS 5: # rpm -Uvh http://www6.atomicorp.com/channels/atomic/centos/5EL/i386/RPMS/atomic-release-1.0-16.el5.art.noarch.rpm For RHEL/CentOS 6: # rpm -Uvh http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/atomic-release-1.0-16.el6.art.noarch.rpm Step 2: Install Apache and Configure Use following commands to install Apache on your system. # yum install httpd Configure Apache to work on port 82. Edit Apache configuration file /etc/httpd/conf/httpd.conf and change value of Listen from 80 to…

Read More

Google Two-Factor Authentication provides next level of security from hackers to SSH server. This article will help you to how to protect your SSH server with an two-factor authentication using Google Authenticator PAM module. Now Every time when you try to ssh to your server, you have to generate code using your phone or other devices go get login. Step 1: Setup Required Repository First we need to add RPMForge yum repository in your system. Add this repository using one of the following commands. CentOS/RHEL 6, 32 Bit (i686): # rpm -Uvh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm CentOS/RHEL 6, 64 Bit (x86_64): # rpm…

Read More

Issue: Today, I found that /tmp was showing 100% full but, After deleting all files from /tmp it was still showing full. After google it, I found that there are some file which deleted from /tmp folder but still used by process used all space. Generally these files used by apache or mysql. Use following command to check files # lsof | grep /tmp mysqld 3236 mysql 6u REG 202,5 0 2373 /tmp/ibZzBzJ8 (deleted) mysqld 3236 mysql 7u REG 202,5 0 2378 /tmp/ibfoQY3a (deleted) mysqld 3236 mysql 11u REG 202,5 0 2393 /tmp/ibz2IDcI (deleted) mysqld 3236 mysql 220u REG 202,5…

Read More

Error: Below issue generally comes with database incompatibilities with the current version of MySQL. It may happen due to MySQL server upgrade or downgrade. Error in query (1548): Cannot load from mysql.proc. The table is probably corrupted Solution: This issue may resolve by repairing mysql databse using following command. # mysqlcheck -r mysql proc -u root -p Enter password: mysql.proc OK In case you are still getting same error while accessing proc table, You need to execute mysql_upgrade command to fix issue. Read more about mysql_upgrade # mysql_upgrade -u root -p

Read More

While installing magento, if you face issue like below, This the is known issue Error: Exception printing is disabled by default for security reasons. Error log record number: xxxxxx Solution: Step 1. Go to /errors/ folder in magento document root. Step 2. Copy local.xml.sample as local.xml # cp local.xml.sample local.xml Step 3. Edit magento/lib/Zend/Cache/Backend/File.php file, Find and change cache_dir setting. From: protected $_options = array( ‘cache_dir’ => ‘null’, To: protected $_options = array( ‘cache_dir’ => ‘tmp/’, Step 4. Finally create tmp folder in magento document root # mkdir tmp/ Step 5. done

Read More