General discussion

Locked

Fedora Web Server Installation Issues

By sneakers ·
I am trying to setup a Fedora distro to serve as a web server with Apache, PHP, mySQL, Perl, Python, etc... I installed everything and there is no GUI, which is fine since the box will run faster without it. I ran yum check-update for a list of available updates and then ran yum update to get them. I was able to turn on Apache by running apachectl start.

I am unsure how to do the following:

Best practices on security and services - is there a utility i can run from a windows machine that will target the server and tell me of potential problems with the box (sort of like Microsoft Baseline Security Analyzer)

I don't understand where the actual files go after Apache starts. I did a dir command at the root prompt and there are no directories anywhere.

Is there a command to get a list of all installed apps that I can print out. Most of the time after I type a command it gets piped to the screen and most of the content scrolls off so you can't see it.

Is there a remote utility (like webmin) that I can run from another machine that has a GUI that will allow me to edit config files and setup the specific applications. I want to setup this box as a test server for a web development.

Is there a way to startup Apache, mySQL and PHP after the box boots or are those items automatically added to some startup process after the first time i initiate them?

I have read plenty of faqs and books, but they all approach it from a generic standpoint (downloading the specific app, running config and make, etc...). I am assuming that Apache and the other apps have already been installed and setup based on the installation from Fedora. Am I wrong in assuming this?

Is there a specific faq I can turn to for people who are doing just what I am doing with Fedora?

I don't need to do this with Fedora - I am willing to use any distro as long as it is easy to use and setup. I don't mind learning, but I don't want this to take up too much time...

Any help from the experts is greatly appreciated!!! Thanks in advance...

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Expert answers :-)

by jmgarvin In reply to Fedora Web Server Install ...

1) Best practices on security and services - is there a utility i can run from a windows machine that will target the server and tell me of potential problems with the box (sort of like Microsoft Baseline Security Analyzer)

- Bastille Linux is probably your best bet to lock down you box.

2) I don't understand where the actual files go after Apache starts. I did a dir command at the root prompt and there are no directories anywhere.

- I don't think I understand. You have to create an index.html in /var/www/html for more info check /etc/httpd/conf.d/welcome.conf

3) Is there a command to get a list of all installed apps that I can print out. Most of the time after I type a command it gets piped to the screen and most of the content scrolls off so you can't see it.

- rpm -qa

4) Is there a remote utility (like webmin) that I can run from another machine that has a GUI that will allow me to edit config files and setup the specific applications. I want to setup this box as a test server for a web development.

- why don't you use webmin?

5) Is there a way to startup Apache, mySQL and PHP after the box boots or are those items automatically added to some startup process after the first time i initiate them?

- Yes.
service httpd start
service mysqld start

6) I have read plenty of faqs and books, but they all approach it from a generic standpoint (downloading the specific app, running config and make, etc...). I am assuming that Apache and the other apps have already been installed and setup based on the installation from Fedora. Am I wrong in assuming this?

If you did an everything install or installed the web apps you should be ok. If you didn't simply yum them:
yum install apache
yum install mysql
yum install php

7) Is there a specific faq I can turn to for people who are doing just what I am doing with Fedora?

fedorafaq.org

I don't need to do this with Fedora - I am willing to use any distro as long as it is easy to use and setup. I don't mind learning, but I don't want this to take up too much time...

Hope that helps. I suggest getting the Red Hat System Administartion Guide from Red Hat Press. This should help you along.

Collapse -

more color in the picture

by apotheon In reply to Expert answers :-)

1) I'm not sure what tools there are that will run on a Windows box natively for testing Linux security configurations. There's a whole bunch of stuff for Linux, though, and you should be able to run some of that from within Cygwin, which you can install on a Windows machine to emulate a Linux shell environment.

2) Dir command? Are you talking about using ls to get the contents of the current working directory?

3) If a shell command's output scrolls off the top of the screen, you can do one of two things to make it easier to view:

a. Pipe it through less, using the "pipe" (vertical bar, or |, on the keyboard) character. Thus, to pipe rpm -qa through less, you'd enter rpm -qa | less. You can then use the arrow keys to move up and down one line at a time, or use Ctrl-D and Ctrl-U to move down or up (respectively) half a screen at a time. There's more you can do, but that's the important stuff. To end the use of less (what we call a "pager" program), hit the Q key.

b. Redirect the output of your command to a file. You use the greater-than symbol to do this, and specify a filename to which the data should be saved. For instance, if you want to save the data in a file called rpmoutput.txt, you'd enter rpm -qa > rpmoutput.txt. Make sure you don't name it the same as something else you want to keep, because it will overwrite another file with the same name. Filenames are case-sensitive, though, so foo.txt is not the same as foo.TXT or Foo.txt. Of course, foo.txt isn't the same as foo, either, and unlike Windows your computer doesn't usually care what the file extension is: that's just to help you remember what type of file you're using. Then, of course, you need to read your file -- which can be done with less, like so: less rpmoutput.txt.

5) Two other ways to "manually" start these servers have already been mentioned by jmgarvin and Jaqui. Another option is to navigate to /etc/init.d and see if the services are there. If they are, you can start them with commands like ./httpd start and ./mysqld start. Of course, that ./ has to be at the beginning of it if you want to use relative paths and are inside that directory. You could also specify the full, absolute path, like so: /etc/init.d/httpd start and /etc/init.d/mysqld start. If they're already running and you want to restart them, you should be able to do so by substituting restart for start in the command syntax. If you just want to stop them, use stop instead. To check on whether they're already running, you can use ps ax to get a list of running processes (or ps aux if you want more information about each running process). If you want to know whether they're automatically starting when you boot the machine, you can use ls in the rc5.d directory, like so: ls /etc/rc5.d (assuming your system is running at runlevel 5 -- to find out what runlevel you're in, just enter runlevel at the shell prompt, then you can substitute the runlevel number for the number 5 in rc5.d).

Aside from the fact that yum is sometimes a problem (at least for my tastes), there's no particular reason setting this up with Fedora should be any more difficult than most other distributions. I tend to find everything easier on Debian, but I think jmgarvin would disagree on that score. Either way, it's generally the case that everything gets easy once you get familiarized with the basic unix way of doing things and, to some degree, your specific distribution's way of doing things. Good luck with all of that, and don't be shy about asking for help. Most of us who are fairly conversant in the workings of Linux are quite willing to share your knowledge and experience.

Collapse -

hmm

by Jaqui In reply to Fedora Web Server Install ...

Is there a way to startup Apache, mySQL and PHP after the box boots or are those items automatically added to some startup process after the first time i initiate them?

if you installed apache & mysql as servers and enabled ( default ) then they are starting during the boot sequence.

I would look at the /etc/http/conf/httpd_common.conf
and
/etc/http/conf/httpd.conf

make sure mod_php is enabled.
php starts when apache calls it.

there is also apachectl
apachectl stop
apachectl start
apachectl restart

this will do exactly what the end of the command sequence says.

also,
php.net has lots of resources for php.
apache.org for apache. ( httpd_users mailing list )
and mysql.com for mysql specific questions.

but red hat's website will have the best answers to red hat product questions.

Back to Linux Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums