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

MySQL is a relational database management system, used for storing data in form of tables and records. You can insert, modify or retrieve data using SQL statements or programming languages. It allows us to create new users and grant permissions on tables of the database. As a good practice always use a separate user for all databases. This will ensure that the application can’t access other application’s databases. The purpose of this tutorial is to create a new user in the MySQL server and grant permissions on databases. This tutorial includes instructions to create users, grant permission on all tables…

Read More

Postfix is fast and popular SMTP server widely used. The main job of postfix is to relay mail locally or to the intended destination outside the network. Some of the most popular SMTP servers are Sendmail, Postfix, and Qmail. By default, Sendmail comes pre-installed with CentOS/RHEL 5. We will need to remove it and install Postfix. You may also like: Install Postfix on Ubuntu Step 1 – Install Postfix If Postfix not already installed on your machine, Install it using the following command. Also, remove sendmail if already installed. yum remove sendmail yum install postfix Make postfix as default MTA…

Read More

Links or Symbolic links are a special type of file that contains a reference to another file or directory. In a simple word, A single file or directory accessible from two or more locations. There are two types of symbolic links can be created, Soft Link and Hard Link. Difference Between Soft Links and Hard Links Here is some key differences between soft links and hard links as follows: Soft Links 1. Soft link files use a different inode number than the main files. 2. The soft link becomes un-useful if source file gets deleted. 3. Soft links can be…

Read More

Some times we required to secure a single url or few specific urls in our site, and all other site url keep remain with public access. This is very easy to manage with are using directory and file structure in sites. But some of framework like cakephp work on routing structure which is different from directory structure, we can’t secure it on directory level. This article will help you secure specific url in Apache. For example a site has a secure area like http://example.com/admin/” and we need that only the authorized users or ips can access /admin/ section. 1. Setup…

Read More

Sometimes SQL Server logs files acquire a large space on the disk. In that case, we need to reduce the size of the log file to claim some space. But truncating or reducing database log file in SQL Server 2008 can be quite difficult. It also has its own issues. This article contains a set of commands to Shrink Log Files of SQL Server database. Generally this command is I prefer to take a backup of the database before executing below command for a safer side Shrink SQL Server Transaction Log Files First of all, check the actual name of…

Read More

Linux provides a number of tools for network configuration. Most important network settings for you Linux machine to access over network are IP configuration Device activation DNS configuration Default gateway 1. Default Network Configuration Files: Default linux interfaces configuration file exists in /etc/sysconfig/network-scripts/ named ifcfg-ethX ( ‘X’ is replace with number 0,1 or 2 etc ). /etc/sysconfig/network : is global configuration file NETWORKING = yes HOSTNAME = server1.tecadmin.net GATEWAY = 192.168.10.1 /etc/sysconfig/network-script/ifcfg-ethX : is Ethernet configuration file so assign ip address, netmask on interface. /etc/resolv.conf : DNS servers ip addresses are specified in this file. /etc/hosts : Is used for…

Read More

RPM (RedHat Package Manager) is a package management system for RHEL based systems. You may have seen that all the packages in Redhat based systems have extension .rpm. This tutorial will help you to how to create RPM for your own script I had created a script to take database backup, Today I have created an RPM file of that script, This is my first RPM created ever. Below are the steps which I follow to do it. Step 1 – Install Required Packages First of all, you need to install the required packages on your system to create rpm…

Read More

HAProxy Stats provides a lot of information about data transfer, total connection, server state etc. After installing HAProxy if you want to view HAProxy stats in your web browser, You can easily configure it by making few changes in your HAProxy configuration using following steps. Step 1 – Enable HAProxy Statics You can enable statics in haproxy server. To enable stats edit your HAProxy configuration file and add below entry after the defaults section. listen stats 192.168.10.10:1936 mode http log global maxconn 10 clitimeout 100s srvtimeout 100s contimeout 100s timeout queue 100s stats enable stats hide-version stats refresh 30s stats…

Read More

Hi Guys, If you want to add a line in file at specific line number through script. Below examples will help you to do it. For example you have a file named file1.txt, file content are as below. [email protected]:~ # cat file1.txt tecadmin 1 tecadmin 2 tecadmin 4 Now you required to add text “tecadmin 3” at line number 3, use below command [email protected]:~ # sed ‘3itecadmin 3’ file1.txt > file1.txt.tmp Above command will create a new file file1.txt.tmp with expected output [email protected]:~ # cat file1.txt.tmp tecadmin 1 tecadmin 2 tecadmin 3 tecadmin 4 Replace origin file with tmp file…

Read More

Being a system administration you have all responsibilies to maintain your systems. System admin is a person having good knowledge about operating systems and applications, as well as hardware and software troubleshooting. Many of reponsibilies vary from organization to organization. Basic responsibilities of system administrator’s typically include: 1. User account management. Creating new users and groups. Configure security policies. Changing user password on regular interval. Analyze user security pocily on regular time interval. 2. Data backup and recovery. A good system admin always have data backup policy with him, Also have recovery policy. Check day to day your backups are…

Read More