Login to Members Area

Choose the service you want to log in
     
24x7x365 Presence
1-888-289-2246
Live Chat

Hosting Blog

 

How to mount an NFS shared directory on the local Linux machine?

Many times in organizations, data is located on the server which employess/users need to access by mounting the network shared directory to the local system and then they can access the data located on the server.

So, first of all we need to find out the network shared directory by using the commands below:-

showmount -e Server-IP

showmount -e 192.168.27.200

Export list for 192.168.27.200:
/usrdata 192.168.27.200

After this, we'll need to mount the network shared directory to the local system as below:-

mount -t nfs 192.168.27.200:/usrdata /mnt

The command above will mount the network shared NFS directory to our local system and then we'll be able to access the data on the server as below:-

cd /mnt
ls -al

Then we'll see all the data which is accessible by the user in the /usrdata directory.

Sachin | Thursday 31 October 2013 - 07:33 am | | Default | No comments

MySQL Error 1129: Host 'xxx.xx.xxx.xxx' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

Read More

Abhishek | Tuesday 29 October 2013 - 9:08 pm | | Default | One comment

How to configure e-mail with IMAP/POP3 configuration in an Android device

Yes, you can configure your email in an Android device with IMAP or POP3 settings by following the steps below:

Step 1: Open your device's email application.

Step 2: If you already have an email account set up, press Menu and tap Accounts. Press Menu again and tap Add Account. Type your email address and password, and click Next.

Step 3: Then select the IMAP account, if you want to configure your email with the IMAP account.

Step 4: Then enter your IMAP server settings as below:-
username = email id
password = password of the email above
IMAP server = mail.domainname
Security Type = None
Port  = 143

Step 5: Then click on Next and enter the outgoing server settings :-
SMTP Server = mail.domainname
Security Type = none
Port = None
username = email id
Password = password
and click Next.

Step 6: Then you need to click on Next and this will check the login details and that's it.

This way you can configure your email account in Android devices.

Sachin | Tuesday 29 October 2013 - 07:01 am | | Default | One comment

Taking a backup of a MySQL table and restoring it

Use the command below to take a backup of only one table:

# mysqldump -u db_username -p mydatabase table1 > table1.sql

Use the command below to restore the table:

#mysql -u db_username -p mydatabase < table1.sql

Vimal | Monday 28 October 2013 - 08:05 am | | Default | No comments
Used tags: , , , ,

Steps to Reset the Database User Password from the Plesk Control Panel

Please follow the steps below:-

1. Login to the Plesk control panel.
2. Go to Domains.
3. Select the Domain.
4. Go to Websites and Settings.
5. Find the database there.
6. Go to the database user and reset the password.

Shubham | Monday 28 October 2013 - 04:57 am | | Default | No comments

What to do if a domain gets multiple IPs when viewed from iptools.biz or network-tools.com?

Read More

Abhishek | Sunday 27 October 2013 - 8:50 pm | | Default | No comments

How to delete a domain from the qmail server manually if H-Sphere fails

Login to the mail server where the domain was setup for mail services and run the command below:

$ ~vpopmail/bin/vdeldomain <domain>

Manoj | Friday 25 October 2013 - 9:08 pm | | Default | No comments

How to create links in an HTML document

Below is the code -

<a href="url">Link text</a>

For example - If you want the text JODOHOST linking to a website, write this code in an HTML file.

--------------------------------------------------------------------

<!DOCTYPE html>
<html>
<body>

<a href="http://www.jodohost.com" target="_blank">JODOHOST</a>


</body>
</html>

---------------------------------------------------------

OR if you want to send an email to someone and want that hyperlinked text displayed in the email also, like say in the Thunderbird email client while writing email then please select Insert > HTML and then paste the code:

<a href="http://www.jodohost.com" target="_blank">JODOHOST</a>

Now in that email JODOHOST will be written and when we click on it the website will open.

