Tag Archive for Java

Aide-mémoire

not the diplomatic kind
– just some things I need to keep in mind for an upgrade/install to Fedora 13 64bit

#1

nVidia Graphics

Fedora 12 / 13

In order to keep compatibility with nouveau, you either need to recreate the initrd manually after the driver has been installed, or add a command line option to the kernel. To recreate the initrd:

su -
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)

To use the default initrd, but disable the nouveau driver, edit /etc/grub.conf and add the following to the end of the line(s) starting with ‘kernel’:

  rdblacklist=nouveau nomodeset

Before using the driver, you need to lower your system protection so SElinux doesn’t prevent the driver to load.

http://rpmfusion.org/Howto/nVidia#head-b52d8a785c3188f03b893e4f8c75f8d7e37c9e2b

x86_64 (64bit) users

If you wish to have 3D acceleration in 32bit packages such as Wine, be sure to install the xorg-x11-drv-nvidia-libs.i386 package for your driver variant. For example, if you installed kmod-nvidia then you will require xorg-x11-drv-nvidia-libs.i386, but if you install kmod-nvidia-96xx, you will need xorg-x11-drv-nvidia-96xx-libs.i386. If using Fedora 11 you will need to use xorg-x11-drv-nvidia-libs.i586, with Fedora 12 use xorg-x11-drv-nvidia-libs.i686.

GeForce 6 and newer

yum install kmod-nvidia-PAE (or kmod-nvidia if not using kernel-PAE)

I hope that these are the same instructions for nVidia

Installation Using RPMFusion

To install the nvidia driver using RPMFusion and YUM.

1. Install the repository configuration files for YUM.
Run the following commands (enter ‘root’ password when prompted):

[mirandam@charon ~]$ su -c 'rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm'
[mirandam@charon ~]$ su -c 'rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
  1. Due to the inclusion of nouveau in Fedora 11 and newer, it must first be disabled. After this step, a reboot is recommended.
    • Fedora 12 and Fedora 13Edit (as root): /boot/grub/grub.conf
      To the end of the default kernel (usually the first), edit the kernel line.
      Add the following: rdblacklist=nouveau to the end of the kernel line.

-OR- Modify the initramfs:

[mirandam@charon ~]$ su -
Password:
[root@charon ~]# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
[root@charon ~]# dracut /boot/initramfs-$(uname -r).img $(uname -r)

[root@charon ~]# exit

http://fedoraproject.org/wiki/PreUpgrade

this may be a first step, – I might try an ‘upgrade’ (it has rarely proved fruitful though)

http://www.mjmwired.net/resources/mjm-fedora-f13.html#java

#2

Using Sun Java Instead

If you require Sun Java or if OpenJDK does not work properly, you can download Sun Java and use it in Fedora.

Download the Java package from:
http://java.sun.com/javase/downloads/index.jsp. Always use the latest update.

Select: Java JRE 6 Update 20 (the JDK is for developers)

On the next page, for Platform select “Linux” for 32-bit users, and “Linux x64” for 64-bit users.

For Language select “Multi-language”. Also accept the license agreement, and hit “Continue”.

On the next page, select the RPM option:

Java SE Runtime Environment 6u20
jre-6u20-linux-i586-rpm.bin (32-bit users)

jre-6u20-linux-x64-rpm.bin (64-bit users)

To install:

[mirandam@charon Download]$ sudo sh jre-6u20-linux-i586-rpm.bin
-OR-
[mirandam@charon Download]$ sudo sh jre-6u20-linux-x64-rpm.bin

You will need to hit ‘space’ till it reaches the end, then type ‘yes’. You should see the RPM installing. If it does not install, manually install it via sudo rpm -ivh.

When running the java command, Fedora will default to using OpenJDK. In order to use Sun Java, use the alternatives command.

To setup the Java runtime, perform the following (applies to both 32-bit and 64-bit users):

[mirandam@charon Download]$ sudo /usr/sbin/alternatives –install /usr/bin/java java /usr/java/default/bin/java 20000

Setup the Mozilla/Firefox browser plugin.

For 32-bit users:

[mirandam@charon Download]$ sudo /usr/sbin/alternatives –install /usr/lib/mozilla/plugins/libjavaplugin.so
libjavaplugin.so /usr/java/default/lib/i386/libnpjp2.so 20000

For 64-bit users:

[mirandam@charon Download]$ sudo /usr/sbin/alternatives –install /usr/lib64/mozilla/plugins/libjavaplugin.so
libjavaplugin.so.x86_64 /usr/java/default/lib/amd64/libnpjp2.so 20000

You may need to restart Firefox to see the plugin take effect.

Note: If you wish to switch back to OpenJDK you can run the following commands one by one to switch between the OpenJDK and Sun Java:

[mirandam@charon ~]$ sudo /usr/sbin/alternatives –config java

[mirandam@charon ~]$ sudo /usr/sbin/alternatives –config libjavaplugin.so
(or for 64-bit)
[mirandam@charon ~]$ sudo /usr/sbin/alternatives –config libjavaplugin.so.x86_64

To Update: If you wish update the JRE package, simply download the newest RPM package and install it as above. You will NOT need to reset alternatives, as those settings should remain intact.

More Information: Sun Install Documentation for Linux.

#3

Setting up sudo

Fedora, like all other Linux distributions, has a root user and has individual users. The root is the “superuser”, somewhat similar to “Administrator” in Windows.

Use the personal account you created at First Boot for daily use root only for administration/configuration. To run as ‘root’ use su or sudo commands. However sudo requires setup. As root run:

echo ‘loginname ALL=(ALL) ALL’ >> /etc/sudoers

Where ‘loginname’ is your user account.
Use ‘ALL=(ALL) NOPASSWD:ALL’ if you don’t want to be prompted a password.
If you are prompted for a password with ‘sudo’ it is the user password, not root.

Example:

[mirandam@charon ~]$ su
Password: <— Enter root password [root@charon mirandam]# echo ‘mirandam ALL=(ALL) NOPASSWD:ALL’ >> /etc/sudoers
[root@charon mirandam]# exit
exit

The following is an example of how sudo lets you execute root commands:

[mirandam@charon ~]$ du -sh /root
du: `/root’: Permission denied <— Fails!!!

[mirandam@charon ~]$ sudo du -sh /root
163M /root <— Works!!!

NOTE: Every command provided on this page will work if you remove sudo from the command. However this requires you must be logged in as ‘root’. An alternative to using sudo is to use su to login as root, before executing a command.

– again, from the same guide