Something Different In Linux

    Previous Next

      Resize root Volume on AWS Linux Instance

      Posted by Rishikesh Vispute Categories: aws

      I have created a new CentOS Linux instance. I had selected 50GB of root volume during creating of instance but when system comes online it was showing only 8GB of disk is usable. I tried to resize root disk using resize2fs, I get the following message root@tecadmin [~]# resize2fs /dev/xvda1 The filesystem is already 16775167  [ Read More ]

      script to change hostname for AWS instance

      Posted by Rishikesh Vispute Categories: aws

      If you want to set the public DNS as a hostname to the AWS linux  server then you can set it by using following scripts. The default public DNs for the AWs instance in the format “” and when we create the instance from AWs then it set internal hostname for the server. We can  [ Read More ]

      MySQL server has gone away

      Posted by Rishikesh Vispute Categories: Uncategorized

      Error :MySQL server has gone away Solution: If you get MySQL server has gone away when using MySQL ODBC driver then you need to add the following variables into my.cnf file1 1) Open /etc/my.cnf file and add the following variable max_allowed_packet= 64M wait_timeout= 6000 2) Restart Mysql service /etc/init.d/mysqld restart  

      Hello, You can get the some more information about the Essential Linux Interview Questions  on the URL :

      Host in India an initiative by

      Posted by indianwebportal indianwebportal Categories: indianwebportal

      If you are someone who has been experiencing problems with the loading speed of your website and have been noticing a decline in website visitors, then one reason behind that could be the hosting location. Yes, the hosting location of your website plays a crucial role in determining the speed and fluency with which the  [ Read More ]

      How to find the IP address of an amazon EC2

      Posted by Rishikesh Vispute Categories: aws

      Question : How to find the IP address of an amazon EC2 by using linux command Ans : If you run “ifconfig –a” on an amazon ec2 instance (linux), it will give you the internal IP address, which is not accessible from outside world. Here is a way to get the public and private IP  [ Read More ]

      Increase Swap Space to Amazon EC2 Linux

      Posted by Rishikesh Vispute Categories: aws

      Type the following command with count being equal to the desired block size: dd if=/dev/zero of=/extraswap bs=1M count=4024 Setup the swap file with the command: mkswap /extraswap To enable the swap file immediately but not automatically at boot time: swapon /extraswap To enable it at the boot time, add the following entry into /etc/fstab: /extraswap  [ Read More ]

      We can set the cron to restart the server when it was down or not running. You can use following script to detect and restart the httpd,ngnix,Serv-U or any other services. 1) Create the file vi /root/ and add the following code and save it. You can replace the Serv-U with any your service like  [ Read More ]

      Question : My application is hang and also df command hang after NFS server is down or not responding ? Ans : If you have mounted the NFS disk on your server and if NFS server is down or not responding then client machine hang or the application which uses that NFS disk is hang .  [ Read More ]

      How to check NFS mount point by using the script ? Ans : If you we have mounted the NFS directory one or  more servers and you want to monitor that mount point then you can use the following method. 1) Check the mount point directoy name, in the following example the mount directory name  [ Read More ]

      linux system administrator interview questions and answers

      Posted by indianwebportal indianwebportal Categories: indianwebportal

      1. How to check Gateway and net mask?? Ans. netstat -ar 2. RSYNC command executed, got error while copying, again the command initiated, whether the file copies from 1st and incremental. Ans:- The rsync command is incremental copy(check the files with destination and copies rest of the part). 3. In RAID 5, two disks are  [ Read More ]

      Linux interview questions 1

      Posted by indianwebportal indianwebportal Categories: indianwebportal

      Linux and Unix System Administration Interview Questions 1)  What is GRUB GNU GRUB is a Multiboot boot loader. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. Briefly, a boot loader is the first software program that runs when a computer starts. It is responsible  [ Read More ]

      Q. How to run bash script from local machine to remote linux machine ? Ans : We can run the bash script from our local machine to remote machine without login to remote server. We will get the result of some commands on our local machine. The syntax of this command is ssh [user]@[server] ‘[command]’  [ Read More ]

      The following script is used to  start mysql automatically when it is failed or stopped on the server. You can set 2 min cron “*/2 * * * * /bin/sh /root/” and it restart the mysql automatically. ============================ #!/bin/bash #Checking whether MySQL is alive or not if mysqladmin ping | grep -q “alive”; then echo “MySQL is  [ Read More ]

      You can use the following script to auto restart the nginx on the server. The following script check the status and if it is down then it restart. You can set cron  “* * * * * /bin/sh /root/” ========================== #! /bin/sh set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC=”nginx daemon” NAME=nginx DAEMON= /usr/sbin/$NAME SCRIPTNAME=/etc/init.d/$NAME test -x $DAEMON || exit  [ Read More ]

      daily mysql databases backup on cpanel server

      Posted by Rishikesh Vispute Categories: cpanel, mysql, Uncategorized

      Question: How to back up MySQL databases using cron jobs on cpanel server ? Ans: You can take the mysql backup of all databases for last 10 days and keep on the server.  You need to add the cron to create the daily mysql backup of all the databases. The backup is stored in the folder  [ Read More ]

      Popular Posts

      remove index.php fro

      How to remove index.php from url in magento Ans : If you ...

      PHP-Java bridge on p

        What is php-java bridge? The php-java bridge is the php ...

      Set expiration for y

      If you want to set the expiration to your site ...

      Warning: Parameter 1

      Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

      domain pointing to e

      If you domain uses external MX record and it is ...