Akash | Wednesday 23 October 2013 - 8:45 pm | | Default | One comment

PhpMyAdmin stuck at its login screen with no errors?

Read More

Ved | Wednesday 23 October 2013 - 8:37 pm | | Default | No comments

How to force users to change their passwords after their first login in Linux

Please use the command below to insist that the user changes their password after their first login due to security reasons.


# chage -d 0 test

Vimal | Wednesday 23 October 2013 - 09:28 am | | Default | No comments

How to get information about block devices, FSs and UUIDs of the Linux machine

To get information about the available block devices on the Linux machine, we can use the command line interface utility 'blkid' which displays the information about the devices on the system with their file system type or universally unique identifier (UUID). For example -

=================================================
[root@#~]# blkid

/dev/sda1: UUID="a78e1f03-be53-4ff0-adf2-5b27837c0efe" TYPE="ext4"
/dev/sda2: UUID="f8be5ef0-1232-4d4e-a27c-0772593858cf" TYPE="swap"
/dev/sda3: UUID="d9525666-8c8b-49bb-af81-104bf1d60d4d" TYPE="ext4"
=================================================

That's it.

Sachin | Wednesday 23 October 2013 - 07:02 am | | Default | No comments

While adding a domain or sub-domain in the H-Sphere control panel, H-Sphere says "AntiSpam postmaster@domainname already exists" and does not create the domain?

Solution:-
 1. Un-select the include and activate options for AntiSpam in the specified plan.
 2. Now try to add the domain or sub domain.
 3. Now redo the changes you have made previously in the specified plan.

Read More

Abhishek | Tuesday 22 October 2013 - 9:21 pm | | Default | No comments

How to increase/decrease the upload limit for PHP in the Windows 2003/2008/2008 R2 server

We need to upload using the web interface on a PHP-based application sometimes. We have to set an upload limit by which we can allow a domain/directory to upload the file/image or anything from the web interface. We can do this using php.ini.

On the Windows 2003 server, we are able to set a custom php.ini file for a particular domain/directory but on the Windows 2008 server we are unable to do this for individual domain directories.

Here are the steps which we need to follow to set the upload limit for PHP at the server end:-

1.    Locate your php.ini file (can find it in the root drive under the PHP folder).
2.    Open the php.ini file in Notepad.
3.    Search or find the following "upload_max_filesize" (the maximum allowed size for uploaded files).
4.    Next to it write the value which you want to set which is by default 2 MB.
5.    Close and save php.ini.
6.    You may need to have an IIS reset to have the change reflected.

Note:- In Windows 2003, you will need to copy the original php.ini and paste the domain root for which you want to set the upload limit. And in Windows 2008/2008 R2, it works serverside.

In the same way we can also limit the ''maximum number of files that can be uploaded via a single request" for a PHP-based application. For this, please search "max_file_uploads" in php.ini instead of upload_max_filesize. By default this limit is 20.

Shubham | Tuesday 22 October 2013 - 07:48 am | | Default | No comments

How to fix the error: "Please reinstall the libcurl"

While compiling PHP with cURL support we get the error below:-

==========================================================================
checking for cURL support... yes
checking if we should use cURL for URL streams... yes
checking for cURL in the default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
==========================================================================

However, if we check libcurl is already installed on the server with the command below:-

yum list|grep curl

curl.x86_64                              7.19.7-37.el6_4                @updates
libcurl.x86_64                           7.19.7-37.el6_4                @updates
libcurl-devel.x86_64                     7.19.7-37.el6_4                @updates
python-pycurl.x86_64                     7.19.0-8.el6                   @anaconda-CentOS-201207061011.x86_64/6.3
libcurl.i686                             7.19.7-37.el6_4                updates
libcurl-devel.i686                       7.19.7-37.el6_4                updates

In this we have to make sure that the libcurl-devel package is installed on the server, if it is not then install it first as below:-

yum install libcurl-devel -y

and then try to re-compile PHP with cURL and it should be able to compile this time.

Sachin | Tuesday 22 October 2013 - 07:10 am | | Default | Two comments
Used tags: , , , , ,

DNS lookup optimization for the MySQL server: skip-name-resolve

To increase the MySQL server performance if there are many hosts and if DNS is slow, consider disabling DNS lookups with --skip-name-resolve or consider increasing the value of HOST_CACHE_SIZE define (default value: 128) and recompiling the server. These methods are very effective and improve the server performance a lot.

Sometimes, all connections to the database appear to be slow due to the DNS being slow. In such cases, conversions from IP addresses to the corresponding hostnames can be stopped by using the skip-name-resolve parameter. To disable DNS lookups the following line can be added in the my.cnf file:-

skip-name-resolve

Abhishek | Monday 21 October 2013 - 7:55 pm | | Default | Two comments

How to deal with a Hacking/Malware/IFrame notice from Google about your domain

First of all, please scan your local system with some good antivirus software as well as antimalware software and make sure you have no virus or malware on your system. Then you need to download all web data from the server and scan it with the antivirus and antimalware software. After that please make sure no unknown iframe, malicious script or code files are in your data. Then delete all data using FTP and reupload your scanned files. Also change your FTP user password after scanning for problems and update your Adobe software, as recent exploits have used Adobe Flash, Shockwave, and PDF Reader to steal passwords from users. Here are quick links to update your versions of Adobe software:

http://get.adobe.com/flashplayer/
http://get.adobe.com/reader/
http://get.adobe.com/shockwave

After cleaning up your site, report to Google Webmaster that your data has been scanned and that your data is now safe. Please see the link below for Google Webmaster:

http://www.google.com/webmasters/

1- Sign in to the webmaster tool.
2- Enter any of your Gmail account details.
3- Click on the Add a Site button.
4- Enter your website name and press enter.
5- Now, you need to verify that you are a site owner. Select any method from the verification method dropbox.
5- Follow the instructions for domain verification.
6- After verification, you will see a message like this "This site may be distributing malware. More details".
7- Click on More Details.
8- Click on Request a Review.
9- Select "I certify that I have removed badware or badware links from my site, according to StopBadware.org's Security Tips For Websites."
10- Click on Request a Review.

After that Google will review your web data again. If everything is good now, Google will remove your domain from the unsafe content distribution domain list. As per Google, the review can take up to 30 days but I have seen Google review websites within 24 hours of reporting. After this your domain will not show a red alert.

Shubham | Monday 21 October 2013 - 02:09 am | | Default | No comments

Steps to add another email account/address within your Gmail account

Please follow the steps below:-

1) Open Gmail.
2) Click the gear in the top right.
3) Select Settings >>> Open the Accounts tab.
4) In the Check mail from other accounts (using POP3) section, click Add a POP3 email account.
5) Write the full email address of the account you'd like to add and then click "Next Step".
6) Here you need to write your POP3 server address and port and then enter your password.
7) On the page that appears, you will get four options:-
a> Leave a copy of retrieved messages on the server.
b> Always use a secure connection (SSL) when retrieving email.
c> Label incoming messages.
d> Archive incoming messages.
8) Click "Add Account".
9) You will have the option of setting it as a custom From address. This will allow you to compose messages in Gmail, but have them appear to have been sent from your other email account.
10) Click "Yes" to set up a custom From address.

