메뉴 건너뛰기

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
1. 다운로드

rpm으로 설치 mysql, php, httpd를 삭제

[root@localhost]# rpm -qa mysql  <--설치된 mysql이 있는지 확인
mysql-5.0.22-2.2.el5_1.1 <-- 설치되어 있음
[root@localhost]# rpm -qa httpd
[root@localhost]# rpm -qa php

rpm으로 설치된 mysql, php, httpd 가 있다면 삭제

[root@localhost]# rpm -e --nodeps mysql
[root@localhost]# rpm -e --nodeps php
[root@localhost]# rpm -e --nodeps httpd

mysql 다운로드

[root@localhost ~]# wget ftp://ftp.superuser.co.kr/mysql/mysql-5.0.37.tar.gz -P /tmp
--23:25:16--  ftp://ftp.superuser.co.kr/mysql/mysql-5.0.37.tar.gz
           => `/tmp/mysql-5.0.37.tar.gz'
Resolving ftp.superuser.co.kr... 210.127.253.100
Connecting to ftp.superuser.co.kr|210.127.253.100|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /mysql ... done.
==> SIZE mysql-5.0.37.tar.gz ... 23239518
==> PASV ... done.    ==> RETR mysql-5.0.37.tar.gz ... done.
Length: 23239518 (22M)
100%[====================================================================================>] 23,239,518   421K/s   in 53s   
23:26:10 (425 KB/s) - `/tmp/mysql-5.0.37.tar.gz' saved [23239518]

apache 다운로드

[root@localhost ~]# wget ftp://ftp.superuser.co.kr/apache/httpd-2.2.2.tar.gz -P /tmp
--23:37:00--  ftp://ftp.superuser.co.kr/apache/httpd-2.2.2.tar.gz
           => `/tmp/httpd-2.2.2.tar.gz'
Resolving ftp.superuser.co.kr... 210.127.253.100
Connecting to ftp.superuser.co.kr|210.127.253.100|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /apache ... done.
==> SIZE httpd-2.2.2.tar.gz ... 6282043
==> PASV ... done.    ==> RETR httpd-2.2.2.tar.gz ... done.
Length: 6282043 (6.0M)
100%[====================================================================================>] 6,282,043    519K/s   in 9.5s  
23:37:11 (642 KB/s) - `/tmp/httpd-2.2.2.tar.gz' saved [6282043]

php 다운로드

[root@localhost ~]# wget ftp://ftp.superuser.co.kr/php/php-5.2.5.tar.gz -P /tmp
--23:38:15--  ftp://ftp.superuser.co.kr/php/php-5.2.5.tar.gz
           => `/tmp/php-5.2.5.tar.gz'
Resolving ftp.superuser.co.kr... 210.127.253.100
Connecting to ftp.superuser.co.kr|210.127.253.100|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /php ... done.
==> SIZE php-5.2.5.tar.gz ... 9972372
==> PASV ... done.    ==> RETR php-5.2.5.tar.gz ... done.
Length: 9972372 (9.5M)
100%[====================================================================================>] 9,972,372    600K/s   in 17s   
23:38:33 (578 KB/s) - `/tmp/php-5.2.5.tar.gz' saved [9972372]


zendoptimizer 다운로드

[root@localhost ~]# wget ftp://ftp.superuser.co.kr/ZendOptimizer/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz -P /tmp
--23:40:46--  ftp://ftp.superuser.co.kr/ZendOptimizer/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz
           => `/tmp/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz'
Resolving ftp.superuser.co.kr... 210.127.253.100
Connecting to ftp.superuser.co.kr|210.127.253.100|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /ZendOptimizer ... done.
==> SIZE ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz ... 6358090
==> PASV ... done.    ==> RETR ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz ... done.
Length: 6358090 (6.1M)
100%[====================================================================================>] 6,358,090    945K/s   in 6.5s  
23:40:53 (948 KB/s) - `/tmp/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz' saved [6358090]


2. 압축풀기

[root@localhost ~]# tar xvf mysql-5.0.37.tar.gz
[root@localhost ~]# tar xvf httpd-2.2.2.tar.gz
[root@localhost ~]# tar xvf php-5.2.5.tar.gz


3. 부가 프로그램 확인 및 설치

[root@localhost ~]# rm qa gcc <-- 설치되어 있는지 확인한후 없으면 설치
yum install gcc
yum install gcc-c++
yum install termcap
yum install libtermcap
yum install libtermcap-devel
yum install gdbm-devel
yum install zlib*
yum install libxml*
yum install freetype*
yum install libpng*
yum install libjpeg*
yum install iconv


4. Mysql 설치

mysql 유저 생성 및 설치

[root@localhot mysql-5.0.37~]# useradd -M -s /bin/false mysql
[root@localhot mysql-5.0.37~]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=utf8 --with-extra-charsets=all --enable-thread-safe-client

--enable-thread-safe-client 는 mysqli를 위한 옵션

[root@localhot mysql-5.0.37~]# make
[root@localhot mysql-5.0.37~]# make install

mysql 설정

[root@localhost mysql-5.0.37]# pwd
/tmp/mysql-5.0.37
[root@localhost mysql-5.0.37]# cp support-files/my-huge.cnf /etc/my.cnf
[root@localhost mysql-5.0.37]# cp support-files/mysql.server /etc/init.d/mysqld
[root@localhost mysql-5.0.37]#
[root@localhost mysql-5.0.37]# chmod 755 /etc/init.d/mysqld
[root@localhost mysql-5.0.37]# chkconfig --add mysqld
[root@localhost mysql-5.0.37]# chkconfig --list mysqld
mysqld          0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
[root@localhost mysql-5.0.37]# chkconfig --level 24 mysqld off
[root@localhost mysql-5.0.37]# chkconfig --list mysqld
mysqld          0:해제  1:해제  2:해제  3:활성  4:해제  5:활성  6:해제
[root@localhost mysql-5.0.37]# cd /usr/local/mysql/

