Creating a Partition Larger than 2TB on Linux with Parted
First, find out the size of the disk by typing the following command: fdisk -l /dev/sdb Then, to create a partition start GNU parted as follows: parted /dev/sdb Creates a new GPT disklabel i.e. partition table: (parted) mklabel gpt Next, set the default unit to TB, enter: (parted) unit TB To create a 3TB partition […]
Create a Custom Command on Linux
Creating a custom command is sometimes very convenient and very easy. 1. Create a bash script and save #!/bin/bash # The code goes here 2. Make the script executable chmod +x [script] 3. Then you can either move it into the /usr/bin directory or create a soft link in /usr/bin to the script file ln […]
IPTABLES Configuration
In addition to using system-config-firewall (which is not installed on RHEL by default) one can edit the configuration file directly. This also helps if you need to add more specific rules. File: /etc/sysconfig/iptables Open a port up to everybody: -A INPUT -m state –state NEW -m tcp -p tcp –dport [Port Number] -j ACCEPT Open […]
seLinux and Apache
I typically move my root directory for Apache and this can get complicated when seLinux is enforced but with a bit of knowledge this can be done without disabling seLinux. display current state of seLinux: getenforce displays current permissions and seLinux settings for a directory (ex. ls -ldZ /var/www/html) ls -ldZ [directory path] Executing: ls -ldZ […]
Create a partition, format, and mount on RHEL/Centos
Here is a straight forward method for partitioning, format, and mount a new volume on a Centos or RHEL system. These steps would be performed after physically (or virtually) connecting the new volume. sudo fdisk -l This command will display a list of volumes and their partitions on the system. You can use this to […]
This website uses cookies to improve your browsing experience. Cookies help us remember your preferences, keep you logged in, and understand how you interact with our site. We do not share any personal information collected by cookies with third parties.