Shubham | Sunday 20 October 2013 - 10:55 pm | | Default | No comments

What is the binary of the Apache config test for H-Sphere-based web servers?

Read More

Abhishek | Sunday 20 October 2013 - 9:01 pm | | Default | No comments

How to set the password age for a user in Linux?

chage -M number_of_days username

# chage -M 30 test

In the above example, we see that the password for the user "test'' will expire after 30 days.

Vimal | Sunday 20 October 2013 - 08:26 am | | Default | One comment
Used tags: , , ,

How to stop autosubmission by spammers on webforms

Problem:- Nowadays many users complain about autosubmission on their webforms by spammers.

Solution:- You can use CAPTCHA and some security question validation to prevent bots from filling out your form. Also you could use an alphanumeric validation on that field which would prevent the "!" character.

Shubham | Sunday 20 October 2013 - 02:21 am | | Default | No comments

Steps to check traffic usage of end user accounts added under a H-Sphere reseller control panel

1- Login to your H-Sphere reseller account.
2- Go to your admin account.
3- On the plan page, you will see the option for Reports using the main menu.
4- Click on Reports >>>> Traffic Usages.
5- On the page that appears, you can select entries and click on the Submit button (you can check for a particular account and check datewise also) or do a blank search so you will be able to see all your user account usages.

