LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Apache PHP MySQL Setup after Slackware 9.0 Installation (https://www.linuxquestions.org/questions/slackware-14/apache-php-mysql-setup-after-slackware-9-0-installation-54320/)

initself 04-09-2003 11:47 PM

Apache PHP MySQL Setup after Slackware 9.0 Installation
 
For whatever reasons, Apache, PHP and MySQL are not fully setup for use after an initial Slackware 9.0 installation. Below are some steps that helped me quickly setup all three:

Apache/PHP/MySQL Setup

1. Set Apache to boot at startup:

chmod 755 /etc/rc.d/rc.httpd

2. Add PHP support to httpd.conf:

vi /etc/apache/httpd.conf

#add the following to sections containing similar code:

LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

You might want to also add an index.php entry to the DirectoryIndex section as well:

#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>


3. Set permissions on MySQL files:

cd /var/lib
chown -R mysql mysql mysql
chgrp -R root mysql mysql
su mysql
#prompt changes from # to $
mysql_install_db
safe_mysqld --user=mysql & #hit enter once the db loads
exit
#prompt changes from $ to #
mysqladmin -u root status #verify the database is running

4. Add MySQL to startup scripts::

vi /etc/rc.d/rc.local
echo Starting MySQL server:
safe_mysqld --user=mysql &
sleep 2

Good Luck!

mb

320mb 04-10-2003 06:00 PM

Slack 9 does have some probs yes, here is a bug I found.....
the kernel configurator does not even get installed on my system, and the Bash setup in not complete either. I have a Slack subscription, so I have the 4 CD set. I am gonna put 8.1 back in and just upgrade everything and see how it works.:study:

rivang 05-06-2003 08:34 PM

Location of Apache on Slackware 9.0
 
I am trying to install Apache 2.0 on Slackware 9.0... using DevShed's "The Soothingly Seemless Setup of Apache, SSL, MySQL and PHP guide.

What is the location of the default install of Apache in Slackware 9.0?

I am looking to install Apache 2.0 in /usr/local per the instructions from the guide mentioned above.

The recommended paths are

/usr/local/apache
/usr/local/mysql
/usr/local/ssl

Can you uninstall the default installation of Apache, SSL, MySQL and PHP?

initself 05-08-2003 10:32 AM

Re: Location of Apache on Slackware 9.0
 
Quote:

What is the location of the default install of Apache in Slackware 9.0?
/etc/apache - index.html is located in /etc/apache/htdocs

You can add your own index.html file in this directory to test.
Quote:

Can you uninstall the default installation of Apache, SSL, MySQL and PHP?
I understand your desire to work within the guidelines of your book but one of the great things about Slackware 9.0 is that it handles the installation for you.

If you follow the directions in my first post, you'll have everything installed and working in 10 minutes. Then you can concentrate on what's important: using these tools!

If you really want to uninstall these modules, use the 'pkgtool' command as root and remove the packages.

mb

tentonipete 05-27-2003 06:19 AM

genius - that setup tip is great thanks

*scribbles it down*

immortal 06-29-2003 10:28 AM

great tips

thnx

Astro 06-29-2003 02:36 PM

Personally I never liked how slack installed apache/php/sql from 8.0, so I install them myself from source. :-)

C++freak 06-30-2003 02:18 AM

That is a good peice of advice. That has been stored away in my collection of priceless documents (HOW-TOs, Guides, etc), in a very secure place. Thanks!

deanglass 06-30-2003 05:19 AM

htdocs location in default RH9 setup
 
Hello all,

This is my first thread in this forum, so be gentle.

Main problem:

Cannot find htdocs folder in my RH9 installation.
-----
I am trying to locate the usual html file to replace with my content but for some reason cannot find it! I have viewed /etc/httpd/conf/httpd.conf to see the location of the server is poniting at /var/www/html/, which is empty. I have tested http://localhost in mozilla and everything is ok, but it is wierd that i cannot find the main directories. Is there a generic 'search' terminal command that would get me out of future situations like this?

Thanx in advance

initself 06-30-2003 10:52 AM

Deanglass,

This forum is for information regarding the 'Slackware' distribution, not RH9. I would suggest posting here:

http://www.linuxquestions.org/questions/forumdisplay.php?s=&forumid=5

Thanks.
.
mb

ignavus 07-24-2003 01:24 AM

A very helpful thread, initself.

I've been having trouble installing and running MySQL since I obtained it a few days ago, until I figured out it actually is installed as a package along with Slackware. Using the few steps you mentioned had the server up and running in less than five minutes.

Now I just have to figure out how to upgrade it to the newest version of MySQL - as the one provided with Slackware 9.0 only is 3.23.56.


Thanks alot.


:study:

woodsta 07-30-2003 11:08 AM

Hi, newcomer to slackware (recent convert from debian), so excuse any lame/obvious questions.

I've tried the method for setting up mysql after installing a fresh copy of slack9, but I appear not to have a mysql dir in /var/lib - seem to have the rest of mysql installed ok.

Cheers,

initself 07-30-2003 11:23 AM

Full Installation?
 
Quote:

Originally posted by woodsta
I've tried the method for setting up mysql after installing a fresh copy of slack9, but I appear not to have a mysql dir in /var/lib - seem to have the rest of mysql installed ok.
Can you verify that your Slackware 9.0 installation was a full installation?

mb

woodsta 07-30-2003 11:58 AM

Re: Full Installation?
 
Quote:

Originally posted by initself
Can you verify that your Slackware 9.0 installation was a full installation?

mb

as far as I remember, it was a full install.

initially, /usr/share/mysql/mysql.server start crashed out as /var/lib/mysql/ dir was not found, I have now created the mysql dir in /var/lib, and no longer gives the directory not found error.

now when I run the following:
# cd /usr ; /usr/bin/safe_mysqld &
[1] 1043

I get this:
# Starting mysqld daemon with databases from /var/lib/mysql
030730 17:05:06 mysqld ended

and mysqld exits straight away (presumably due to finding no databases).

Cheers,

initself 07-30-2003 12:06 PM

Re: Re: Full Installation?
 
Quote:

Originally posted by woodsta
[B]as far as I remember, it was a full install.
If you are just starting out with your installation, I would try it again from the start and make sure you install every package. I can't imagine that any Slackware 9.0 full installation would differ on the placement of the mysql installation directory.

You shouldn't have to create any directories at all. You should just be able to follow my instructions line by line.

mb


All times are GMT -5. The time now is 09:31 AM.