sungdh86@sungdh86-laptop:~$ sudo ssh 203.249.75.40
Password:
The authenticity of host '203.249.75.40 (203.249.75.40)' can't be established.
RSA key fingerprint is d4:4d:3d:9a:a3:50:24:93:b6:3a:7c:db:e3:8e:4b:e6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '203.249.75.40' (RSA) to the list of known hosts.
root@203.249.75.40's password:
Last login: Tue Sep 5 19:40:01 2006
Welcome to P.C.R.C. Server!!!
Personal Computer Reserch Club(http://pcrc.hongik.ac.kr)
Please, Be careful your data!
[root@pcrc ~]#


RPM으로 설치된 APM(Apache, PHP, MySQL 제거를 했습니다.
MySQL제거
[root@pcrc ~]# rpm -qa |grep mysql
mysql-connector-odbc-3.51.12-1.2.1
mysql-5.0.18-2.1
libdbi-dbd-mysql-0.8.1a-1.2.1
[root@pcrc ~]# rpm -e mysql-5.0.18-2.1
오류: Failed dependencies:
libmysqlclient.so.15 is needed by (installed) perl-DBD-MySQL-3.0002-2.2.2.i386
libmysqlclient.so.15 is needed by (installed) mysql-connector-odbc-3.51.12-1.2.1.i386
libmysqlclient.so.15 is needed by (installed) libdbi-dbd-mysql-0.8.1a-1.2.1.i386
libmysqlclient.so.15 is needed by (installed) dovecot-1.0-0.beta2.7.i386 libmysqlclient_r.so.15 is needed by (installed) MySQL-python-1.2.0-3.2.2.i386
libmysqlclient_r.so.15 is needed by (installed) mysql-connector-odbc-3.51.12-1.2.1.i386
mysql is needed by (installed) MySQL-python-1.2.0-3.2.2.i386
mysql is needed by (installed) libdbi-dbd-mysql-0.8.1a-1.2.1.i386
[root@pcrc ~]# rpm -e mysql-5.0.18-2.1 --nodeps
[root@pcrc ~]#

Apache제거
[root@pcrc ~]# rpm -qa | grep httpd
httpd-manual-2.2.0-5.1.2
system-config-httpd-1.3.3-1.1
httpd-2.2.0-5.1.2
[root@pcrc ~]# rpm -e httpd-2.2.0-5.12
오류: httpd-2.2.0-5.12 패키지가 설치되어 있지 않습니다
[root@pcrc ~]# rpm -e httpd-2.2.0-5.1.2
오류: Failed dependencies:
httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.2-5.1.i386
httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.0-5.1.2.i386
httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.i386
webserver is needed by (installed) webalizer-2.01_10-29.2.1.i386
httpd = 0:2.2.0-5.1.2 is needed by (installed) mod_ssl-2.2.0-5.1.2.i386
httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.i386
httpd = 2.2.0-5.1.2 is needed by (installed) httpd-manual-2.2.0-5.1.2.i386
httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.9-3.i386
httpd is needed by (installed) system-config-httpd-1.3.3-1.1.noarch
[root@pcrc ~]# rpm -e httpd-manual-2.2.0-5.1.2
[root@pcrc ~]# rpm -e httpd-2.2.0-5.1.2 --nodeps
[root@pcrc ~]#

PHP제거
[root@pcrc ~]# rpm -qa | grep php
php-ldap-5.1.2-5
php-pear-1.4.6-2
[root@pcrc ~]# rpm -e php-ldap-5.1.2-5
[root@pcrc ~]# rpm -e php-pear-1.4.6-2
[root@pcrc ~]#


MySQL 컴파일 파일 압축 다운로드 받기
여기서는 MySQL를 설치하기 전에 glibc버전을 확인한다.
그 이유는 MySQL을 소스로 컴파일 할때 최적의 상태로 쓰기 위해선 glibc버전이 맞아야 한다.
[root@pcrc ~]# rpm -qa | grep glibc
glibc-common-2.4-4
glibc-2.4-4
glibc-kernheaders-3.0-5.2
glibc-headers-2.4-4
glibc-devel-2.4-4
[root@pcrc ~]#

[root@pcrc ~]# wget http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz/from/ftp://mysql.byungsoo.net/pub/mysql/
--22:08:09-- http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz/from/ftp://mysql.byungsoo.net/pub/mysql/
=> `index.html'
Resolving dev.mysql.com... 213.115.162.29, 213.115.162.82, 213.136.52.29, ...
Connecting to dev.mysql.com|213.115.162.29|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: ftp://mysql.byungsoo.net/pub/mysql/Downloads/MySQL-4.1/mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz [following]
--22:08:11-- ftp://mysql.byungsoo.net/pub/mysql/Downloads/MySQL-4.1/mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz
=> `mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz'
Resolving mysql.byungsoo.net... 218.234.17.87
Connecting to mysql.byungsoo.net|218.234.17.87|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/mysql/Downloads/MySQL-4.1 ... done.
==> PASV ... done. ==> RETR mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz ... done.
Length: 50,477,915 (48M) (unauthoritative)

100%[====================================>] 50,477,915 9.12M/s ETA 00:00

22:08:20 (9.31 MB/s) - `mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz' saved [50477915]

[root@pcrc ~]#

Apache 컴파일 파일 압축 다운로드 받기
[root@pcrc ~]# wget http://mirror.apache.or.kr/httpd/httpd-2.0.59.tar.gz
--21:57:36-- http://mirror.apache.or.kr/httpd/httpd-2.0.59.tar.gz
=> `httpd-2.0.59.tar.gz'
Resolving mirror.apache.or.kr... 211.53.110.2
Connecting to mirror.apache.or.kr|211.53.110.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6,122,149 (5.8M) [application/x-gzip]

100%[====================================>] 6,122,149 1.14M/s ETA 00:00

21:57:41 (1.14 MB/s) - `httpd-2.0.59.tar.gz' saved [6122149/6122149]

[root@pcrc ~]#

PHP 컴파일 파일 압축 다운로드 받기
http://www.php.net/downloads.php에서 다운로드를 받았다.
[root@pcrc ~]# wget http://kr2.php.net/get/php-5.1.6.tar.gz/from/kr.php.net/mirror
--22:10:17-- http://kr2.php.net/get/php-5.1.6.tar.gz/from/kr.php.net/mirror
=> `mirror'
Resolving kr2.php.net... 211.43.210.124
Connecting to kr2.php.net|211.43.210.124|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://kr.php.net/distributions/php-5.1.6.tar.gz [following]
--22:10:22-- http://kr.php.net/distributions/php-5.1.6.tar.gz
=> `php-5.1.6.tar.gz'
Resolving kr.php.net... 222.122.132.215
Connecting to kr.php.net|222.122.132.215|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8,187,896 (7.8M) [application/x-gzip]

100%[====================================>] 8,187,896 3.76M/s

22:10:29 (3.75 MB/s) - `php-5.1.6.tar.gz' saved [8187896/8187896]

[root@pcrc ~]#


우선 MySQL를 설치를 하기로 하였다.
그다음 Apache, PHP를 깔기로 하였다. zlib, gd는 PHP를 깔고 나서 깔기로 하였다.
압축된 MySQL파일을 풀기
[root@pcrc ~]# tar xvfz mysql-standard-4.1.21-pc-linux-gnu-i686.tar.gz -C /home1

./configure 명령을 실행하여 컴파일 환경을 설정한다.
[root@pcrc mysql-standard-4.1.21-pc-linux-gnu-i686]# ./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-charset=euckr --with-mysql-user=mysql --sysconfdir=/etc
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you. If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

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:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h pcrc.hongik.ac.kr password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./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 ./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
Starting the mysqld server. You can test that it is up and running
with the command:
./bin/mysqladmin version
[root@pcrc mysql-standard-4.1.21-pc-linux-gnu-i686]# chown: `mysql': 잘못된 사용자
Starting mysqld daemon with databases from /home1/mysql-standard-4.1.21-pc-linux-gnu-i686/data
STOPPING server from pid file /home1/mysql-standard-4.1.21-pc-linux-gnu-i686/data/pcrc.hongik.ac.kr.pid
060905 23:01:05 mysqld ended


[root@pcrc mysql-standard-4.1.21-pc-linux-gnu-i686]#

MySQL 설치도중 이 문제가 생겨서 큰일이 일어났다.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

이 문제를 해결하는 방법
user를 추가해주시고요
#groupadd mysql
#useradd -g mysql mysql

그리고 나서 mysql의 데이타가 들어있는 디렉토리를 수정해주세요
#chown -R root "mysql 디렉토리"
#chown -R mysql "mysql의 데이타가 들어있는 디렉토리"
#chgrp -R mysql "mysql 디렉토리"

make명령을 실향하여 MySQL를 컴파일함
[root@pcrc mysql-standard-4.1.21-pc-linux-gnu-i686]# make
# make install


그리고 나서 소프트 링크를 해준다.
# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
# ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql

압축된 Apache파일을 풀기
[root@pcrc ~]# tar xvfz httpd-2.0.59.tar.gz -C /home1

./configure 명령으로 다음과 같이 컴파일 환경을 설정한다.
[root@pcrc httpd-2.0.59]# ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --with-mpm=worker --enable-ssl --with-ssl --enable-so

make 명령으로 컴파일 한다. 오류 없이 컴파일이 끝나면 make install 명령을 실행하여 컴파일 환경시 --prefix= 옵션으로 지정된 위치로 컴파일 파일들이 설치되도록 한다
[root@pcrc httpd-2.0.59]# make
[root@pcrc httpd-2.0.59]# make install

/etc/ld.so.conf 파일에 /usr/local/apache2/lib과 /usr/local/apache2/modules 경로를 다음과 같이 추가한 후 ldconfig명령을 실행한다.
vi /etc/ld.so.conf

/usr/local/apache2/lib
/usr/local/apache2/modules

# ldconfig

압축된 PHP파일을 풀기
[root@pcrc ~]# tar xvfz php-5.1.6.tar.gz -C /home1

출처 :http://netsystem.dnip.net/board4/bbs/board.php?bo_table=linux&wr_id=3
PHP깔기전에 설치 먼저 할 것이 있다.
[root@pcrc ~]# wget http://ftp.superuser.co.kr/pub/etc/libpng-1.2.5.tar.gz
--02:12:26-- http://ftp.superuser.co.kr/pub/etc/libpng-1.2.5.tar.gz
=> `libpng-1.2.5.tar.gz'
Resolving ftp.superuser.co.kr... 222.97.189.5
Connecting to ftp.superuser.co.kr|222.97.189.5|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 505,988 (494K) [application/x-tar]

100%[====================================>] 505,988 3.12M/s

02:12:26 (3.10 MB/s) - `libpng-1.2.5.tar.gz' saved [505988/505988]

[root@pcrc ~]# wget http://ftp.superuser.co.kr/pub/etc/freetype-2.1.5.tar.gz
--02:12:33-- http://ftp.superuser.co.kr/pub/etc/freetype-2.1.5.tar.gz
=> `freetype-2.1.5.tar.gz'
Resolving ftp.superuser.co.kr... 222.97.189.5
Connecting to ftp.superuser.co.kr|222.97.189.5|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,127,474 (1.1M) [application/x-tar]

100%[====================================>] 1,127,474 3.27M/s

02:12:34 (3.26 MB/s) - `freetype-2.1.5.tar.gz' saved [1127474/1127474]

[root@pcrc ~]# wget http://ftp.superuser.co.kr/pub/etc/jpegsrc.v6b.tar.gz
--02:12:39-- http://ftp.superuser.co.kr/pub/etc/jpegsrc.v6b.tar.gz
=> `jpegsrc.v6b.tar.gz'
Resolving ftp.superuser.co.kr... 222.97.189.5
Connecting to ftp.superuser.co.kr|222.97.189.5|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 613,261 (599K) [application/x-tar]

100%[====================================>] 613,261 3.20M/s

02:12:40 (3.18 MB/s) - `jpegsrc.v6b.tar.gz' saved [613261/613261]

[root@pcrc ~]# rpm -qa | grep libpng
libpng-1.2.8-2.2.1
libpng-devel-1.2.8-2.2.1
[root@pcrc ~]# rpm -qa | grep freetype
freetype-2.1.10-5.2.1
freetype-devel-2.1.10-5.2.1
[root@pcrc ~]# rpm -qa | grep libjpeg
libjpeg-devel-6b-36.2.1
libjpeg-6b-36.2.1
[root@pcrc ~]# rpm -e --nodeps libpng-1.2.8-2.2.1 freetype-2.1.10-5.2.1 libjpeg-6b-36.2.1
[root@pcrc ~]#

'컴퓨터 > Linux' 카테고리의 다른 글

Ubuntu 6.06 Dapper CD들 도착  (2) 2006.09.08
APM설치 결과  (3) 2006.09.07
IP주소 다시 신청  (0) 2006.08.31
현재 서버에 Linux 재설치 중  (0) 2006.08.30
하드디스크 복구 시도를 하다  (4) 2006.08.29
Buy me a coffeeBuy me a coffee

+ Recent posts