Shubham | Sunday 20 October 2013 - 01:45 am | | Default | No comments

Joomla jos_session table crash?

Sometimes because the session wasn't properly closed and because it was stopped in some improper manner, we've seen that the Joomla jos_session table crashes due to which we cannot create any other new connection and due to which nothing, not the site, admin session, etc is open.

If you're facing such an issue then it has a very quick fix: you can repair the jos_session table using the MySQL tool or phpMyAdmin or the MySQL command line interface (if you know the root login of the server). The simplest way is to repair it using phpMyAdmin as follows :-

Step 1: Login into phpMyAdmin and click on the MySQL database name.
Step 2: Then click on the 'SQL Query' option and run the query below:-

repair table jos_session

and click on Go to execute that query.

Step 3: After getting the output 'Query executed successfully', you should be able to access the website and admin section of Joomla.

That's it, have fun.

Sachin | Friday 18 October 2013 - 05:01 am | | Default | No comments

Kernel Panic for Centos (kernel.2.6.32-358.18.1.e16)

Unable to mount the root partition?

Read More

Pratik | Thursday 17 October 2013 - 07:00 am | | Default | No comments

How to enable mod_expires and mod_headers on any H-Sphere controlled web server?

Read More

Abhishek | Wednesday 16 October 2013 - 8:17 pm | | Default | No comments

Steps to turn OFF the Secure Mode for ASP sessions in IIS 7/7.5

Below are the steps to turn OFF the secure mode for ASP sessions in IIS 7/7.5:-

1- Open the IIS Manager on the server.
2- Select domain/directory under 'Sites' and double click on the domain name.
3- After this, the domain settings section will be shown with the IIS section in it.
4- Under the IIS section, double-click on ASP and then you can see ASP properties.
5- In ASP settings, find the 'Session Properties' section and expand it.
6- In the 'Session Properties' section you can see 'New ID of secure connection'.
7- Select "False" from the drop down menu in front of "New ID of secure connection" and then click on the APPLY changes option which you can see on the top right side corner for that domain.

Shubham | Tuesday 15 October 2013 - 01:10 am | | Default | No comments

How to increase the upload limit for ASP in the Windows 2008 server with IIS 7/7.5?

Sometimes when we need to upload using the web interface on an ASP-based website, we must ensure that we set the upload limit or can set the 'Maximum Requesting Entity Body Limit' for that particular domain to some value upto which only we can allow an upload on the server.
Upto this limit only can the user upload the file/image or anything from the web interface.

Below are the steps using which we can set the upload limit:-

Step 1: Open the IIS Manager on the server.
Step 2: Select your domain under 'Sites' and double click on the domain name.
Step 3: After this, the domain settings section will be shown there with the IIS section in it.
Step 4: Under the IIS section, double-click on ASP and then you can see ASP properties.
Step 5: In the ASP settings, find the 'Limits Properties' section and expand it by clicking on the + sign in start.
Step 6: In the 'Limits Properties' we can see the 'Maximum Requesting Entity Body Limit' which is for the upload limit via ASP and can see the value for it in bytes which is set currently.
Step 7: For example, to set that limit to 20 MB we use the value in bytes as "20971520". Then again double click on the value and paste the value of 20 MB in bytes as 20971520 and then click on the APPLY changes option which we can see on the top right side corner for that domain.

