Monday, July 11, 2011
Sunday, March 6, 2011
VMware: Increase disk space of Linux VM
Follow instructions below. Assume new partition is /dev/sda3 (4GB), volume group is VolGroup-00 and Logical volume is LogVol-100
Wednesday, January 26, 2011
Set umask for a specific directory
Use the setfacl command. Examples below from man.
EXAMPLES
Granting an additional user read access
setfacl -m u:lisa:r file
Revoking write access from all groups and all named users (using the effective rights mask)
setfacl -m m::rx file
Removing a named group entry from a file’s ACL
setfacl -x g:staff file
Copying the ACL of one file to another
getfacl file1 | setfacl --set-file=- file2
Copying the access ACL into the Default ACL
getfacl --access dir | setfacl -d -M- dir
http://www.linuxforums.org/forum/slackware-linux/156119-solved-umask-specific-directory.html
Thursday, September 16, 2010
Wednesday, September 1, 2010
Recover GRUB menu after Ubuntu 9.10 update
A couple the GRUB menu got screwed up after an update. The recover process can be found here. But I had to take a couple additional steps to fix my GRUB.
- Figure what your where your /boot and /root partition is installed in. My /boot was /dev/sdc2 and /root was /dev/sdc3.
- Mount /root to /mnt using sudo mount /dev/sdc3 /mnt
- Mount /boot to /mnt/boot using
mount /dev/sdc2 /mnt/boot.
NOTE: If both /root and /boot are on the same partition then you only have to mount the /root partition. - Check /mnt/boot/grub/device.map for an entry for /dev/sdc.
- If /dev/sdc does not exist, then add it using vi. For example, the entries in mine were
(hd0) /dev/sda
(hd1) /dev/sdb
So I added (hd2) /dev/sdc to list. - If this was not added to the list, the /root partition will not be found and the grub recovery will fail.
- Next re-install the grub by executing
sudo grub-install --root-directory=/mnt /dev/sdc - Reboot
- Refresh the GRUB 2 menu by executing update-grub2
Wednesday, July 14, 2010
CentOS static routes
Temporary Static Route
Use the route command to add a static route. route add -host 192.168.1.2 gw 192.168.50.254 dev eth0:0 (eth0:0 is virtual interface)
Permanent Static Route
echo "192.168.1.2/32 via 192.168.50.254" >> /etc/sysconfig/network-scripts/eth0:0
In both the cases above all requests to 192.168.1.2 will be routed via gateway 192.168.50.254 and device eth0:0
Friday, April 23, 2010
Install/Uninstall GlassFish on Linux
Uninstalling Glassfish V2 and installing Glassfish V3
Glassfish can be installed with the file-based installer or the JAR-based installer.
Uninstall instructions from SUN
Installtion instruction from SUN
Installing Glassfish
File-based
JAR-based
Uninstalling Glassfish
File-based
JAR-based and Zip
Glassfish can be installed with the file-based installer or the JAR-based installer.
Uninstall instructions from SUN
Installtion instruction from SUN
Installing Glassfish
File-based
- Download the file from
- chmod +x sges-glassfish-v3-unix.sh
- Create the installation directory: mkdir /usr/glassfish
- Navigate to where sges-glassfish-v3-unix.sh file exists.
- Run ./sges-glassfish-v3-unix.sh
- Follow the instructions.
- Download the file from
- Create the installation directory: mkdir /usr/glassfish
- Unzip contents to installation directory: unzip sges-v3-unix.zip
JAR-based
Uninstalling Glassfish
File-based
-
Navigate to your Enterprise Server installation directory.
-
Invoke the uninstallation program as follows:
-
To use the uninstallation in GUI mode, type:
./uninstall
-
To use the uninstallation in command-line mode, type:
./uninstall -console
-
JAR-based and Zip
-
Change to the directory containing the glassfish directory.
-
Run the following command: rm —r glassfish.
Subscribe to:
Posts (Atom)