PDA

View Full Version : Knoppix as webserver



rubis
12-10-2002, 11:57 PM
When I try apache start (under etc\init.d) I get an error:
host valid name not found in ServerName. How do I fix this ? How can I edit a config file like hosts ?


thanks

Rubens

Lars Jensen
12-11-2002, 08:01 AM
Here's what I did:

Delete the symbolic links /etc/hosts and /etc/hostname

copy the same files back from /KNOPPIX/etc/hostname and KNOPPIX/etc/host

Edit the files to define the appropriate new names, and then run the command:

hostname your_new_hostname

Lars.

rubis
12-11-2002, 06:33 PM
Tak Lars !
I try what you said but I cannot save the edited files or even delete them. How can I change the properties of the config files so I could change them ?



Rubens

Dave_Bechtel
12-12-2002, 06:43 AM
--You *are* doing this as Root, aren't you? :roll:


Tak Lars !
I try what you said but I cannot save the edited files or even delete them. How can I change the properties of the config files so I could change them ?



Rubens

12-12-2002, 01:25 PM
As the login is automatic, I think I was logged as root ! !!!

How do I login as root ? Using su- ? What's the password ?


rubens

Dave_Bechtel
12-12-2002, 06:46 PM
--You would do well to browse the historical posts on this board and on http://www.linuxtag.org/cgi-bin/yabb/YaBB.pl?board=knoppix-en before asking such a question, but here we go again...

Just hit Ctrl-Alt-F1 and you will be at one of (4) Root prompts. F1 thru F4. Alt-F5 (or is it F7?) gets you back to the GUI.

--Just as There Is No Spoon, there is no root password.

--You would also do well to learn the SEVERE DANGERS INVOLVED :twisted: when you try running everything as root. This is why we have USER accounts. Otherwise you make it EASY for your system to get cracked.


As the login is automatic, I think I was logged as root ! !!!

How do I login as root ? Using su- ? What's the password ?


rubens

12-13-2002, 02:02 PM
OK! It works now ! Thanks !
I also found an easy way:
There is an option in the KDE menu for "Browse files as Root"or something like this, in system. From there you can delete and edit very easy the files.
After that just put your html page in var/www/ . and call apache.
In 5 minutes (including boot) you can put a webserver "on air" :>)

Another question now is : How do I enter as root if I start Knoppix in only text mode ?

12-16-2002, 06:19 PM
sudo su would work i think

Dave_Bechtel
12-17-2002, 09:02 AM
sudo su would work i think

--If you boot Knoppix into text mode from the CD, you are already at a Root prompt, and still have Ctrl-Alt-F1 thru F4. But if you need to get a root prompt from KDE, start a Konsole or other (such as rxvt) shell, and type ' sudo bash '.

bubazoo
11-22-2003, 04:23 AM
[quote="Dave_Bechtel
Just hit Ctrl-Alt-F1 and you will be at one of (4) Root prompts. F1 thru F4. Alt-F5 (or is it F7?) gets you back to the GUI.
[/quote]

DO NOT tell people to hit Ctrl-Alt-F1 again!

I could not get back to the GUI after that, and I had to finally shut down manually by doing the shutdown -r now thing.
F1-F4, Alt-F5 (or F7) would not work.

so I repeat DO NOT TELL SOMEONE TO DO THAT AGAIN!

thank you.

and to answer your question,
you don't need to use sudo

just type su at a command terminal and you'll be at root
knoppix logs on as user knoppix (even though it askes you what username and password you want, it still uses the default knoppix anyways) so just type su to get to a root prompt, thats it.

or su [username] to switch users

Stephen
11-22-2003, 06:08 AM
I could not get back to the GUI after that, and I had to finally shut down manually by doing the shutdown -r now thing.
F1-F4, Alt-F5 (or F7) would not work.



Try init 5 next time that will get you back to GUI.

champagnemojo
11-22-2003, 06:25 AM
Just hit Ctrl-Alt-F1 and you will be at one of (4) Root prompts. F1 thru F4. Alt-F5 (or is it F7?) gets you back to the GUI.



DO NOT tell people to hit Ctrl-Alt-F1 again!

I could not get back to the GUI after that, and I had to finally shut down manually by doing the shutdown -r now thing.
F1-F4, Alt-F5 (or F7) would not work.

That's odd...but you can't generalize that to everyone. Ctrl-Alt-F7 always gets me back into KDE.

RockMumbles
11-22-2003, 07:03 AM
bubazoo wrote:


DO NOT tell people to hit Ctrl-Alt-F1 again!

I could not get back to the GUI after that, and I had to finally shut down manually by doing the shutdown -r now thing.
F1-F4, Alt-F5 (or F7) would not work.

running the knoppix versions I have from cd (which I admit are old):

[ctrl]-[alt]-[f1] thru [ctrl]-[alt]-[f4] are root consoles
and
[ctrl]-[alt]-[f5] returns you to your X session

after an hd install the X session is returned to 'normal' and is at [ctrl]-[alt]-[f7]

~rock

Dave_Bechtel
11-22-2003, 10:34 PM
> DO NOT tell people to hit Ctrl-Alt-F1 again!

--Hey pal, just because YOU couldn't figure out how to get back into the GUI doesn't mean it won't work for other people.

--If you use Alt-RightArrow or Alt-LeftArrow it scrolls thru all the available VTs. Figure out how Linux works a bit more before you try telling your grandpa how to skin a cat; I've been using various flavors of Linux since ~1996-97.

LinuXdud3
11-26-2003, 04:44 PM
totally agreed. newbies shouldn't generalize when THEY can't do it. Linux != Windows. You can ALLWAYS get acces to your system in some way or another. Thats the cool thing.