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..

Virtual Hosting provides us to host multiple domains (websites) on a single server. It is a concept of resource sharing among multiple hosting accounts. The best use of Virtual hosting is shared hosting servers, where multiple users can host multiple websites on a single server. This blog post will help you to create virtual hosts in the Tomcat web server. Setup Details Here are the basic setup details used in this article: A Linux host with IP address 192.168.1.100 Running the Tomcat server on the host on port 80 Deployed two sample applications, the first application is configured at http://192.168.1.100/myapp1…

Read More

SCP (Secure Copy) is a command line tool for Linux systems for securely transferring files from a remote server to the local system or vice versa. SCP uses SSH protocol for transferring files between two systems which is more secure than FTP. SCP command required the password of the remote system. In case you need to configure scp command in script and run with scheduler, you need to configure key based ssh login. Use the following command to copy the folder from remote to local recursively scp -r [email protected]:/path/to/folder /path/to/local In case, SSH is running on a different port, use…

Read More

Question – How to remove extra spaces from a string using JavaScript? A space (” “) character is used to separate two words. Some times we get the extra spaces in a string, which may case issues with your application. JavaScript trim() function is used for removing leading (before) and trailing (after) spaces from a string. This tutorial will help you to remove extra spaces from a string using JavaScript function. Remove Spaces with JavaScript trim() Function For the example, assign a string with spaces to a variable. Then use JavaScript trim() function to remove leading and trailing spaces from…

Read More

phpMyAdmin is the most popular web application for managing MySQL database servers. Many users also used it to access databases of production environments. In that case, security is a major concern. Providing root account access of phpMyAdmin can be harmful to your database server. So we recommend using non-root accounts for acceding databases. This tutorial will help you to completely disable root login in phpMyAdmin. Disable root Login in phpMyAdmin First of all, find the phpMyAdmin directory location as per your installation. Generally, it is installed under /usr/share/phpmyadmin directory. In some cases, the configuration file may be located under the…

Read More

The ASPState database is used by Microsoft’s ASP.NET Session State Service to store session data. By default, session state service stores its data in an in-memory cache. If you want to persist session data across multiple web servers in a web farm or you want to recover session data in case of application crashes or restarts, you should consider storing your session state in an ASPState database in SQL Server. Prerequisites A version of SQL Server (2008 or later). The ASP.NET Session State Service should be installed on your server. This service comes with ASP.NET and is installed automatically when…

Read More

We can use an internal field separator (IFS) variable to parse an array. Let’s use an example script, where first we define a string with colon-separated. Then we will use IFS to separate values based on a delimiter.

Let’s execute this script and check for results. ./myscript.sh Output: orange grapes banana apple

Read More

Command SNAME=$(basename “$(test -L “$0” && readlink “$0” || echo “$0″)”) While running a bash script using Linux terminal the script name can also passed as argument at $0. but if we are using full path of script to execute, it will show full path as results when print value of $0. So use above command will exactly provide only script name. It also handle if you are running any bash script using symbolic link. Example: Create a script named test.sh and add following content in script. #!/bin/bash SNAME=$(basename “$(test -L “$0” && readlink “$0” || echo “$0″)”) echo “Your…

Read More
DNS

MX records in DNS are used to route emails to correct mail servers and properly send to correct destination server. If you are using Google apps account for hosting email accounts on Google servers for your domains, then you need to add following MX records in your domains DNS configuration. Google Apps MX Records: @ IN MX 1 ASPMX.L.GOOGLE.COM @ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM @ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM @ IN MX 10 ALT3.ASPMX.L.GOOGLE.COM @ IN MX 10 ALT4.ASPMX.L.GOOGLE.COM

Read More

Generally Ubuntu users used Synaptic Package Manager for GUI and apt package manager for command line for installing packages. But not all latest application’s provides pre compiled packages for system, In that case you need to compile it using source code for installing application on your system. This article will help you for installing packages using source archive on Ubuntu systems. Prerequisites Before working with the compilation of source package, First we need to prepare our system with requirements for compilation. $ sudo apt-get install apt-file autoconf build-essential checkinstall Extract Source Package Firstly download the source archive on your system…

Read More

Command: md5sum myfile.php > myfile.php.md5 Above command will generate md5 checksum of file myfile.php and store in file myfile.php.md5. myfile.php.md5 can be used to verify integrity of file anytime. Generate MD5: If we want to generate md5sum of a file named index.php. Use the following command to do it and store generated md5 value of file in index.php.md5 file. # md5sum index.php > index.php.md5 Verify MD5: Now in future we can use index.php.md5 to verify integrity of file using following command. This command will show output as OK or FAILD. # md5sum -c index.php.md5

Read More