Adding a user on Fedora to sudoers

When you create a new user on Fedora during the setup steps, there’s a checkbox to add the user to the administers group, which allows them to sudo commands. If you forget to check this box, you can add the user to the sudoers group like this:

echo 'loginname ALL=(ALL) ALL' >> /etc/sudoers

How to find what Ubuntu version you’re running

‘uname -a’ gives you some useful info about kernel version, but if you’re looking for the specific version of Ubuntu that you have installed, try ‘cat /etc/issue’ which should include a line with the exact Ubuntu version.

Expanding virtual disk size for a Fedora guest on VirtualBox

First, while the virtual machine is down, resize the disk image:

vboxmanage modifyhd vdi_disk_image_name.vdi --resize new_size_in_mb

Now boot the image and logon. If you’re not using LVM, I think to resize regular partitions it’s as simple as starting gparted, and then just drag the size of the partition to take up the new unformatted space. If you are using LVM, then do the following:

sudo lvm

List physical volumes with pvs, find the one containing the logical volume that you want to resize, and then use pvresize:

pvresize --setphysicalvolumesize xxG /dev/name

To show volume groups:

vgs

To show logical volumes:

lvs

To expand a logical volume to use the newly added space:

lvextend -L +sizeG vg_groupname/lv_volumename

where size is the new size in GB.

In a Nutshell: Deploying a Java webapp to Red Hat’s OpenShift

Deploying a Java webapp to OpenShift couldn’t be any simpler. In as few words as possible to show you how simple it is – here’s a quickstart:

 

… and that’s it. Your app is pushed to your remote Git repo, built with Maven, and deployed to JBoss 7.

That’s pretty simple, huh?