Skip to main content

Posts

Showing posts from May, 2012

Locking down ssh (keys only)

# cp /etc/ssh/sshd_config /etc/ssh/sshd_config-20120522 # sed -i -e 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config # service sshd restart I guess when I set out to document this I thought the task was more challenging.  ;-) I went this route as I am sick of worrying about the script kiddies pounding on my system all day long.  I also scan the secure log every minute for random connection attempts and then shun them at my firewall.  I'll save that for another post.

GPT and Software RAID on Linux (RHEL)

I was rebuilding one of my lab boxes which has 4 x SATA drives (2 x 500GB and 2 x 1TB).  During the install I configured the Software RAID on the 2 x 500's for the OS, etc.. afterwards I wanted to use Software RAID to mirror the 2 x 1TB. 2 x 500GB - OS, swap, Virtual Machines 2 x 1TB - iSCSI and NFS share to be used by my RHEV 3 lab I acknowledged (just today) that GPT is the future... so I decided to use GPT to accomplish all of this. parted -s /dev/sdc -- mklabel gpt mkpart primary ext4 1 -1 set 1 raid on parted -s /dev/sdd -- mklabel gpt mkpart primary ext4 1 -1 set 1 raid on mdadm --create /dev/md127 --level=mirror --raid-devices=2 /dev/sdc1 /dev/sdd1 Conversely, if you are still using the MSDOS partition scheme (which is perfectly fine/normal for drives under 2TB), then the following would work also echo -e "o\nn\np\n1\n\n\nt\nfd\nw\n" | fdisk /dev/sdc echo -e "o\nn\np\n1\n\n\nt\nfd\nw\n" | fdisk /dev/sdd mdadm --create /dev/md127 --le

iSCSI target RHEL 6

I'm currently attempting to become more familiar with the iSCSI targets on Linux... so, I anticipate that I will be adding to this post - but what I have documented here should get a person by... # NOTE: I discovered this will not work on a VXFS mount if SELinux is enabled # :-( yum install iscsi-initiator-utils scsi-target-utils perl-Config-General mkdir -p /var/lib/tgtd/ lvcreate -L500g -nlv_tgtd vg_blackmesa mkfs.ext4 /dev/mapper/vg_blackmesa-lv_tgtd echo "/dev/mapper/vg_blackmesa-lv_tgtd   /var/lib/tgtd  ext4 defaults 0 0" >> /etc/fstab dd if=/dev/zero of=/var/lib/tgtd/iscsi-tgt-01.img bs=1m seek=100000 count=0 dd if=/dev/zero of=/var/lib/tgtd/iscsi-tgt-02.img bs=1m seek=100000 count=0 dd if=/dev/zero of=/var/lib/tgtd/iscsi-tgt-03.img bs=1m seek=100000 count=0 dd if=/dev/zero of=/var/lib/tgtd/iscsi-tgt-04.img bs=1m seek=100000 count=0 dd if=/dev/zero of=/var/lib/tgtd/iscsi-tgt-05.img bs=1m seek=100000 count=0 restorecon -RFvv /var/

RHEL 6.2 Server vs Workstation

I have wondered what the difference, at a cursory level, was between the Workstation and Server version of the Red Hat flagship product. As you may have guessed, the Server product has a number of additional Server-based packages, and the same goes for the Workstation product. I did the following (I inserted the appropriate media in my machine) # ls /media/RHEL_6.2\ x86_64\ Disc\ 1/Packages/ > /tmp/RHEL_6.2-Workstation # ls /media/RHEL_6.2\ x86_64\ Disc\ 1/Packages/ > /tmp/RHEL_6.2-Server # sdiff /tmp/RHEL_6.2-Server /tmp/RHEL_6.2-Workstation | egrep '<|>' # sdiff /tmp/RHEL_6.2-Server /tmp/RHEL_6.2-Workstation | egrep '<|>' | wc -l 333 The "big 3" differences appears to be that Workstation includes OpenOffice, hyphen and Evolution.  Server includes cluster, and misc infrastructure type products.

Nvidia drivers on Lenovo T520

Update : Unless you are playing games or something, I see no reason to use the Nvidia drivers.  After I installed the Nvidia drivers the external display was not auto-detected and required a restart of Gnome-shell to recognize the updated config.  Once I did that, it started in Gnome-fallback mode?  Bummer...  So - nouveau is the better option... IMO. I had decided to put Fedora 16 back on my rig.  I know this install won't be on this machine long as it has some quirky issues (sudden desktop lockups, WLAN occasionally flakes out, etc... I digress...)  I also decided to try the Nvidia proprietary driver, along with using the discrete Nvidia graphics chipset. So - the process was fairly straight-forward. # yum -y update # rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm # rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm # yum install akmod-nvidia xorg-x11-drv-nvidia-libs # mv