Page 1 of 1

Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 16:16
by marry
Tach auch!

Habe nun schon mehrere HowTows für Updates auf Apache2 und MySQL4 gelesen und gestestet. Entweder die Links waren nicht mehr aktuell oder es waren Fehler in der Anleitung.

Die Anleitung auf http://www.rootforum.org/forum/viewtopic.php?t=5268 enthält beispielsweise keine aktuellen Links. Wenn man diese selber aktualisiert und die neuen Datein nimmt, so erhält man Schrott (oder zumindest ich).

Kennt irgend jemand ein gutes HowTo mit aktuellen Links oder kann mir sonst einen Rat geben?

Danke schön =)


Marry


1&1 RootServer - SuSe Linux 8.1

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:08
by alexander newald
Source:

http://ftp.gwdg.de/pub/misc/mysql/Downl ... .13.tar.gz

http://www.apache.de/dist/httpd/httpd-2.0.46.tar.gz

mysql bauen:

Code: Select all

groupdel mysql 1>/dev/null 2>/dev/null
userdel mysql 1>/dev/null 2>/dev/null
groupadd -g 150 mysql                                                                                                                           || exit 1
useradd -u 150 -c mysql -d /dev/null -g mysql -s /bin/false mysql                                                                               || exit 1

mkdir -p /home/mysqld                                                                                                                           || exit 1
chown mysql.mysql /home/mysqld                                                                                                                  || exit 1

cp configure configure.old && sed -e "s%mysql-test/Makefile%%" -e "s% mysql-test%%" configure.old > configure                                   || exit 1

./configure                                             
        --prefix=/usr                                   
        --sysconfdir=/etc                               
        --libexecdir=/usr/sbin                          
        --enable-thread-safe-client                     
        --enable-assembler                              
        --localstatedir=/home/mysqld                    
        --with-mysqld-user=mysql                        
        --without-debug                                 
        --with-openssl                                  
        --with-vio                                      
        --without-bench                                                                                                                         || exit 1

make                                                                                                                                            || exit 1
make install                                                                                                                                    || exit 1

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf                                                                                                   || exit 1

mysql_install_db                                                                                                                                || exit 1
chown -R mysql:mysql /home/mysqld                                                                                                               || exit 1

cat > /etc/rc.d/init.d/mysql << "EOF"
#!/bin/bash

source /etc/sysconfig/rc
source $rc_functions

case "$1" in
        start)
                echo "Starting MySQL daemon..."
                /usr/bin/mysqld_safe 2>&1 >/dev/null &
                evaluate_retval
                ;;

        stop)
                echo "Stopping MySQL daemon..."
                killproc mysqld
                ;;

        restart)
                $0 stop
                sleep 1
                $0 start
                ;;

        status)
                statusproc /usr/sbin/mysqld
                ;;

        *)
                echo "Usage: $0 {start|stop|restart|status}"
                exit 1
                ;;
esac

# End $rc_base/init.d/
EOF
chmod 755 /etc/rc.d/init.d/mysql                                                                                                        || exit 1

cd /etc/rc.d/init.d                                                                                                                     || exit 1
ln -sf ../init.d/mysql ../rc0.d/K26mysql                                                                                                || exit 1
ln -sf ../init.d/mysql ../rc1.d/K26mysql                                                                                                || exit 1
ln -sf ../init.d/mysql ../rc2.d/K26mysql                                                                                                || exit 1
ln -sf ../init.d/mysql ../rc3.d/S34mysql                                                                                                || exit 1
ln -sf ../init.d/mysql ../rc4.d/S34mysql                                                                                                || exit 1
ln -sf ../init.d/mysql ../rc5.d/S34mysql                                                                                                || exit 1
ln -sf ../init.d/mysql ../rc6.d/K26mysql                                                                                                || exit 1

echo "/usr/lib/mysql" >> /etc/ld.so.conf                                                                                                || exit 1
apache bauen:

Code: Select all

userdel wwwrun 1>/dev/null 2>/dev/null
groupdel wwwrun 1>/dev/null 2>/dev/null

groupadd -g 175 wwwrun                                                                                                                          || exit 1
useradd -u 175 -c apache2 -d /dev/null -g wwwrun -s /bin/false wwwrun                                                                           || exit 1

./configure                                                             
        --prefix=/usr/local/apache2                                     
        --sysconfdir=/etc/httpd                                         
        --enable-auth-anon                                              
        --enable-ext-filter                                             
        --enable-logio                                                  
        --enable-mime-magic                                             
        --enable-cern-meta                                              
        --enable-expires                                                
        --enable-headers                                                
        --enable-usertrack                                              
        --enable-unique-id                                              
        --enable-ssl                                                    
        --enable-dav                                                    
        --enable-info                                                   
        --enable-cgi                                                    
        --enable-dav-fs                                                 
        --enable-speling                                                
        --enable-rewrite                                                
        --enable-suexec                                                 
        --with-suexec-caller=wwwrun                                     
        --with-suexec-userdir=/                                         
        --with-suexec-docroot=/home                                     
        --with-mpm=worker                                                                                                                       || exit 1

make                                                                                                                                            || exit 1
make install                                                                                                                                    || exit 1

cat > /etc/rc.d/init.d/apache2 << "EOF"
#!/bin/bash

source /etc/sysconfig/rc
source $rc_functions

case "$1" in
        start)
                echo "Starting apache2 daemon..."
                /usr/local/apache2/bin/apachectl start 2>&1 >/dev/null &
                evaluate_retval
                ;;

        stop)
                echo "Stopping apache2 daemon..."
                /usr/local/apache2/bin/apachectl stop
                ;;

        restart)
                $0 stop
                sleep 1
                $0 start
                ;;

        status)
                statusproc /usr/sbin/
                ;;

        *)
                echo "Usage: $0 {start|stop|restart|status}"
                exit 1
                ;;
esac

# End $rc_base/init.d/
EOF
chmod 755 /etc/rc.d/init.d/apache2                                                                                                        || exit 1

cd /etc/rc.d/init.d                                                                                                                       || exit 1
ln -sf ../init.d/apache2 ../rc0.d/K26apache2                                                                                              || exit 1
ln -sf ../init.d/apache2 ../rc1.d/K26apache2                                                                                              || exit 1
ln -sf ../init.d/apache2 ../rc2.d/K26apache2                                                                                              || exit 1
ln -sf ../init.d/apache2 ../rc3.d/S34apache2                                                                                              || exit 1
ln -sf ../init.d/apache2 ../rc4.d/S34apache2                                                                                              || exit 1
ln -sf ../init.d/apache2 ../rc5.d/S34apache2                                                                                              || exit 1
ln -sf ../init.d/apache2 ../rc6.d/K26apache2                                                                                              || exit 1
So habe ich es gemacht

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:13
by marry
Was muss ich als Linux-noob nun mit dem COde machn? ;)

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:17
by oxygen
*hüstel* aktuell ist 2.0.47

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:19
by marry
Ja - hilft mir dennoch nicht weiter ;)

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:31
by alexander newald
øxygen wrote:*hüstel* aktuell ist 2.0.47
Na ja, seit 2 Tagen... hat 2.0.46 mit 2.0.47 ersetzen und gut ist...

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:36
by marry
Ach fuck ... nun habsch die httpd.conf net gsichert ... fuck fuck fuck

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:42
by alexander newald
Nie??? Das ist schlecht!!!

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:52
by marry
Ã?y ... NÃ? EY!

anstatt mv schreib ich doch glatt rm und lösch die sicherung

äy ne ey ... boah ... ich bin jetzt sauer

Re: Apache2 & MySQL 4 - _Funktionierendes_ HOWTO

Posted: 2003-07-09 17:59
by alexander newald
Bei sowas besser cp machen. Aber jetzt ist es wohl zu spät...