본문 바로가기
  • AI (Artificial Intelligence)
Skills/Web

CentOS 64bit APM 소스 설치

by 로샤스 2015. 9. 23.

APM을 yum으로 설치합니다.

(이전 apm을 삭제 하시려면 # yum -y remove httpd* php* mysql*)

이 순서대로 설치 할 것.

# yum -y install httpd
# yum -y install mysql
# yum -y install php 



관련 추가 패키지 설치
# yum -y install gd gd-devel
# yum -y install libxml2 libxml2-devel
# yum -y install openssl openssl-devel
# yum -y install gmp gmp-devel
# yum -y install mhash mhash-devel
# yum -y install libmcrypt libmcrypt-devel
# yum -y install mysql-server
# yum -y install php-mysql
# yum -y install php-devel
# yum -y install php-gd
# yum -y install php-mbstring
# yum -y install php-mhash


설치는 끝입니다. 하지만 사용을 위해 몇몇 설정들을 바꾸어 줍시다.

콘솔에서도 mysql 명령들을 사용 할 수 있도록 설정.
# vim ~/.bash_profile
PATH부분에 다음과 같이 추가 한다
PATH=$PATH:$HOME/bin:/usr/bin 


재부팅 후 자동으로 실행 할 수 있도록 등록만 해주면 된다.
mysql 설정 확인
# chkconfig  --list | grep mysqld

2345를 켜주면 된다. 
# chkconfig --level 2345 mysqld on

mysql를 시작하고 루트 비밀번호를 설정
# /etc/rc.d/init.d/mysqld start
# /usr/bin/mysqladmin -uroot password 비번

작동 확인
# netstat -lntp
화면에서   "3306"(디폴트 포트값) "mysqld" 이 보이면 된다.

php설정
# vim /etc/httpd/conf.d/php.conf

아래와 같이 수정.
AddHandler php5-script .php /html
AddType text/html .php
AddType application/x-httpd-php-source .phps .php .html

httpd 수정
# vim /etc/httpd/conf/httpd.conf

Options Indexes FollowSymLinks 
-> Options -Indexes

AllowOverride None
-> AllowOverride All

AddType application/x-gzip .gz .tgz 을 찾아 아래와 같이 수정(추가)
AddType application/x-tar .tgz
AddType application/x-httpd-php .php .ph .php3 .php4 .phtml .inc .html
AddType application/x-httpd-php-source .phps

# AddHandler cgi-script .cgi
-> AddHandler cgi-script .cgi (주석삭제)


# vim /etc/php.ini
short_open_tag Off 
-> 
short_open_tag On 
(
 <?php 를 <? 로도 사용할 수 있게 함 / 보안상의 문제로 사용하지 않는 추세)

 
 

아파치 설정 

# chkconfig  --list | grep httpd
 
역시 2345를 켜준다.
# chkconfig --level 2345 httpd on

# /usr/sbin/apachectl start
# netstat -lntp
아까보다 한줄이 추가되어 ":80" "httpd"같은 단어들이 보여질 것이다.

# vim  /etc/sysconfig/iptables 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT (추가)

# service iptables restart

마지막으로
#yum update
#reboot

CentOS에서는 기본적으로
/var/www/html
  
가 루트가 됩니다. 즉 이곳에 test.php 추가하면
localhost/test.php를 주소창에 치면 확인하실수 있습니다.








출처 : http://netfree.tistory.com/

할줄안다고.. 별걸다 하라고하네.. web을 한지 한참이 지났는데..
시키면 다하는 이런근성.. 좋지 않아요^^;;

아래 레퍼런스는 APM 설치하면서 참조하시면 좋을듯합니다.
사실 거기서 거기에요.. 비슷한 내용이지만 혹시나 누락된 내용이 있으면 참조하시면 좋을듯합니다.


레퍼런스 : 

1. http://calflove.tistory.com/335
2. http://egloos.zum.com/igniter/v/11022746
3. http://luckyyowu.tistory.com/105


















'Skills > Web' 카테고리의 다른 글

jQuery를 이용한 Modal 생성  (0) 2015.12.31
How to install Tomcat on CentOS 7  (0) 2015.12.23
Installing MySQL Server on CentOS  (0) 2015.09.23
CentOS - Apache and PHP Install  (0) 2015.09.23
[Web] Attributes > placeholder  (0) 2014.12.29

댓글