-
enabling apache in bootable knoppix
Hi all,
Would like to ask how do i enable apache+cgi+perl using the live CD , like to run some perl n cgi scripting without installing yet
tried to do a chkconfig --list httpd , unfortunally don't think knoppix had that install.
appreciate if anyone could enlighten me on this
Thanks a million,
vinlouis
-
Senior Member
registered user
You need to be root to do this.
You can do it graphically by running these commands from a terminal window as user knoppix
su root <enter>
then, at the root prompt
konqueror<enter>
Then you can browse the filesystem and write/copy files to the /var/www directory from within konqueror.
I find writing php code in a text editor works for me.
At the root prompt type
nedit followed by [enter]
Then, as previously suggested write
Code:
Code:
<?php phpinfo(); ?>
and save the file in the /var/www directory as suggested by MaxIT.
Then visit the file with a browser as he also suggests.
Once this works you can then test out perl and bash scripts.
Use whatever text editor you prefer out of those available (nedit, kate, kwrite, emacs and vim).
Create a file as root with the following.
Code:
Code:
#!/bin/bash
printf "Content-type:text/html\r\n\r\n";
printf "<html>hello world</html>\r\n";
This bash script should be saved as hello.cgi and saved in the /usr/lib/cgi-bin directory.
It also needs to be made executable for all users:
At a root prompt type
chmod 755 /usr/lib/cgi-bin/hello.cgi
Then visit the file with a browser e.g. mozilla
http://127.0.0.1/cgi-bin/hello.cgi
Once this works you can do the same for perl. This time saving the file as hello.pl
and using the following code:
Code:
Code:
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<html>hello world</html>\n";
Once you have got these three programs going then you have a wide choice to start open source web programming under Knoppix Debian/Gnu/Linux.
References
http://www.knoppix.net/forum/viewtop...300&highlight=
http://www.knoppix.net/forum/viewtop...105&highlight=
-
thanks dude
Similar Threads
-
By ken39 in forum Hdd Install / Debian / Apt
Replies: 3
Last Post: 11-09-2007, 05:05 AM
-
By acer0001 in forum Customising & Remastering
Replies: 2
Last Post: 03-07-2005, 11:48 PM
-
By helios17 in forum General Support
Replies: 1
Last Post: 11-21-2004, 01:11 AM
-
By true1ever in forum General Support
Replies: 3
Last Post: 01-06-2004, 04:56 PM
-
By beforewisdom in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 04-14-2003, 07:38 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX
$59.99

Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery
$54.99

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5
$189.99

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield
$84.99

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard
$59.99

Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)
$29.90

ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio
$34.99

ASUS PRIME Z370-A II LGA 1151 Intel Z370 DDR4 DIMM USB3.1 DVI ATX RGB
$69.99

ASUS B85M-G / B85M-G PLUS LGA1150 DDR3 Micro ATX Motherboard HDMI Support 4thCPU
$45.00

Dell XPS 8940 Desktop Motherboard Intel H470 LGA1200 DDR4 K3CM7 KV3RP 427JK
$154.99