2011.04.16 00:27

apm 설치 yum 이용

조회 수 43683 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

1. APM(Apache + Php + Mysql) 설치

apache, mysql, php순으로 APM을 설치합니다.

 

# yum -y install httpd

# yum -y install mysql

# yum -y install php

 

2. APM 관련 라이브러리 설치

# yum -y install gd gd-devel

# yum -y install libpng libpng-devel

# yum -y install libjpeg libjpeg-devel

# yum -y install freetype freetype-devel

# yum -y install fontconfig fontconfig-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

 

3. MYSQL 설정

 

-MYSQL 설정 파일 생성

경로: /usr/share/mysql/

참고: mysql 설정파일은 my.cnf 파일이며, 이 파일은 mysql 설치시 같이 설치되며 

서버의 메모리에 맞는 설정파일들로나뉘기 때문에 메모리에 맞는 파일을 my.cnf파일로

수정하여 아래와 같이 복사해야합니다. 

 

my-huge.cnf           1GB 이상 메모리

my-large.cnf           512GB ~ 1GB

my-medium.cnf        128MB ~ 256MB

my-small.cnf           64MB 이하

 

# cp /usr/share/mysql/my-large.cnf  /etc/my.cnf

 

-기본관리 DB를 설정하고, 권한지정

 # /usr/bin/mysql_install_db --user=mysql

# chown -R root /usr/bin/

# chgrp -R mysql /usr/bin/

# chown -R mysql /usr/bin/mysql

 

-콘솔에서도 mysql 명령들을 사용 할 수 있도록 설정

 # vi ~/.bash_profile

 

PATH=$PATH:$HOME/bin          

    =>  PATH=$PATH:$HOME/bin:/usr/bin   변경

 

-시스템 부팅시 mysqld 자동실행 설정

# chkconfig --level 2345 mysqld on

 

-설정확인

# chkconfig --list | grep mysqld

 

-mysqld 시작 및 ROOT 계정의 비밀번호 설정

# service mysqld start

# /usr/bin/mysqladmin -u root password [비밀번호 입력]

 

-mysqld 동작 확인

# netstat -lntp

참고: mysql의 포트번호는 3306입니다.

 

"mysqld" "::3306" 포트 확인

 

 4. PHP 설정

 

-php.conf파일 설정

경로: # vi /etc/httpd/conf.d/php.conf

참고: PHP는 웹 프로그래밍 언어입니다. 따로 실행이 필요없으며,

아래의 두 줄을 찾아 아래와 같이 수정하면 됩니다.

 

AddHandler php5-script .php .htm .html

AddType application/x-httpd-php-source .phps .php .htm .html

 

5. Apache 설정 

 

-httpd.conf파일 설정

경로: # vi /etc/httpd/conf/httpd.conf

참고: 아래의 설정값들을 찾아 수정해 주시면 됩니다.

?

#ServerName www.example.com:80            

     => ServerName www.example.com:80    //주석 제거     

 

예) ServerName www.koreu.com:80

(도메인이 있을땐 도메인 입력)

 

 DirectoryIndex index.html index.html.var         

     =>   DirectoryIndex index.html index.htm index.php

          

AddType application/x-gzip .gz .tgz를 찾아 아랫줄에 추가

AddType application/x-httpd-php .htm .html .php .php3 .php4 .inc

AddType application/x-httpd-php-source .phps

 

#AddHandler cgi-script .cgi

     =>   Addhandler cgi-script .cgi    //주석제거

 

 

-시스템 부팅시 httpd 자동실행 설정

# chkconfig --level 2345 httpd on

 

-apache 시작

# /usr/sbin/apachectl start         또는           # service httpd start

 

-mysqld 동작 확인

# netstat -lntp

"httpd" "::80" 포트 확인

 

