LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   HELP: Made a HUGE ERROR with ROOT installing JAVA (https://www.linuxquestions.org/questions/linux-software-2/help-made-a-huge-error-with-root-installing-java-575202/)

bettyhills 08-06-2007 05:28 PM

HELP: Made a HUGE ERROR with ROOT installing JAVA
 
HELP: Made a HUGE ERROR with ROOT installing JAVA

--------------------------------------------------------------------------------

After two days and many failed attempts, I finally figured out how to install JRE-6u2-linux-xxx.bin. I needed the AMD64 version for two new linux boxes. The java.com instructions would not work for me, so I used some from SnapBackup.

The first linux box installed flawlessly, but I got mixed up installing on the second and logged in as ROOT superuser. Thus, all the instructions were followed from the root location. The box squealed on reboot, but is up and running. Gave me lots of troubleshooting lines including something that would not mount after 21 attempts and was force mounted.

I am attaching the instructions on installing jre here in hope that someone can tell me how to undo this mess. I did exactly as follows on the snapbackup instructions EXCEPT that I logged in as ROOT, so all actions occurred from root@linuxboxname:~$ instead of <username>@linuxboxname:~$

Here is what I did:

A: Install Java on Ubuntu
1) Go to the Java Download Page
Open http://www.java.com and click on Download NOW! Now click the Download button for "Linux (self-extracting file)".

2) Save Installer to "~/java" Folder
From the save window in your web browser, create a folder called java in your home folder. Download the installer file to this new folder (/home/<username>/java).

3) Launch Terminal
You need to run the Java installer from the command-line, which you access with Terminal. In the Applications menu, go into Accessories and select Terminal.

4) Run Installer
From the Terminal, enter these commands:
$ cd java
$ ls -l
$ chmod +x jre*.bin
$ ./jre*.bin
$ ln -s jre*/bin bin

The chmod command makes the file executable so you can run it. The ln command creates a symbolic link to the bin folder so it's easier to access.

5) Add Java to Your PATH
While still in the Terminal, enter these commands:
$ cd ~
$ echo 'PATH=~/bin:$PATH' >> .gnomerc
$ cat .gnomerc
$ mkdir bin
$ cd bin
$ ln -s ~/java/bin/java java

The echo command tells the GNOME desktop startup script to add your bin folder to the PATH. The cat command displays the startup script so you can verify your update. If the mkdir command reports that the folder already exists, that's ok.

6) Log Back On
Because the PATH variable is set on startup, you need to log out and then log back in for the Java installation to be complete.

___

Perhaps this is not a disaster? Does it all need to be undone? Or do I remove just parts of the install? Whatever... tell me what to do, gently and step by step, please.

BTW I understand fully how dangerous it is to log in as root and would never have done it, except that the instructions at java.com said to do so during the install, and I got mixed up (forgetting I was no longer using those instructions) after so many attempts.
__________________

Dual boot box with Windows NTFS 35GB, FAT32 Shared Data Partition 80GB, and Ubuntu-FF 7.04 Ext3 31GB

{BBI}Nexus{BBI} 08-06-2007 05:36 PM

I'm confused, what exactly is the problem?

jiml8 08-06-2007 05:37 PM

I'm not sure why you did some of what you did, but I also don't see what you mean by a big mess.

The jre*.bin file is something you want to execute to install Java; once you have done that you can simply delete the .bin file.

You say you have a "big mess"; what doesn't work?

bettyhills 08-06-2007 06:23 PM

I am assuming that the software was installed with the wrong permissions and in the wrong place.

For example, at the root directory there now exists a bin directory with a broken link, owner = root.

When I explore other software on the machine, it shows owner = <ownername> under permissions. Java components in the java directory show owner = root under Properties/permissions.

Am I alarmed about nothing?

If this were a Windows situation, MS would have put garbage all over my machine making cleanup impossible.

Since this is Ubuntu, can I simply delete the java directory and re-do the install?


All times are GMT -5. The time now is 09:50 AM.