2007년 05월 13일
웹 서버 복구
커널 이미지 복구 성공에 이어 맛간 웹서버 복구 성공기-_-?;
MySQL 삭제
#/etc/init.d/mysql stop
or kill mysql
#apt-get remove mysql-server mysql-client libmysqlclient15-dev mysql-client-5.0 mysql-server-5.0 --purge
apache 와 php 삭제
#aptitude
/ -> apache(CR)
_ -> n 반복
/ -> php(CR)
_ -> n 반복
g -> g
이리하여 설치된 모든 apache 와 php 관련 패키지를 설정파일까지 깔끔하게 삭제-_-;
q -> yes
#apt-get install mysql-server mysql-client libmysqlclient15-dev
#apt-get install apache2 php5 libapache2-mod-php5 php5-mysql
#a2enmod ssl
#a2enmod rewrite
#a2enmod suexec
#a2enmod include
#a2enmod userdir (이걸 생각 못해가지고 이틀을!)
#vi /etc/apache2/apache2.conf
AddDefaultCharset EUC-KR
#/etc/init.d/apache2 restart
만세!
추가1. mysql 백업 및 복구
백업
#mysqldump -u root -p --all-databases > backup.sql
복구
#mysql -u root -p < backup.sql
Enter password: (CR)
#/etc/init.d/mysql restart
root 암호 설정
#mysqladmin -u root -p password seturpassword
Enter password: 이전디비비밀번호
추가2. mysql 사용자 추가
>grant all privileges on `dbname`.* to user@localhost identified by 'password' with grant option;
>show grants for user@localhost;
>flush privileges;
>exit;
추가3. MySQL 업그레이드 후 제로보드 로그인 실패 시
#vi /etc/init.d/mysql
/dev(CR) -> n
/usr/bin/mysqld_safe > /dev/null 2 >&1 & 을 아래와 같이 변경
/usr/bin/mysqld_safe --old-passwords > /dev/null 2 >&1 &
#/etc/init.d/mysql restart
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
에러 발생 시
#vi /etc/mysql/debian.cnf
password 복사
mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password 붙여넣기' WITH GRANT OPTION;
mysql> flush privileges;
만세!!
MySQL 삭제
#/etc/init.d/mysql stop
or kill mysql
#apt-get remove mysql-server mysql-client libmysqlclient15-dev mysql-client-5.0 mysql-server-5.0 --purge
apache 와 php 삭제
#aptitude
/ -> apache(CR)
_ -> n 반복
/ -> php(CR)
_ -> n 반복
g -> g
이리하여 설치된 모든 apache 와 php 관련 패키지를 설정파일까지 깔끔하게 삭제-_-;
q -> yes
#apt-get install mysql-server mysql-client libmysqlclient15-dev
#apt-get install apache2 php5 libapache2-mod-php5 php5-mysql
#a2enmod ssl
#a2enmod rewrite
#a2enmod suexec
#a2enmod include
#a2enmod userdir (이걸 생각 못해가지고 이틀을!)
#vi /etc/apache2/apache2.conf
AddDefaultCharset EUC-KR
#/etc/init.d/apache2 restart
만세!
추가1. mysql 백업 및 복구
백업
#mysqldump -u root -p --all-databases > backup.sql
복구
#mysql -u root -p < backup.sql
Enter password: (CR)
#/etc/init.d/mysql restart
root 암호 설정
#mysqladmin -u root -p password seturpassword
Enter password: 이전디비비밀번호
추가2. mysql 사용자 추가
>grant all privileges on `dbname`.* to user@localhost identified by 'password' with grant option;
>show grants for user@localhost;
>flush privileges;
>exit;
추가3. MySQL 업그레이드 후 제로보드 로그인 실패 시
#vi /etc/init.d/mysql
/dev(CR) -> n
/usr/bin/mysqld_safe > /dev/null 2 >&1 & 을 아래와 같이 변경
/usr/bin/mysqld_safe --old-passwords > /dev/null 2 >&1 &
#/etc/init.d/mysql restart
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
에러 발생 시
#vi /etc/mysql/debian.cnf
password 복사
mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password 붙여넣기' WITH GRANT OPTION;
mysql> flush privileges;
만세!!
# by | 2007/05/13 03:43 | IT | 트랙백 | 덧글(0)
◀ 이전 페이지 다음 페이지 ▶