6. 방화벽 설정

     참고: 리눅스의 방화벽 기본정책은 모든 포트를 막습니다.

     그럼으로, SQL포트 3306번, apache포트 80번을 아래의 설정값을 이용하여 열어주어야 합니다.

      # vi /etc/sysconfig/iptables

 

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT           // 구문 추가

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT           // 구문 추가

 

7. iptables재시작

     # service iptables restart

 

yum으로 APM설치시 웹페이지의첫 페이지인 index파일은

/var/www/html 경로로 설정이됩니다.

 

이상으로 YUM을 이용한 APM 웹서버 구축이 끝이 났습니다.

수고하셨습니다.

?

  1. No Image

    #1040 - Too many connections // XE cannot connect to DB. 이런 에러 나올때

    #1040 - Too many connections XE cannot connect to DB. 이런 에러 나올때 mysql 에서 max_connection 제한때문에 일어나는 에러 현재 msyql max_connetion 확인 #mysqladmin -u root -p variables | grep max_connection mysql 설정파일에서 max_connetion ...
    Date2013.11.20 Views36209
    Read More
  2. #145 - Table './DB/xe_documents' is marked as crashed and should be repaired

    phpmyadmin 에서 #145 - Table './DB/xe_documents' is marked as crashed and should be repaired centos mysqld.log 에서 [ERROR] /usr/local/mysql/libexec/mysqld: Table './DB/xe_documents' is marked as crashed and should be repaired 이런식으로 나...
    Date2014.06.22 Views16961
    Read More
  3. No Image

    (Owncloud) Error while trying to create admin user: An exception occured in driver: could not find driver 에러 해결

    (Owncloud) Error while trying to create admin user: An exception occured in driver: could not find driver 에러 해결 php 확장 모듈에서 php_pdo_mysql.dll 추가 해 주면 됩니다. 테스트 환경 windows7 // autoset8 //mysql 입니다.
    Date2015.02.19 Views4098
    Read More
  4. No Image

    1267 : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' 에러명

    select count(*) as cnt from g4_point where mb_id = 'admin' and po_rel_table = '01_1' and po_rel_id = '1' and po_rel_action = '쓰기' 1267 : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ...
    Date2012.02.21 Views93026
    Read More
  5. No Image

    ajaxplorer 서버세팅

    http://jekyung.com/139
    Date2011.06.05 Views32240
    Read More
  6. No Image

    apache2 재시작, 도메인 변경 방법

    환경설정 vi /usr/local/apache2/conf/httpd.conf 도메인 수정 vi /usr/local/apache2/conf/extra/httpd-vhsots.conf 아파치 재실행 /usr/local/apache2/bin/apachestl restart
    Date2013.07.01 Views30693
    Read More
  7. No Image

    apm 버전 확인 명령어

    rpm -qa | grep httpd rpm -qa | grep mysqld rpm -qa | grep php
    Date2011.04.16 Views46748
    Read More
  8. No Image

    apm 설치 yum 이용

    1. APM(Apache + Php + Mysql) 설치 apache, mysql, php순으로 APM을 설치합니다. # yum -y install httpd # yum -y install mysql # yum -y install php 2. APM 관련 라이브러리 설치 # yum -y install gd gd-devel # yum -y install libpng libpng-devel # y...
    Date2011.04.16 Views43683
    Read More
  9. No Image

    autoset6 db 복원 import

    시작 > 실행 > cmd 실행 cd autoset6servermysqlbin 이동후 c:autoset6servermysqlbin > 밑에 db 복원문 입력 mysql -u root(계정) -p jaggoowa(DB명) < /home/test/public_html/test.sql jaggoowa 라는 DB에 test.sql 복구됨
    Date2011.07.16 Views42150
    Read More
  10. No Image

    Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

    Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. 이런 에러 나올때 php.ini 파일을 연다 파일을 못찾을 경우 centos 에서 명령어 find / -name php.in...
    Date2011.07.24 Views34028
    Read More
  11. No Image

    cband-status 자정 초기화 하기

    vi /home/cband-reset.sh #!/bin/bash wget --http-user=아이디 --http-passwd=패스워드 'http://www.싸이트이름.com/cband-status?reset=all&refresh=15&unit=' 라는 스크립트를 만들어 줍니다. 여기에 사용되는 아이디와 패스워드는 .htpass...
    Date2016.02.20 Views67306
    Read More
  12. No Image

    cband-status 페이지 암호화 하기

    yum 으로 httpd 설치한 환경 입니다. vi /etc/httpd/conf/httpd.conf 에서 다음과 같이 수정해 줍니다. <IfModule mod_cband.c> <Location /cband-status> SetHandler cband-status AuthType Basic AuthName User AuthUserFile /home/cyber87/xe/.htpasswd Aut...
    Date2016.02.20 Views2526
    Read More
  13. No Image

    centos 7 apm + vsftpd 설치 스크립트

    쉘(shell) 스크립트 다운로드 주소 : http://wooriagi.pe.hu/install.sh 웹기본 폴더는 /var/www/html 입니다. 그리고 /etc/httpd/conf/httpd.conf 에서 AllowOverride None 이 부분을 찾아 AllowOverride ALL로 바꿔주셔야 합니다.
    Date2015.12.05 Views2914
    Read More
  14. No Image

    centos eaccelerator 설치 방법

    설치 소스 압축풀고 디렉토리로 이동해서 phpize ./configure make make install php.ini 설정 추가(eaccelerator.so 파일의 경로가 맞도록) extension="eaccelerator.so" eaccelerator.shm_size="16" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerato...
    Date2012.01.04 Views42326
    Read More
  15. No Image

    centos mysql-bin.000001 파일 용량 줄이기

    명령어를 통해 mysql-bin.000001 와 같은 파일이 있는 곳으로 이동 합니다. cd /var/lib/mysql 이동을 하고 다음 명령어 입력 ls mysql-bin.* 그럼 bin 파일들이 나옵니다. 파일이 많으면 그만큼 용량이 차지 하기에 30일 이후에 쌓인 것들을 삭제 하여 줍니다...
    Date2015.01.01 Views6067
    Read More
  16. No Image

    CentOS RPM 버전 확인 명령어

    rpm -qa httpd //버전 확인 rpm -qi httpd //더 상세한 패키지 정보 rpm -qa php rpm -qa mysql
    Date2012.05.09 Views46455
    Read More
  17. No Image

    centos ZendOptimizer 설치 방법

    적당한 위치에서 압축을 풉니다 # tar zxvf ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz 3.3.9 버전부터는 이전버전의 install.sh 이 제공 되지 않습니다 일단 설치된 php버전을 확인합니다 # php -v PHP 5.2.12 (cli) (built: Dec 19 2009 01:51:45) C...
    Date2012.01.04 Views42918
    Read More
  18. No Image

    CentOS 버전 확인 lsb_release -a

    CentOS 버전 확인 lsb_release -a 혹은 다음 파일 중 하나를 열어 확인할 수 있다. /etc/issue /etc/redhat-release
    Date2012.05.09 Views77103
    Read More
  19. No Image

    centos 서버재시작 shoutdown -r now

    (1)shutdown shutdown 명령어는 시스템을 종료하거나 재부팅할 때 사용된다. 사용법 shutdown [옵션] [시간] [메세지] 옵션 -t n: 경고 메시지를 보낸 후 n초 후에 kill 시그널을 보낸다. -h : shutdown시 halt를 실행하게 한다. -n : 디스크 동기화 동작의 수...
    Date2012.01.02 Views46953
    Read More
  20. No Image

    Centos 설치방법

    http://kch1183.blog.me/50099487610 추가, 파티션 나눌때 swap (가상메모리) 램 용량의 x 2 예) ram 2g , swap 4g
    Date2011.04.16 Views31116
    Read More
Board Pagination Prev 1 2 3 4 Next
/ 4