Here is how you find out how many inodes are in the filesystem: 1. Add the numbers of used and free inodes. The df -i option is a ufs-specific option. # df -oi Filesystem iused ifree %iused Mounted on /dev/dsk/c0t0d0s5 2506 145590 2% /opt 2506 + 145590 = 148096 2. This closely corresponds to information […]
Archives for May 2017
CentOS / RHEL 7 : How to setup yum repository using locally mounted DVD
yum is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages from official Red Hat software repositories, as well as other third-party repositories. The post below describes step by step procedure to use a locally mounted RHEL 7 DVD iso as yum repository. 1. Mount the RHEL […]
CentOS / RHEL 6 : How to setup yum repository using locally mounted DVD
A yum repository (or “repo” for short) is a collection of RPMs in a single location, for example, on a web site or in a directory on a DVD. In RHEL 6.0 Snapshot 12 there are 5 repositories: 1. HighAvailability 2. LoadBalancer 3. ResilientStorage 4. ScalableFileSystem 5. Server The Server repo is the main repo […]
How to disable NetworkManager on CentOS / RHEL 7
Disabling NetworkManager The following steps will disable NetworkManager service and allows the interface to be managed only by network service. 1. To check which are the interfaces managed by NetworkManager # nmcli device status This displays a table that lists all network interfaces along with their STATE. If Network Manager is not controlling an interface, […]
Solaris : How to increase the Inodes on UFS file system with newfs command
It is not possible to dynamically increase the number of inodes on a UFS filesystem. If you need to increase the number of inodes you will need to build the filesystem afresh using newfs. Note that the newfs command will create a new filesystem on the slice you specify. This will destroy all data already […]
CentOS / RHEL : Managing password ageing for users using chage (with practical Examples)
For security reasons, it is good practice to require users to change their passwords periodically. To configure password expiration for a user from a shell prompt, use the chage command. The basic syntax of the chage command is : # chage [option] [username] The table below lists out the command line options that can be […]
CentOS / RHEL : How to configure a user account to never expire (disable password ageing)
Question : How to configure a user account so that the password will never expire? Answer: By default passwords do not expire on user accounts. If an expiration date has been added to an account and you wish to remove it use either the passwd or chage commands to change the maximum number of days […]
CentOS / RHEL 5,6 : How to Change the timezone
Timezone configuration on Linux is usually set up at installation time. On RHEL 5 and 6, the procedure to change the Timezone configuration is as follows. The example used here is from timezone MDT to IST. The timezone can be either changed from command line or using the system-config-date command. Using system-config-date command Use the […]
How to find the inode size of an ext2/ext3/ext4 filesystem?
By using the tune2fs tool with the option, -l, the inode size of the filesystem could be seen. Using the same option, other information of the filesystem superblock can also be seen. The superblock contains information about the filesystem, such as the number of free blocks available, and the number of mounts, that may be […]
How to backup and restore MySQL database
Backing up MySQL database Backup and restoration of MySQL databases play a very important role in a production environment, so here is a simple method to backup a MySQL database. To backup MySQL database(s), the following command can be used: # mysqldump –user=username –password=password –opt DatabaseName > database.sql Note: The above command will only backup […]