Skip to content

CHICPRO

  • Life Log
  • Cycling Log
  • Photo Log
    • Portrait
    • Landscape
    • Flower
    • Etc
  • Coding Log
  • Information

CentOS 5.9 Apache 2.2.25 PHP 5.4.17 MySQL 5.5.32 소스 설치

2014-11-18 by 편리

VMWare에 CentOS 5.9를 설치하고 Apache 2.2.25 PHP 5.4.17 MySQL 5.5.32 소스 컴파일 설치를 진행했다. 소스 파일은 각각 아래 사이트에서 다운로드했다.

http://mirror.apache-kr.org/httpd/

http://php.net/downloads.php

ftp://ftp.sayclub.co.kr/mysql/Downloads

0. 설치에 필요한 패키지 설치

# yum install cmake.x86_64
# yum install ncurses-devel
# yum install gd-devel
# yum install libxml2-devel
# yum install curl-devel
# yum install gdbm-devel
# yum install libXpm-devel
# yun install libmcrypt-devel

1. MySQL 설치

# tar xvfz mysql-5.5.32.tar.gz 
# cd mysql-5.5.32
# cmake -DCMAKE_INSTALL_PREFIX=/home/mysql -DMYSQL_DATADIR=/home/mysql/data -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=1 -DWITH_EXTRA_CHARSETS=all
# gmake
# gmake install

2. Apache 설치

# tar xvfz httpd-2.2.25.tar.gz 
# cd httpd-2.2.25
# ./configure --prefix=/home/apache --with-mpm=prefork --enable-headers=shared --enable-rewrite=shared --enable-mods-shared=most --with-ssl --enable-ssl --with-included-apr
# make && make install

3. PHP 설치

# tar xvfz php-5.4.17.tar.gz
# cd php-5.4.17
# ./configure --with-mysql=/home/mysql --with-mysqli=mysqlnd --with-apxs2=/home/apache/bin/apxs --with-gd --with-curl --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr --with-gdbm --with-gettext --with-iconv --with-openssl --enable-gd-native-ttf --enable-exif --enable-magic-quotes --enable-sockets --enable-soap --enable-mbstring=all --enable-bcmath --with-libxml-dir=/usr/lib --enable-ftp --with-mcrypt
# make -j4; make install

 

이렇게 Apache, PHP, MySQL을 소스 컴파일 설치했다. 이제 기본적인 사용을 위한 세팅을 해보겠다.

1. MySQL 설정

# /home/mysql/scripts/mysql_install_db --user=mysql
# cp -a /home/mysql/support-files/mysql.server /etc/init.d/mysqld
# chkconfig --add mysqld
# /home/mysql/bin/mysql -u root mysql 
mysql> update user set password=password('new-password') where user='root';
mysql> flush privileges;
mysql> quit;

2. Apache 설정

# cp -a /home/apache/bin/apachectl /etc/init.d/httpd
# chkconfig --add httpd
# vi /home/apache/conf/httpd.conf

#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
AddType application/x-httpd-php .php .php3 .php4 .html .htm .inc
AddType application/x-httpd-php-source .phps

http.conf 파일에 php 확장자 추가. httpd 등록시 에러가 발생한다면 https://chicpro.dev/9383 참고

3. PHP 설정

# cp -a /root/php-5.4.17/php.ini-development /usr/local/lib/php.ini

php.ini 파일을 복사한 후 설정 변경

Post navigation

Previous Post:

VMWare에 CentOS 5.9 설치

Next Post:

서버의 PHP 5.4.17로 업데이트

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • php 배열 연산에서 + 와 array_merge 의 차이
  • pcntl_fork 를 이용한 다중 프로세스 실행
  • 아이폰 단축어를 이용하여 주중 공휴일엔 알람 울리지 않게 하기
  • 구글 캘린더 전체일정 재동기화
  • OpenLiteSpeed 웹서버에 HTTP 인증 적용
  • OpenLiteSpeed 웹어드민 도메인 연결
  • WireGuard를 이용한 VPN 환경 구축
  • Ubuntu 22.04 서버에 OpenLiteSpeed 웹서버 세팅
  • 맥 vim 세팅
  • 우분투 시스템 터미널쉘 zsh 로 변경

Recent Comments

  • 편리 on 업무관리용 그누보드 게시판 스킨
  • 임종섭 on 업무관리용 그누보드 게시판 스킨
  • 캐논 5D 펌웨어 | Dslr 펌웨어 업그레이드 방법 82 개의 베스트 답변 on 캐논 EOS 30D 펌웨어 Ver 1.0.6 , EOS 5D 펌웨어 Ver 1.1.1
  • Top 5 캐논 5D 펌웨어 Top 89 Best Answers on 캐논 EOS 30D 펌웨어 Ver 1.0.6 , EOS 5D 펌웨어 Ver 1.1.1
  • 편리 on 워드프레스 애니메이션 gif 파일을 mp4로 변환하여 출력하기
  • 임팀장 on 워드프레스 애니메이션 gif 파일을 mp4로 변환하여 출력하기
  • 편리 on Notepad++ NppFTP 플러그인 수동 설치
  • paul-j on Notepad++ NppFTP 플러그인 수동 설치
  • YS on Windows 10 iCloud 사진 저장 폴더 변경
  • 편리 on Docker를 이용한 Centos7 + httpd + php 5.4 개발환경 구축

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 CHICPRO | Built using WordPress and SuperbThemes