CentOS에서 Apache2, PHP5, MySQL 설치

출처 : Fireskill's Blog
Link : CentOS APM설치! yum으로 간단히 해결하기

위의 내용에서 개인적으로 필요한 내용만 올려놓은 것이니, 위의 Link로 이동하셔서 원문을 참고하세요.

  1. Apache2
    # yum -y install httpd
  2. repo 다운로드
    http://wiki.centos.org/ 접속 > How To > Package Management > CentOS Repositories > Remi Collet Repository
  3. Apache2 부팅시 자동 실행
    1. 자동 실행 등록
      # chkconfig --level 2345 httpd on
    2. Apache2 실행
      # service httpd start
  4. PHP5 설치
    # yum -y install --enablerepo=remi php
    # yum -y install --enablerepo=remi gd gd-devel
    # yum -y install --enablerepo=remi libxml2 libxml2-devel
    # yum -y install --enablerepo=remi openssl openssl-devel
    # yum -y install --enablerepo=remi gmp gmp-devel
    # yum -y install --enablerepo=remi mhash mhash-devel
    # yum -y install --enablerepo=remi libmcrypt libmcrypt-devel
    # yum -y install --enablerepo=remi php-mysql
    # yum -y install --enablerepo=remi php-devel
    # yum -y install --enablerepo=remi php-gd
    # yum -y install --enablerepo=remi php-mbstring
    # yum -y install --enablerepo=remi php-mhash
  5. repo 다운로드
    http://wiki.centos.org/ 접속 > How To > Package Management > CentOS Repositories > Extra Packages for Enterprise Linux (EPEL)
  6. MySQL 설치
    # yum -y install mysql mysql-server mysql-connector-odbc mysql-devel
    # cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
    # vim /etc/my.cnf
    # service mysqld start
    # mysql -u root -p mysql