[root@localhost mysql]# chown -R mysql .
[root@localhost mysql]# chgrp -R mysql .
[root@localhost mysql]# ./bin/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

[root@localhost mysql]# chown -R mysql .
[root@localhost mysql]# chgrp -R mysql .
[root@localhost mysql]# /etc/rc.d/init.d/mysqld start
Starting MySQL[  OK  ]

[root@localhost mysql]# ./bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.37-log Source distribution

mysql >
mysql > exit;

mysql 설치시 이전의 데이타가 남아 있거나, 이미 실행이 되어 있는 경우 아래와 같이 에러가 난다.

[root@localhost mysql]# ./bin/mysql -uroot
./bin/mysql: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

이런 경우에는
mysql 이 실행되어 있다면 모두 종료하고
/etc/ld.so.conf 파일에 /usr/lib/mysql 을 추가하거나, 두 줄인 경우에는 한줄을 삭제하고
/sbin/ldconfig 을 실행한다.

[root@localhost mysql]# ./bin/mysqladmin shutdown
[root@localhost mysql]# vi /etc/ld.so.conf
/usr/lib/mysql
/usr/lib/mysql <--- 삭제
[root@localhost mysql]# /sbin/ldconfig
./bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.37-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye

mysql 의 root 암호를 변경한다.

[root@localhost mysql]# ./bin/mysqladmin -u root -h localhost.localdomain password '변경할 패스워드'
[root@localhost mysql]# ./bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.37-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> delete from mysql.user where user='';  <-- 2개의 익명 계정 삭제
Query OK, 2 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>exit;
[root@localhost mysql]#


5. Apache 설치
Apache 소스가 있는 곳으로 이동하여 Apache 설치

[root@localhost httpd-2.2.2]# ./configure --prefix=/usr/local/apache --enable-modules=so --enable-so --enable-rewrite
[root@localhost httpd-2.2.2]# make
[root@localhost httpd-2.2.2]# make install

아파치 설정 파일 복사 및 시작

[root@localhost httpd-2.2.2]# cp /usr/local/apache/bin/httpd /etc/rc.d/init.d/apachectl
[root@localhost httpd-2.2.2]# /etc/rc.d/init.d/apachectl start


6. php 설치

php 소스가 있는 곳으로 이동하여 php 설치

[root@localhost php-5.2.5]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mod-charset --with-config-file-path=/usr/local/apache/conf --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-dba --with-gdbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --with-mhash --with-mysql=/usr/local/mysql --enable-sockets --with-regex=php --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zend-multibyte
[root@localhost php-5.2.5]# make
[root@localhost php-5.2.5]# make install
[root@localhost php-5.2.5]# cp php.ini-dist /usr/local/php/lib/php.ini

php 설치시 에러가 발생하면 해당 모듈을 yum을 통해서 설치해 주면 된다.


7. ZendOptimizer 설치

zendOptimizer 소스 경로로 이동하여 설치

[root@localhost ZendOptimizer]# ./install.sh

인스톨 화면에서  안내에 따라 php.ini 파일의 경로를 설정해 주면 자동으로 zendoptimizer가 설치된다.


8. Apache 및 PHP 설정
/usr/local/apache/conf/httpd.conf 파일과 /usr/local/php/lib/php.ini 파일은 사용자에 맞게 수정한다.


List of Articles
번호 제목 날짜 조회 수
197 webmin 설치하기 file 2014.02.27 8712
196 PHP-5.3 이상 Zend 설치 2015.07.30 8698
195 iptables + 스크립트를 이용한 중국 IP 차단 2014.02.27 8696
194 [CentOS 6.5] JDK (JAVA) 설치 file 2017.03.11 8690
» CentOS 5.1 + APM(apache 2.2.x + php 5.2.x + mysql5.0.x + Zend 3.0.x) 설치 2016.03.18 8686
192 웹로직 + 아파치 연동 2017.04.13 8685
191 APACHE, OHS 400 웹로직 연동후 특정 작업에 400 error 2016.12.30 8645
190 아파치 한글파일 인식설정 file 2016.07.22 8622
189 우분투(리눅스) 설치 USB 만들기 file 2016.08.10 8614
188 iconv 추가 설치 2014.03.26 8603
187 centos 7 계정추가 2015.07.16 8598
186 [CentOS 6.5] SSH,TELNET, FTP 설치 및 운용 file 2017.03.11 8558
185 Apache 2.x 에서 maxclients 1024 제한 초과 방법 (수정 중..) 2016.03.18 8554
184 Centos7 64bit 웹서버 만들기-소켓모듈설치(socket.io) CAP7 file 2015.07.17 8552
183 아파치 웹로직 연동(Virtual Host) 2016.11.22 8546
182 AIDE를 이용한 리눅스 파일 시스템의 무결성 점검 2014.03.26 8545
181 리눅스 마운트 (mount)를 해보자 file 2015.06.09 8529
180 싱글모드 부팅 후, fstab read only 발생시 2014.03.26 8517
179 crontab 을 이용한 PHP 스케줄링 작업 file 2017.02.02 8500
178 리눅스 해킹사고 분석 및 대응절차 2014.02.27 8497
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 12 Next
/ 12

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved