PDA

View Full Version : MEGA! newbie question...



Grim Reaper
04-11-2002, 04:17 PM
just got a couple of VERY newbie questions about linux...when in the cmd prompt, can you 'run' programs? and if you want to edit something about that program you would edit a file somewhere? is that right? as an example, say if i installed Apache, i would go into the apache folder and to run it i would type ./nameoffile (like exe in windows) but if i wanted to change something, like add PHP, id edit httpd.conf then go ./nameoffile again to run it? because i don't really see how you run programs in a cmd prompt, eg: http server, ftp server, mail server...stuff like that...(damn DOS for stuffing up the way i think about cmd prompts!)


:thumb:

Bern
04-11-2002, 05:01 PM
You can run a program by changing to its directory and doing ./program but for things like apache you would have them start from one of your start up scripts (look in /etc/rc.d), you can stop/start apache from the command line anywhere because the binary will be in your path, as are all installed binaries. The path for a user is different to root's path in that system binaries are not available to users. Do "hdparm -i" an a user and you'll get ,
bash-2.05$ hdparm -i /dev/hda
bash: hdparm: command not found
bash-2.05$
but as root and you get,
bash-2.05$ su
Password:
bash-2.05# hdparm -i /dev/hda

/dev/hda:

Model=QUANTUM FIREBALLlct08 08, FwRev=A05.0X00, SerialNo=692936152914
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=32256, SectSize=21298, ECCbytes=4
BuffType=DualPortCache, BuffSize=418kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=16514064
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4
AdvancedPM=no
Drive Supports : ATA/ATAPI-4 T13 1153D revision 15 : ATA-1 ATA-2 ATA-3 ATA-4

bash-2.05#
Have a look at /etc/profile to get an idea about path for root and user.

Grim Reaper
04-11-2002, 10:42 PM
hehe, i half understand what u just said...

so depending on what binaries you have installed in your path, is what cmds you have?...what exactly do u mean 'in your path'? as in, your user?

ive been bloody searching everywhere (Red Hat 7.1) but i can't find the dir of apache...all ive found is /etc/httpd/ and where i think the webpages are /var/www/html

is this correct? well my guess is apache isn't running, because from my box on the network i goto http://192.168.0.203 and i get Page Cannot Be Found, yet there is an index.html in /var/www/html......but the main problem is i can't find the main file for apache which i can go ./program, but then you said the way to start apache is in a startup script (their just like autoexec.bat in windows?)...well that goes back to above, i don't know the path of the program to run so i can't add anything to a statup script...argh :(

Bern
04-11-2002, 10:48 PM
The ins and outs of apache are a bit beyond the scope of a forum, you might want to spend a bit of time at http://httpd.apache.org/docs/ specificly invoking (http://httpd.apache.org/docs/invoking.html) and stopping (http://httpd.apache.org/docs/stopping.html), they realy have a fine manual there.

Grim Reaper
04-11-2002, 10:56 PM
ok tah, ill read through them...

one other thing, do u know of any guides that help me setup red hat/linux so it can view shares over a network, or can make shares, ect...

ive looked but cannot find a thing on setting up the network side of it :(


edit: um, i selected to install Apache in the red hat setup, it has the httpd.conf file in etc/httpd/config dir, but i don't have an apache dir in /usr/local/

hmph, looks like its a download and reinstall time of apache

Bern
04-11-2002, 11:15 PM
Have a look at samba (http://samba.mirror.aarnet.edu.au/samba/samba.html) for shares over a network.

Grim Reaper
04-11-2002, 11:18 PM
hehe, i half understand what u just said...

so depending on what binaries you have installed in your path, is what cmds you have?...what exactly do u mean 'in your path'? as in, your user?


:confused:

btw, thanks for that samba link, ill install that now :)

Grim Reaper
04-11-2002, 11:27 PM
um, when i burn samba to a cd and copy it onto linux, what cmd do i use to actually extract/install samba?

from the manual on the samba site:

1.2. Step 1: Building the Binaries
To do this, first run the program ./configure in the source directory. This should automatically configure Samba for your operating system. If you have unusual needs then you may wish to run

root# ./configure --help



well, obviously i have to extract samba to a directory...how tho?

btw, thanks for putting up with the newbie questions :)

Bern
04-12-2002, 02:02 AM
If you downloaded a .tar.gz you unpack it with "tar tar xvzf package-name.tar.gz" and it will extract into a directory called /package-name.