That's it. Now the changes will be applied.

Sachin | Tuesday 15 October 2013 - 12:52 am | | Default | No comments

How to kill any specifc process on the Windows server through the command prompt

Go to the command prompt "cmd" of the server and then write the command below:-

-------------------------------------------------------------------------------------------

"Taskkill /F /IM XXXXX"

Here XXXXX is the process which you want to kill.
--------------------------------------------------------------------------------------------

The process will be terminated.

Shubham | Monday 14 October 2013 - 10:54 pm | | Default | No comments

Restricting a File or Directory using the Access Control List

ACL is the access control list for a specific file or directory. By default an ACL is associated with a directory and the files inside that directory inherit the ACL of the directory, if the files don't have any ACL set explicitly. With the help of ACLs we can control the access to files and directories.

To set the ACL, we can use the command below:-

setfacl -m <rules> <files>

For example:-

setfacl -m u:sachin:rw /home/somefile.txt

To remove the ACL from a file or directory, we can use the command below:-

setfacl -x u:sachin /home/somefile

Sachin | Monday 14 October 2013 - 10:46 pm | | Default | No comments

Checking admins and logins on the server through the command prompt

Go to the command prompt "cmd" of the server and then write the command below:-

-------------------------------------------------------------------------------------------

"Net localgroup administrators"

--------------------------------------------------------------------------------------------

This will show you the number of login sessions for the server quickly.

Pritam | Sunday 13 October 2013 - 8:45 pm | | Default | No comments

How to enable an SSH port other than 22

Read More

Abhishek | Sunday 13 October 2013 - 8:45 pm | | Default | No comments
Used tags: , , , , , , ,

Permission reset for files/folder on Windows

Please use the command below to reset permissions on the files/folder:

attrib -R -S XXXX\*.* /S /D

Here XXXXX stands for the complete file path with the file name.

Shubham | Sunday 13 October 2013 - 09:17 am | | Default | No comments

The delete command for hidden files on the Windows server

Please use the command below to delete hidden files:-

attrib -H -R -S "XXXXX"

Here XXXXX stands for the complete file path with the file name.

Shubham | Sunday 13 October 2013 - 09:11 am | | Default | No comments

Creating a nologin user in Linux

Sometimes we need to give FTP access to a user but we restrict him from logging into the system due to security reasons. 

Follow the command below to add a user "test" with no shell login access:

# useradd -s /sbin/nologin test

Vimal | Sunday 13 October 2013 - 08:50 am | | Default | No comments
Used tags: , , , , , ,

Error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Error:- Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

You need to place php.ini inside the domain folder and uncomment the line-

extension=php_mysql.dll

Manoj | Saturday 12 October 2013 - 9:15 pm | | Default | No comments

Steps to print the payment invoice from the H-Sphere control panel

Please follow the steps mentioned below to print the payment invoice from the H-Sphere control panel:-

1) Login to your H-Sphere panel.
2) Go to the billing menu > select the billing statement.
3) Click on the blue link of each statement and print the same by the Print icon available on the top of the box.

Shubham | Saturday 12 October 2013 - 08:47 am | | Default | No comments

How to suspend or resume a MySQL abusive user in the H-Sphere cluster?

Read More

Abhishek | Tuesday 08 October 2013 - 8:40 pm | | Default | No comments

Where to set the DNS settings in the Linux OS

To connect to the Internet from a Linux machine, we need to set the DNS for the Linux machine using the command line. We need to set up an entry in a file that is /etc/resolv.conf. Below is the way using which we can setup an entry:-

Step 1: Login onto the server using SSH.

Step 2:  Edit the file with your favourite editor:- 

vi /etc/resolv.conf

and then place the entry of the DNS as below :-

nameserver 8.8.8.8

nameserver 4.4.4.4

and then save the file.

That's all we need to do here for connecting to the Internet.

Sachin | Tuesday 08 October 2013 - 09:22 am | | Default | No comments

Command to recycle the application pools

To recycle the application pools, you need to run the command below on the command prompt:

appcmd list apppool /xml | appcmd recycle apppool /in

Dipesh | Tuesday 08 October 2013 - 09:11 am | | Default | One comment

Installing the Kartris CMS and getting "Error: Kartris is already installed"?

Read More

Akash | Monday 07 October 2013 - 9:16 pm | | Default | No comments

How to find block device attributes in Linux

Read More

Abhishek | Monday 07 October 2013 - 8:13 pm | | Default | No comments

How to check your disk space usage

Please follow the steps below to check your disk space usage:

1- Login to your reseller account by using https://cp.gohsphere.com.
2- Go to your admin account.
3- On the plan page, you will see the option of Reports from the main menu.
4- Click on Reports >>>> Disk usage.
5- On this page, you can select entries and click on the Submit button (can check for a particular account and datewise also).

Vimal | Monday 07 October 2013 - 06:43 am | | Default | No comments

File system check for bad sectors on a drive in Linux

Sometimes our disk has bad sectors or may have errors like an input-output related error or be in a read-only file system. At that time we can use e2fsck which is a file system check utility to check for bad sectors on the disk or to resolve other errors on the disk.

However, mostly we use a e2fsck utility when a drive is in a Read-Only file system or when we want to scan our hard disk for bad sectors.

To run e2fsck in a correct way is necessary, which should be like below:-

Step 1: It is always recommended to scan a file system in single-user mode. So first go to single-user mode.
Step 2: Unmount the partition on which you would like to run it.

[root@localhost ~]# umount  /dev/sda1

Step 3: After this run the e2fsck utility on the system as below:-

[root@localhost ~]# e2fsck -y -v -f /dev/sda2

-y = To auto access yes for all questions.
-v = Verbose mode output
-f = Forcefully

Once the file system check is completed, again mount the drive and then shutdown and start the Linux machine. That's all.

Sachin | Saturday 05 October 2013 - 07:36 am | | Default | No comments

PHP fatal error: the allowed memory size of 41943040 bytes is exhausted

Error Type:- PHP error

[04-Oct-2013 21:00:08] PHP Fatal error:  The allowed memory size of 41943040 bytes is exhausted (tried to allocate 1966080 bytes) in /hsphere/local/home/btkda/<domain>.com/wp-includes/SimplePie/Item.php on line 2736.

The application is running out of memory. You need to increase the php memory by placing the .htaccess file inside your domain folder with the string below or you need to make changes in the application code.

php_value memory_limit 60M

Manoj | Friday 04 October 2013 - 8:08 pm | | Default | No comments

Steps to add the domain manually in IIS 7.0/7.5

Please follow the steps mentioned below:-

1) Login to your server and then open the IIS manager.
2) Click on the Connections pane and right-click on "Sites" and then click "Add Web Site".
3) Write the name of your website in the box that appears.
4) Click Select if you want to select a different application pool than the one listed in the Application Pool box.
5) In the physical path box, type the physical path of the web site's folder.
6) Select the protocol for the web site from the Type list.
7) Select the IP address in the IP address box via the dropdown menu.
8) Click OK.

Shubham | Friday 04 October 2013 - 06:51 am | | Default | No comments
Used tags: , , , , , , , , ,

Check your OS name and version info from the command line

