[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [seul-edu] apache + php + mysql
I've done things quite differently, I'll note my differences...
First of all, I've gotten Apache + PHP + MySQL to work well with
RPM's also, presently I have MySQL from RPM's and the rest from
compiled source (because I need to use some propietary module's to Apache,
Hush Hush NDAs...)
* Michael A Hamblin (michaelh@utdallas.edu) [991026]:%y12Tue, Oct 26, 1999 at 03:48:49PM -0500]:
>
> Here are the instructions for those of you who might find them valuable,
> though in a raw form. The major assumption is that you are using a RedHat
> system. This doesn't go through configuring virtual hosts and mysql
> tables, but it does get things working.
The way I do things doesn't require a RedHat system, even though that's
what I have...
>
> Apache+MySQL+PHP Installation Instructions
>
> 1. Remove any Redhat installed rpm's for apache or mod_php or mod_php3.
I agree, you might want to keep the /etc/rc.d/init.d/httpd and modify
it for automatic startup and all...
> 2. Untar source distributions for the lastest versions of apache, mysql and php in /usr/local/src
Or whereever (I compile as myself and make install as root...)
>
> 3. Install MySQL. Run the following from the MySQL source directory:
>
> ./configure --prefix=/usr/local/mysql
> make
> make install
> cd /usr/local/mysql
> ./bin/mysql_install_db
> ./bin/safe_mysqld &
> cp share/mysql/mysql.server /etc/rc.d/init.d
> Arrange for /etc/rc.d/init.d/mysql.server to start at system startup.
> Change the root password for mysql by using mysqladmin in bin.
>
> 4. Install PHP. Run the following from the PHP source directory:
>
> ./configure --with-mysql=/usr/local/mysql --with-zlib --enable-debug=no \ --enable-safe-mode=yes --with-exec-dir=/usr/bin --enable-track-vars=yes \
> --enable-bcmath=yes --enable-force-cgi-redirect=yes --enable-discard-path=yes \ --enable-memory-limit=yes
Hmm... If you follow PHP's INSTALL, it says to first configure apache...
So (we are in /usr/local/src):
cd apache-1.3.9/
./configure # Yes, with the default options for now.
cd ../php-3.0.12
./configure --with-mysql --with-apache=../apache_1.3.9 --enable-track-vars
make && make install
cp php3.ini-dist /usr/local/lib/php3.ini
cd ../apache-1.3.9/
./configure --activate-module=src/modules/php3/libphp3.a
make && make install
This will install into /usr/local/apache...
Now edit Apache's configuration (in /usr/local/apache/conf/httpd.conf).
REMEMBER to modify (if necessary)
- the server Port
- the ServerName
- the server admin
- the document root (for example, you can change it to
/home/httpd/html)
- Add the line
AddType application/x-httpd-php3 .php3
- Add 'index.php3 index.htm' to the DirectoryIndex variable
You do not need to copy the icons or cgi-bin directories to the document
root, the aliases in Apache's config handle them.
This way PHP is compiled only as a module, you can not run it on the
command line.
Basically pluggin mod_perl and mod_ssl to apache happens at the
second configuration of apache, you just need to add a few more
options.
Michael's list of what he does had some good hints as well, try and see
what you like best.
I'll get back to you all with the mod_ssl stuff as soon as I redo it
myself (running the server in ssl-mode by default requires some
modifications to the startup scripts...)
If needed, I can supply the help for VirtualHosts as well, we've
hacked together a few with my friends...
ramin
--
Ramin Miraftabi Student of Computer Science
email: ramin@cs.joensuu.fi University of Joensuu
WWW: http://dawn.joensuu.fi/~ramin/ Joensuu, Finland
- GPG public key ID 49C9CFF7 -- (c) Copyright 1999 -