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

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

Sometimes we need to insert a line at middle of the existing file. You can add line at specific line number using Linux command line or shell scripts. In this tutorial, we will discuss about adding a text line at middle of file as specific line number. Let’s have an example, I have a text file named file1.txt with following content: cat file1.txt this is line one this is line two this is line three Now I have to insert text “HelloWorld” at the line number 3. To do this run the following command. sed -i ‘3iHelloWorld’ file1.txt Details of…

Read More

Being a system administrator you have all responsibilities to maintain your systems. A system admin is a person having good knowledge about operating systems, networking and applications. Also he must have some primary knowledge about system hardware and software. The responsibilities also varies based on location, organization and infrastructure. Primary Responsibilities of A System Administrator Being a Linux/Windows/Cloud Administrator your primary responsibilities are: User account management. Creating new users and groups. Configure security policies. Changing user passwords at regular intervals. Analyze user security pocily on regular time interval. Data backup and recovery. A good system admin always has a data…

Read More

Being a system administrator, we always need to keep our systems up to date with latest packages. Its difficult to go to server daily and check for available packages. For the same we can use yum-updatesd service to get email notifications to our mailbox or we can also configure this service to update any packages automatically when available. Yum-updatesd can be configured with few easy steps given below. You may also need to install top yum repositories provided latest packages. Step 1: Install/Update yum-updatesd Package By default this package installed on system installation time. So should just update this package…

Read More

As a system administrator, you need to take backup on daily basis. Backups are very useful to recover data from any crashes or corruption. I have written a simple script to take database backup from MySQL server and upload it to FTP server. Being a system administrator, I recommend keeping a remote copy of your every backup. You can also try our new advance script for MySQL databases backup and upload to remote locations. Create a shell script file and copy the below script. Then update all the required values and execute.

Setup Details – Edit the above script…

Read More

Security of data and server from hackers is a main task of system administration services. Below is few basic security tips for your linux server. 1: Strong Password Policy Making strong passwords is first stage of securing your server. Do not use common names as your password like yourname, date of birth, mobile number etc. Passwords should be alphanumeric with upper and lower case letters. You can use password aging policy on your linux machine to enforce users to change there password on regular interval. Example: To get password aging information # chage -l username To change password aging information…

Read More

Q. How to reset MySQL root password in Linux? How do I recover MySQL root password? I forgot MySQL root password, steps to change MySQL root password? How to reset MySQL root password using the command line. How to reset forgotten MySQL root password on Linux? How to reset MySQL 5.7 root password? MySQL is an open source database software widely used for data storage. Sometimes we forgot MySQL root password. So don’t be panic, This tutorial will help you to reset MySQL root password with simple steps. Reset MySQL Root Password Start MySQL in Safemode – First of all,…

Read More