LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2003, 02:25 AM   #1
phiqtion
LQ Newbie
 
Registered: Aug 2003
Location: None Of Your Business..
Distribution: None!
Posts: 24

Rep: Reputation: 15
How to create a file as "ROOT"


Hello all, i'm trying to install Java on my Fedora Core 1 distro and all i got left to do is create a file as root, can i do this from the terminal? I just need the command. Thanks!
 
Old 11-10-2003, 02:34 AM   #2
init
Member
 
Registered: Oct 2003
Location: Portland, Maine
Distribution: Gentoo 2004_2 2.6.7r14
Posts: 160

Rep: Reputation: 30
su - root
(enter your passwd)

touch <filename>
 
Old 11-10-2003, 03:20 AM   #3
phiqtion
LQ Newbie
 
Registered: Aug 2003
Location: None Of Your Business..
Distribution: None!
Posts: 24

Original Poster
Rep: Reputation: 15
it says i dont have access to /ect/profile.d/
im just trying to installa java, and a tutorial says i must make a file in there called java.sh.
 
Old 11-10-2003, 04:05 AM   #4
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Are you trying to install stuff from a tarball? Possibly with the commands:
./configure
make
make install

Remember that you must be root for the last command to work (see reply above about 'su')

Martin
 
Old 11-10-2003, 04:33 AM   #5
x4n0b1
Member
 
Registered: Oct 2003
Posts: 43

Rep: Reputation: 15
u can also try
sudo -u root 'command'

---
not a clever suggestion, actually just my hand cant stop typing
 
Old 11-10-2003, 01:26 PM   #6
init
Member
 
Registered: Oct 2003
Location: Portland, Maine
Distribution: Gentoo 2004_2 2.6.7r14
Posts: 160

Rep: Reputation: 30
Are you trying to install Java (SDK) ?? You should not have to be root to install java. Unless you have a java based App you want to run as root.

I would download the self extracting binary from www.java.sun.com.

./java<fileudownloaded>

all this does is makes a java directory.

add a :::

JAVA_HOME=/path/to/javadir export JAVA_HOME

than add $JAVA_HOME/bin to your users path..

those two things would be done in the .profile or .bash_profile

I wrote up another post were I explained this better I will try to find it and post it for you.
 
Old 11-10-2003, 01:35 PM   #7
init
Member
 
Registered: Oct 2003
Location: Portland, Maine
Distribution: Gentoo 2004_2 2.6.7r14
Posts: 160

Rep: Reputation: 30
here it is...

go to http://java.sun.com/webapps/download/Display

get the Linux self-extracting file Make sure it is the SDK!!

run it from /usr/local

This just creates a java<version> directory. if you cd down into the bin you can type java -version and get a read out, but that is not really what you want so.....

then do this:

ln -s /usr/local/java_<versionyoudownloaded> /usr/local/java (or the other way around can never remember :P) This is just easier come update time

cd ~

vi .bash_profile or .profile depending on your shell pref.

and these lines

JAVA_HOME=/usr/java export JAVA_HOME

Than in you PATH line add this

PATH=$PATH:$JAVA_HOME/bin export PATH

then to source the profile type

. .bash_profile

then you should bge able to ....

echo $JAVA_HOME

and see path to java dir.

and run java -version from any dir..

hope this helps
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd & "553 could not create file" steffentchr Linux - Server 8 06-28-2012 02:52 PM
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 05:08 PM
Red hat Install: "No valid devices found on which to create new file systems" Lucky_69 Linux - Software 1 02-06-2007 10:19 PM
"Attempting create too large a file system" suguru Linux - Hardware 2 02-23-2004 02:16 AM
"mkdir: cannot create directory `foo': Read-only file system" on FAT32 maddes Linux - Hardware 1 11-26-2003 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration