2011.04.16 00:27

apm 설치 yum 이용

조회 수 43681 추천 수 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 웹서버 구축이 끝이 났습니다.

수고하셨습니다.

?

List of Articles
번호 제목 날짜 조회 수
64 xe 에서 최근게시물 깨져서 나올때 ./widget/content/폴더의 content.class.php 파일을 이전 버전이랑 대조해가면서 보니 256번째 줄 근처에 아래와 같은 보안관련 코딩이 추가되었더군요. 일단은 주석처리하면 위 문제는 해결됩니다. // $oSecurity->e... 2015.12.24 2466
63 cband-status 페이지 암호화 하기 yum 으로 httpd 설치한 환경 입니다. vi /etc/httpd/conf/httpd.conf 에서 다음과 같이 수정해 줍니다. <IfModule mod_cband.c> <Location /cband-status> SetHandler cband-status AuthType Basic AuthName User Aut... 2016.02.20 2524
62 centos 7 apm + vsftpd 설치 스크립트 쉘(shell) 스크립트 다운로드 주소 : http://wooriagi.pe.hu/install.sh 웹기본 폴더는 /var/www/html 입니다. 그리고 /etc/httpd/conf/httpd.conf 에서 AllowOverride None 이 부분을 찾아 AllowOverride ALL로 바... file 2015.12.05 2912
61 centos7 부터 재시작 명령어 systemctl restart httpd systemctl restart mysqld systemctl restart sshd systemctl restart vsftpd 2015.08.14 2995
60 centos7 ssh 포트번호 변경하기 centos7 설치가 막 완료된 상태에서 설명 입니다. 1. yum install -y net-tools > 네트워크 활성화 2. yum update > 업데이트 3. systemctl mask firewalld systemctl stop firewalld > 2개의 명령어로 방화벽을 정지... 2016.01.31 3088
59 (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 // auto... 2015.02.19 4096
58 centos7 yum httpd 설치후 cband-status-me 설치 방법. 1. wget http://jaggoowa.com/bbs/mod-cband-0.9.7.5.tgz > 다운로드합니다. 파일 에러시 첨부파일 받으시거나 검색해서 받으시면 됩니다. 2. tar xzf mod-cband-0.9.7.5.tgz > 압축 풉니다. 3. cd mod-cband-0.9.7.5... file 2016.02.03 4740
57 centos mysql-bin.000001 파일 용량 줄이기 명령어를 통해 mysql-bin.000001 와 같은 파일이 있는 곳으로 이동 합니다. cd /var/lib/mysql 이동을 하고 다음 명령어 입력 ls mysql-bin.* 그럼 bin 파일들이 나옵니다. 파일이 많으면 그만큼 용량이 차지 하기에 ... 2015.01.01 6064
56 xpenology 에러날때 포트 23 무선 네트워크 연결을 통해 설치를 수행하고 있다면, DiskStation과 PC 클라이언트를 모두 이더넷 케이블 연결로 전환하고 다시 시도하십시오. 설치 도중 오류가 발생했습니다. 오류 결정을 위해 DiskStation의 Telne... 2015.03.08 11884
55 ERROR 145 (HY000): Table '테이블명' is marked as crashed and should be repaired 전체복구하기 에러 메세지 ERROR 145 (HY000): Table '테이블명' is marked as crashed and should be repaired 에러 증상 해당 테이블을 조회하면 에러 메세지 출력됨 해당 테이블에 삽입하고 갱신하면 에러 메세지 출력됨 대처 ... 2014.07.09 14746
54 xe 관리자인데 관리자 페이지 접속이 안될때 admin 페이지로 접속시 요청한 기능을 실행할 수 있는 권한이 없습니다.이와같은 에러가 나올때 조치 법 입니다. ModuleHandler.class.php 이 파일을 다운로드 받은 후 (위 링크 또는 첨부파일) FTP로 접속하여 ./cla... file 2014.06.22 15968
53 XE 에서 글쓰기 등록 눌렀을 때 반응이 없거나, 새로고침 후 글이 등록되어 있는 경우 XE 에서 글쓰기 한다음 등록을 누르면 반응이 없다가 새로고침 후 글이 등록 되어 지는 경우 XE (1.5.3.3 기준) 의 /classes/display/DisplayHandler.class.php 파일을 수정하는 것인데 기존의 if( (defined('__OB_GZ... 2014.07.09 16852
52 #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 crash... file 2014.06.22 16959
51 소스컴파일로 설치된 mysql 삭제해야할 기존 디렉토리와 파일 피스트 userdel -r mysql >& /dev/null rm -rf /usr/local/mysql rm -f /usr/bin/mysqldump rm -f /usr/bin/mysql rm -f /usr/bin/mysqladmin rm -f /etc/my.cnf rm -f /etc/rc.d/init.d/mysqld 2014.07.15 17605
50 XE 도메인 변경시 본문삽입 한 이미지나 링크 경로 수정방법 1. phpmyadmin 툴로 들어 갑니다. 가서 해당 DB로 가서 검색을 눌러 줍니다. 찾을 단어, 값에 전싸이트주소.COM 입력해 줍니다. 그리고 찾을 테이블에 모두선택 하신후실행! 그러면 전 주소가 사용되는 모든 데이터... file 2014.02.11 23707
49 계정생성 사용자 계정 생성 #useradd -u [유저ID] -g [그룹ID or 그룹명] -s [사용되는 SHELL] -d [유저 Home 디렉토리] 계정이름 useradd -u 501 -g 500 -d /home/jaggoowa jaggoowa passwd jaggoowa userdel -r 계정명 # -r ... 2011.04.16 29346
48 ftp root 접속하기 vi /etc/vsftpd/user_list 접속후 root 앞에 # 주석처리 vi /etc/vsftpd/ftpusers 접속후 root 앞에 # 주석처리 2011.04.16 29588
47 폴더 삭제 rm : 파일삭제 > rm -f aaa.txt : 삭제확인메세지 없이 지우기 > rm -r [폴더] : 폴더 삭제 > rm -rf [폴더] : 확인없이 폴더 지우기 2011.10.07 30144
46 root 아이디를 su - 를 통해서 접속해겠금// ssh 보안설정 이 방법을 쓰기 전에 반드시 일반유저가 ssh에 로그인이 되는지 확인 합니다. 기본적인 ssh 설정으로 원격에서 root로 바로 접속이 가능하도록 설정되어 있다. 이것은 악의적인 접근자가 무한 스캐닝 방법을 사용하여... 2012.01.02 30226
45 방화벽 설정 및 해제 참고: 리눅스의 방화벽 기본정책은 모든 포트를 막습니다. 그럼으로, SQL포트 3306번, apache포트 80번을 아래의 설정값을 이용하여 열어주어야 합니다. # vi /etc/sysconfig/iptables -A INPUT -m state --state NEW... 2011.04.16 30587
Board Pagination Prev 1 2 3 4 Next
/ 4