To check the name of the operating system installed on the machine and its version, we can use the easy way below. Always mentioned in the /etc/*-release file is the variant of Linux. See below:-

1) On CentOS and RHEL:-

cat /etc/redhat-release

CentOS release 6.4 (Final)

2) On Debian

:~#  cat /etc/issue

Debian GNU/Linux 5.0 \n \l

3) On Ubuntu

root@ubuntu:~# cat /etc/issue
Ubuntu 13.04 \n \l

Sachin | Friday 04 October 2013 - 06:47 am | | Default | No comments

How to stop Dr. Web notification emails

1) SSH to the server where the Plesk panel is installed.
2) Open the file called drweb32.ini

Example: vi /etc/drweb/drweb32.ini

3) Look for the section below in the file

CronSummary=yes
and change it to
CronSummary=no

You can also edit the notification section of the other file called drweb_handler.conf

Example: vi /etc/drweb/drweb_handler.conf

Look for the Notification section and change anything that you don't want to be notified about by simply putting no instead of yes.

Ashwani | Thursday 03 October 2013 - 7:22 pm | | Default | No comments

Mail error Reject::ORIG::DNS_MF:

Mail error Reject::ORIG::DNS_MF:

If the mail server is rejecting emails with the error above, it means that the sender mailbox or domains don't exist. You can disable this on the qmail server. Below are the steps:-

Change the value of the mfdnscheck file in /var/qmail/control/options from 1 to 0.

Manoj | Thursday 03 October 2013 - 11:23 am | | Default | One comment

How to Enable the Quota on a drive/partition in Linux

Many times it is required to enable the quota on a drive where there is mostly user data in order to check the size used by a specific user on the system. For that, we must have enabled quota on the drive.

The following are the steps using which we can enable the quota:-

Step 1: First of all make sure that the 'quota' package has been installed on the system and if not then do install it using the command below:-

yum install quota

Step 2: Go to /etc/fstab file and write usrquota next to the default against the partition on which you want to enable the quota as below :-
---------------------------------------------------------------------------------------------------------
/dev/sda1     /home     ext4    defaults,usrquota        1     1
---------------------------------------------------------------------------------------------------------

then save and quit the file.

Step 3: After this run the command below:-

mount -o remount /dev/vda2 and then run the command mount and you'll see the output as below:-

------------------------------------------------------------------------
/dev/vda2 on /home  type ext4 (rw,usrquota)
------------------------------------------------------------------------

Step 4: Now, run the command below to create the quota file:-

/sbin/quotacheck -mufv /home

Step 5: On the quota for /home partition

/sbin/quotaon /home

That's all that needs to be done. After this, you can use the command below to see the users inside the /home directory.

repquota /home

Similarly to increase/decrease the quota for a particular user, you can use the commands as below:-

edquota username

e.g. edquota sachin
--------------------------------------------------------------------------------------------------------------------------
Disk quotas for user sachin (uid 502):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/vda2                        16          0          0          5        0        0
--------------------------------------------------------------------------------------------------------------------------

That's it.

Sachin | Thursday 03 October 2013 - 06:33 am | | Default | No comments

How to make a service stay ON after a reboot?

Sometimes it happens that a server has been rebooted but we forgot to check if the services which were started before the reboot are still up - and sometimes this creates issues.

There is a utility in Linux - 'chkconfig' - using which we can turn a service on even after rebooting the Linux server or machine. It is a command-line utility as below :-

------------------------------------------------------------------------------------------
chkconfig --list

The command below will display all the services and the runlevels on which the particular
service is on or off:-

[root@localhost ~]# chkconfig --list

httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off
-----------------------------------------------------------------------------------------------------------------------------

Now to make a particular service stay on after the reboot we need to use the command below:-

-----------------------------------------------------------------------------------------------
[root@localhost ~]# chkconfig httpd on

and then re-check the httpd service status using the command below:-

[root@localhost ~]# chkconfig httpd --list

httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
-------------------------------------------------------------------------------------------------

That's all. Now whether our Linux server/machine will reboot or not the httpd service will remain started on it.

Sachin | Wednesday 02 October 2013 - 04:56 am | | Default | No comments

How to delete all the files in a directory except for some specific format files

The command below will delete all the files in the current directory except for the .php and .html files:-

rm !(*.php*.html)

Vimal | Tuesday 01 October 2013 - 09:19 am | | Default | No comments