메뉴 건너뛰기

infra

[Fedora8] Apache,PHP,MySQL,Zend,OpenSSL,PEAR 설치

박영식2009.03.04 20:24조회 수 3434댓글 0

    • 글자 크기
yum install gcc
yum -y install gcc cpp gcc-c++ compat-gcc-34-g77 flex openssl*
yum -y install libjpeg-devel libpng-devel freetype-devel gd-devel libtermcap-devel ncurses-devel libxml2-devel libc-client-devel bzip2-devel
#yum -y install libtermcap-devel [MYSQL컴파일에_적용]
#yum -y install ncurses-devel
#yum -y install libxml2-devel [PHP컴파일에_적용]
#yum -y install openssl*
#yum -y install libc-client-devel
#yum -y install bzip2-devel
rpm -qa gcc* cpp* compat-gcc* flex* openssl*
rpm -qa libjpeg* libpng* freetype* gd-*

reboot [패키지_변경시_리부팅_필요]

cd /usr/local/src
wget ftp://ftp.neowiz.com/pub/mysql/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz
tar xvzf mysql-5.0.67.tar.gz
wget ftp://ftp.neowiz.com/pub/apache/httpd/httpd-2.2.10.tar.gz
tar xvzf httpd-2.2.11.tar.gz
wget ftp://ftp.neowiz.com/pub/languages/php/php-5.2.6.tar.gz
tar xvzf php-5.2.6.tar.gz
useradd -M -s /bin/false mysql
cd /usr/local/src/mysql-5.0.67
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all
make && make install
ll /usr/local/mysql
/usr/local/mysql/bin/mysql_install_db --user=mysql
chown -R root.mysql /usr/local/mysql
chown -R mysql /usr/local/mysql/var
vi /etc/skel/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin
vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin
source ~/.bash_profile
cp /usr/local/mysql/share/mysql/my-huge.cnf /etc/my.cnf
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --list mysqld
service mysqld start

cd /usr/local/src/httpd-2.2.11
vi /usr/local/src/httpd-2.2.11/server/mpm/prefork/prefork.c
# define DEFAULT_SERVER_LIMIT 2048
vi /usr/local/src/httpd-2.2.11/server/mpm/worker/worker.c
# define DEFAULT_SERVER_LIMIT 512
# define DEFAULT_THREAD_LIMIT 2048
./configure --prefix=/usr/local/apache --enable-mods-shared=all --enable-so --enable-ssl --enable-modules=ssl --enable-rewrite --with-mpm=prefork

make && make install
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd
# chkconfig: 2345 90 90
# description: init file for Apache server daemon
# processname: /usr/local/apache/bin/apachectl
# config: /usr/local/apache/conf/httpd.conf
# pidfile: /usr/local/apache/logs/httpd.pid
chkconfig --add httpd
chkconfig --list httpd
service httpd start

cd /usr/local/src/php-5.2.6

./configure --with-config-file-path=/etc --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --disable-debug --enable-safe-mode --enable-sockets --enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp --enable-gd-native-ttf --enable-inline-optimization --enable-bcmath --with-zlib --with-jpeg-dir --with-png-dir --with-freetype-dir --with-libxml-dir --enable-exif --with-gd --with-ttf --with-gettext --enable-sigchild --enable-mbstring --with-openssl --with-imap --with-imap-ssl --with-kerberos


make && make install
cp /usr/local/src/php-5.2.6/php.ini-dist /etc/php.ini
vi /usr/local/apache/conf/httpd.conf
User apache
Group apache

ServerName www.hompy.info:80
DocumentRoot "/usr/local/apache/htdocs"

LoadModule ssl_module modules/mod_ssl.so

<IfModule dir_module>
     DirectoryIndex index.html index.htm index.php
</IfModule>

<IfModule mime_module>
     AddType application/x-httpd-php .php .html
     AddType application/x-httpd-php-source .phps
</IfModule>

Include conf/extra/httpd-mpm.conf
Include conf/extra/httpd-vhosts.conf
Include conf/extra/httpd-default.conf
Include conf/extra/httpd-ssl.conf

service httpd restart
rm /usr/local/apache/htdocs/index.html
echo '<?php phpinfo() ?>' > /usr/local/apache/htdocs/index.php

# wget http://meteor.kr/linux/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
cd /usr/local/src
tar xvzf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
cd ZendOptimizer-3.3.3-linux-glibc23-i386
./install.sh
# rm /etc/php.ini
# ln -s /usr/local/Zend/etc/php.ini /etc/php.ini

/usr/local/php/bin/pear upgrade-all
/usr/local/php/bin/pear install DB File Mail Mail_Mime
/usr/local/php/bin/pear install MDB2 MDB2_Driver_mysql MDB2_Driver_mysqli
/usr/local/php/bin/pear install HTTP_Request XML_RPC

vi /etc/skel/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:/usr/local/php/bin
vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:/usr/local/php/bin
source ~/.bash_profile

/usr/local/apache/conf/httpd.conf
#Include conf/extra/httpd-ssl.conf

mkdir /usr/local/apache/conf/ssl
cat > /usr/local/apache/conf/ssl/auto.sh
#!/bin/sh
echo "password" --> your password!!
^D
chmod 700 /usr/local/apache/conf/ssl/auto.sh

vi /usr/local/apache/conf/extra/httpd-ssl.conf

#SSLPassPhraseDialog  builtin
SSLPassPhraseDialog  exec:/usr/local/apache/conf/ssl/auto.sh

DocumentRoot "/usr/local/apache/htdocs"
ServerName www.hompy.info:443
ServerAdmin you@hompy.info

SSLCertificateFile /usr/local/apache/conf/ssl/server.crt

SSLCertificateKeyFile /usr/local/apache/conf/ssl/server.key

service httpd restart
박영식 (비회원)
    • 글자 크기
Apache Server의 키 생성과 인증 (by 박영식) mysql setting (by 박영식)

댓글 달기

이전 1 ... 2 3 4 5 6 7 8 9 10 11다음
첨부 (0)
위로