apache 2.2 설치
tar xvfz apr-1.5.1.tar.gz
cd apr-1.5.1
./configure --prefix=/usr/local/apr
make && make install
tar xvfz apr-util-1.5.4.tar.gz.
cd apr-util-1.5.4
./configure --with-apr=/usr/local/apr
make && make install
cd /usr/local/src
tar xvfz httpd-2.2.x.tar.gz
cd httpd-2.2.x
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite --enable-mods-shared=all --enable-modules=shared --enable-ssl --with-included-apr=/usr/local/apr --with-included-apr-util --with-mpms-shared=all
make && make install
cp -arp /usr/local/apache/bin/apachectl /etc/init.d/
vi /etc/init.d/apachectl
아래 내용 기입.
# 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
설정 파일 수정
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .jsp .html
#AddHandler cgi-script .cgi <- 주석 해제
chkconfig --add apachectl
chkconfig apachectl on
/etc/init.d/apachectl start 명령어로 시작 하였으나, 데몬이 실행되지 않았다.
로그 확인 시 계정명을 찾을 수 없다는 에러가 확인 되었으며, /etc/hosts 파일에 (서버ip) (계정명) 기입 후 정상적으로 실행되었다.
--------------------------------------------------------------------------------
php 5.3.x 설치
tar xvfz libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make && make install
tar xvfz mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make && make install
tar xvfz php-5.3.21.tar.gz
cd php-5.3.21
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --with-mysql=/usr/local/mysql --with-mod_charset --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-jpeg-dir --with-tiff-dir --with-curl --enable-dba --with-gdbm --enable-dbx --with-dom --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-iconv --with-imap --with-libdir=lib64 --with-imap-ssl --with-kerberos --enable-mbstring --with-openssl-dir --with-mhash --with-mcrypt --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-sockets --with-regex=php --enable-zend-multibyte --with-zip
make
make install
cp php.ini-development /usr/local/apache/conf/php.ini
vi /usr/local/apache/conf/php.ini
short_open_tag = On
allow_url_fopen = Off
post_max_size = 100M
upload_max_filesize = 100M
php 5.3 make 에러
Generating phar.phar
/usr/local/src/php-5.3.21/sapi/cli/php: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory
make: *** [ext/phar/phar.phar] 오류 127
--> /lib64 디렉토리에 해당 파일의 심볼릭링크를 생성하니 해결 되었다.
# ln -s /usr/local/lib/libmcrypt.so.4 /usr/local/lib64/
php 5.4 + mariad 연동 에러
make 시 undefine MYSQL_PORT 아래 링크 참고하여 해결
https://growup43.com/353/
---------------------------------------------------------------------------------------
mysql 5.1.x 설치
groupadd -g 400 mysql
useradd -u400 -g400 -d /usr/local/mysql -s /bin/false mysql
tar xvfz mysql-5.1.63.tar.gz
./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-mysqld-user=mysql --with-extra-charsets=all --with-plugins=max --enable-thread-safe-client --with-charset=utf8
make
make install
cp -arp support-files/my-huge.cnf /etc/my.cnf
cp -arp support-files/mysql.server /etc/init.d/mysqld
/usr/local/src/mysql-5.1.63/scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql
chown -R mysql.mysql /usr/local/mysql
chmod 700 /etc/init.d/mysqld
chmod 711 /usr/local/mysql
chmod 700 /usr/local/mysql/data
chmod 751 /usr/local/mysql/bin
chmod 750 /usr/local/mysql/bin/*
chmod 755 /usr/local/mysql/bin/mysql
chmod 755 /usr/local/mysql/bin/mysqldump
chkconfig --add mysqld
chkconfig mysqld on
/etc/init.d/mysqld start
update user set password = password('비번') where user='root';