Difference between revisions of "Linux how to"

From CSWiki
Jump to navigation Jump to search
Line 33: Line 33:
 
   yum -y localinstall /usr/src/redhat/RPMS/i586/java-1.5.0-sun-*
 
   yum -y localinstall /usr/src/redhat/RPMS/i586/java-1.5.0-sun-*
 
* 7. If you want to enable the Java plugin for your web browser do the following:
 
* 7. If you want to enable the Java plugin for your web browser do the following:
   ln -s /usr/lib/jvm/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
+
   ln -s $JAVA_HOME/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
 
* 8. Make sure that the old X11 libraries are installed, or Java will crash your web browser:
 
* 8. Make sure that the old X11 libraries are installed, or Java will crash your web browser:
 
   yum install xorg-x11-deprecated-libs
 
   yum install xorg-x11-deprecated-libs

Revision as of 09:46, 30 March 2006

Practical instructions on how to go about doing things in Linux. This is about the Fedora Linux.

How to extend an xfs filesystem

  • xfs filesystems must be mounted to be extended. There is no need to unmount
  • usually an xfs fileystem occupies all of its logical volume so the extension of a filesytem involves first the expansion of the logical volume and then the extension of the filesystem
  • expanding the logical volume
  • lvextend -L +5G /dev/Volume00/data-lv00 - this will add 5GB on logical voluem /dev/Volume00/data-lv00
  • xfs_growfs /NewFS - this will extend the filesystems on the previously extended LV to occupy it completely. The filesystem is mounted on /NewFS in this case.

More on how to operate the Logical Volume Manager (LVM) is found here

How to extend an ext3 file system

Note: A mounted ext3 file system cannot be extended. Unmount it before proceeding.

  • Unmount the file system
  • expand the logical volume containing the file system
  • lvextend -L +2G /dev/Volume00/lvol00 - this will add 2GB on logical volume /dev/Volume00/lvol00
  • do an fsck on the file system (this is required)
  • e2fsck /dev/Volume00/lvol00
  • extend the filesystem to the logical volume limits
  • resize2fs /dev/Volume00/lvol00
  • remount file system

How to install java

  • 1. Download the latest JDK version from Sun. Choose the "Linux self-extracting file" version (not the RPM version).
  • 2. Make sure the "rpm-build" package is installed:
 yum install rpm-build
  • 3. Move the JDK to the RPM Building Source directory:
 mv jdk-* /usr/src/redhat/SOURCES/
  • 4. Download the Source RPM from JPackage. Make sure you choose the same version as the JDK you downloaded in step 1.
  • 5. Build the Java RPM using the file that you just downloaded:
 rpmbuild --rebuild java-*src.rpm
  • 6. After the build the RPMs can be found in /usr/src/redhat/RPMS/i586/. You can install them using yum:
 yum -y localinstall /usr/src/redhat/RPMS/i586/java-1.5.0-sun-*
  • 7. If you want to enable the Java plugin for your web browser do the following:
 ln -s $JAVA_HOME/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
  • 8. Make sure that the old X11 libraries are installed, or Java will crash your web browser:
 yum install xorg-x11-deprecated-libs