LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   To install Apache server on SuSe (https://www.linuxquestions.org/questions/suse-opensuse-60/to-install-apache-server-on-suse-278387/)

sumi 01-16-2005 06:10 AM

To install Apache server on SuSe
 
During my installation, I encountered a lot of problems. Here, I want to share my experience with all of you. Hope this is helpful.

Install the Apache on suSE

1. Download Apache

2. Extract
$ gzip -d httpd-2_0_52.tar.gz
$ tar xvf httpd-2_0_52.tar

3.Configure
$ ./configure --prefix=PREFIX
--prefix=PREFIX
Install architecture-independent files in PREFIX. By default the installation directory is set to /usr/local/apache2.

On this step, you may get "error: C compiler cannot create executables", then you need to install gcc, binutils and glibc-devel first on Yast before the configuration, for the detail, pls follow appendix ( HowTo make a Pro out of SuSE 9.1 Personal, here I would like to thank abisko00. )

4.Compile
$ make
If you get "make: command not fund" error, please intall the make package first from Yast.

5.Install
$ make install

6.Customize
$ vi PREFIX/conf/httpd.conf
If vi command not fund, then install vim package first

7.Test
$ PREFIX/bin/apachectl start
Maybe you will get that "no such file or directory" error, pls make sure that last character of "apachectl" is the small case of "L"!!!
then you should be able to request your first document via URL "localhost" :)

8.Now u can upload your own .pl script into /usr/local/apache2/cgi-bin/, for example hello.pl:

#!/usr/local/bin/perl

print "Content-type: text/plain\n\n";
print "Hello world!\n";

When u refer to the "localhost/cgi-bin/hello.pl" on browser, you may get "500 Internal Server Error". This is caused by the perl.exe directory is incorrect.

Solution:
linux:/usr/local/apache2/conf # which perl
/usr/bin/perl

Ok, now you know that perl is on "/usr/bin/perl" instead of "/usr/local/bin/";

Have a fun!!

*************************************************************************
Appendix:

HowTo make a Pro out of SuSE 9.1 Personal (by abisko00)

As a SuSE 9.1 Personal user, you may have recognised that the available software is very limited on your CD. Here I would like to show you how to get easy access to all the missing packages that make the difference between Pro and Personal (kernel sources, compiler, devel packages, gnome, etc.).


- First, find a close server that mirrors the main SuSE server (ftp.suse.com) at suse website

- Open Yast -> Software -> Change Source of Installation

- Click 'Add'

- Now select the protocol the mirror uses (most use FTP, some are HTTP)

- Enter the server: ftp.suse.com

- Enter ther directory: pub/suse/i386/9.1
Note that there is no slash at the beginning of the path! You also need to adjust the path to the structure of your mirror.Change the red entry to your architecture. Available are i386 and x86_64. Change the blue entry to your version. Available for i386 are 8.1/8.2/9.0/9.1/(9.2 in january).

- Confirm and press 'Finish'


Now you are able to use the specified server as if you had a CD in your drive.
Simply use Yast -> Software -> Install and Remove Software to install the required programs.

sumi 01-16-2005 06:15 AM

Because it is my first post, the server did not allow me to post the URL inside the text, I skipped some URL links. :(

The following is what I get when I posted, stupid things! :(

Sorry, in order to post a URL you must have at least 5 posts. This measure was put into place to prevent spamming. Please remove the URL and try again. Posting extra threads to get around this rule will result in all threads being removed.


All times are GMT -5. The time now is 04:07 PM.