MySQL, Apache and PHP (as a static module)


Recommended Posts

Installing MySQL, Apache and PHP (New and Improved version!!)

-------------------------------------------------------------

OK, i'm not one for going into great detail, so i'm just

going to give you the basic jist of it. Remember, the # is

only there to remind you that you're meant to be running this

stuff as root, you're not meant to actually type the #

Replace VERSION with the version number of the SOURCE tarball

Download the MySQL, Apache and PHP SOURCE TARBALLS and place

them in ~ or something.

# tar zxvf mysql-VERSION.tar.gz

# tar zxvf apache_VERSION.tar.gz

# tar zxvf php-VERSION.tar.gz

-- This next bit is stolen from the MySQL INSTALL-SOURCE file.

-- You'd be suprised how many people start asking how to install

-- things before they actually read this.

# groupadd mysql

# useradd -g mysql mysql

# cd mysql-VERSION

# ./configure --prefix=/usr/local/mysql

# make ; make install

# scripts/mysql_install_db

# chown -R root /usr/local/mysql

# chown -R mysql /usr/local/mysql/var

# chgrp -R mysql /usr/local/mysql

# cp support-files/my-medium.cnf /etc/my.cnf

# /usr/local/mysql/bin/safe_mysqld --user=mysql &

# /usr/local/mysql/bin/mysqladmin -u root -h LOCAL HOST NAME password 'YOUR PASSWORD'

# cd ../apache_VERSION

# ./configure

# cd ../php-VERSION

# ./configure --with-mysql=/usr/local/mysql/ --enable-track-vars &&

--enable-force-cgi-redirect --with-gettext &&

--with-apache=../apache_VERSION

# make ; make install

# cd ../apache_VERSION

# ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a

# make ; make install

and that's pretty much it. please remind me if i've left anything important out.

Link to comment
Share on other sites

heres a list of optional php stuff that u need to make sure that u include in your ./configure of php if u want to play with

--with-gd

the groovey image things.

http://www.pdflib.com/pdflib/index.html

--with-pdflib[=DIR]

pdf stuff. make sure u download and install the above link otherwise you can't exactly tell it where the insall is now can you.

Edited by thedarkavenger
Link to comment
Share on other sites

also, when running the groupadd and useradd it may give a # .......... command not found error, this is because /usr/sbin is not in your path, just cd /usr/sbin and then execute the commands groupadd and useradd

Link to comment
Share on other sites

in the latest version of mysql doesnt have a var folder so i cant chown it, im going to skip that line for now tell me if i need to do anything about it

and there is safe_mysqld in /usr/local/mysql/bin

i found the file i mentioned the line above this, it is acctually called mysqld_safe :p mite want to change that

Edited by Daem0hn
Link to comment
Share on other sites

  • 4 weeks later...

Ouch, this is messy......

>> --prefix=/usr/local/mysql

>> --prefix=/www

Why are you install them all over? You should prefix them to /usr/local, which it's standard. When, you want to add more modules and the result some modules might be broke, because of non-standard and you are making something more complicate than it's supposed to be.

How complicate?

/usr/bin/

/usr/local/bin/

/usr/local/mysql/bin/

/www/bin/(?)

If you prefix it to /usr/local and all exec files will be keep in the /usr/local/bin/, nothing more and nothing less. It's reason why I always love BSD, they are very strict to follow the standard and keep the system very clean. This make much lesser problem, more stable, lesser complicate and easier to admin.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.