달력

4

« 2024/4 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

http://suite.tistory.com 2012.12

 

1) 공인 IP eth 추가   (가상서버에서)

기존 사설ip용으로 설정한 /etc/sysconfig/network-scripts/ifcfg-eth0 을

/etc/sysconfig/network-scripts/ifcfg-eth0:1 로 복사 후

DEVICE=eth0:1 명
IPADDR=새로운ip
GATEWAY=새로운ip에 해당하는 게이트웨이

$> service network restart  후 /sbin/ifconfig -a

eth0 , eth0:1 두개 확인

 

2) virbr0 삭제 (kvm이 설치된 물리서버에서)

사설IP는 NAT 방식으로 해서 지정 했었음 $>virsh net-list 하면 default  or  /sbin/ifconfig -a 하면 virbr0 확인됨

virbr0 을 삭제해야  각 설치된 서버( guest os) 에서  공인 IP 지정 가능?

삭제는  http://blog.naver.com/orion_203?Redirect=Log&logNo=130116210048 참고

$> virsh net-destroy default
$> service libvirtd restart

 

3) br0 사용하도록 지정  (kvm이 설치된 물리서버에서)

원격지에서 xwindow 로 virtual machine manager (가상머신관리자) 를 사용 못해 가상서버의 쉘에서 virsh 를 이용하여 설정

virsh 을 이용하여 가상화 os를 shutdown 하고 start 할때 오류 발생

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

오류메시지 한글 :

오류:도메인 *** 시작하기 실패
오류:네트워크를 찾을 수 없음: 일치하는 'default'라는 이름의 네트워크 없음

오류메시지 영문 :

error: Failed to start domain ***
error: Network not found: no network with matching name ‘default’

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 /etc/libvirt/qemu/guestos.xml 열때 vi 열지말고 http://blog.boxcorea.com/wp/archives/tag/kvm 없는 내용으로

$>virsh edit /etc/libvirt/qemu/guestos.xml 해야 수정 사항이 반영됨 (xml 상단 주석에 설명 되어 있음)

<interface type='bridge'>
<mac address=’54:52:00:5e:53:d2′/>
<source bridge='br0'/>
</interface>

수정후 가상화 os start

$) virsh start guestos

centos 6.3에서...

:
Posted by mastar

http://suite.tistory.com 2012.12

/etc/sysconfig/vncservers 유저 추가시 숫자가 기본 포트 5900 플러스해서 LISTEN 포트 10901 + 2개 생성됨

예를 들어  VNCSERVERS="5001:root" 설정 후 재시작 : /etc/init.d/vncserver restart

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

$netstat -nap |grep Xvnc | grep LISTEN
tcp        0      0 0.0.0.0:10801               0.0.0.0:*                   LISTEN      13550/Xvnc
tcp        0      0 0.0.0.0:10901               0.0.0.0:*                   LISTEN      13550/Xvnc
tcp        0      0 0.0.0.0:11001               0.0.0.0:*                   LISTEN      13550/Xvnc
tcp        0      0 :::11001                    :::*                        LISTEN      13550/Xvnc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

11001 한개만 했을때는 안되고  10801 , 10901 , 11001  3개 모두 외부에서 접속시 방화벽 열면 접속됨 (2개는 테스트 안해봄)

vnc client로 접속시 사용한 포트 10901로 했음

:
Posted by mastar


http://suite.tistory.com 2011.08 fs

아파치 버전 : 2.2.16

성능 이슈로 css , js 등 압축기능 설정 필요로 기존 아파치에 apxs 로 mod_deflate.so 생성하고
아파치를 시작할때  httpd.conf 아래 같은 오류 메시지  나오는 경우가 있어 해결해볼려고 구글링은 해보았지만
쉽게 답은 찾지 못했고

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$>./apache start
.....  mod_deflate.so: undefined symbol: inflateEnd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

기존 아파치라 httpd.conf 외 include 로 vhost 설정을 별도로 가지고 있어
별도의 vhost-httpd.conf 에

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LoadModule deflate_module     modules/mod_deflate.so  # 추가 httpd.conf 에서는 삭제  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
설정 적용 하여 해결함


 ~~~~~~~~~~~~~~~~ 압축 설정 적용 값   ~~~~~~~~~~~~~~~~~~~~
 <Location />
            AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-javascript text/css application/javascript application/json
            BrowserMatch ^Mozilla/4 gzip-only-text/html
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
            BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
            BrowserMatch \bMSIE\s6\.0 no-gzip
            SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
            SetEnvIfNoCase x-flash-version ^[0-9] no-gzip dont-vary
            Header append Vary User-Agent env=!dont-vary
        </Location>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

확인은 FireFox 에서 net 에서 확인하거나 FF에 구글에서 만든 page speed 설치해도 확인 쉽다.
(http://code.google.com/intl/ko-KR/speed/page-speed/docs/using_firefox.html)



* 참고로 정적 파일 css , js ,이미지등  브라우저 캐쉬 기간 설정 1주일
   -> js, css 수정시 적용 안될경우 대비로  배포시 fs.css?2011081314 임의의 파라미터 지정 필요성  
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 LoadModule expires_module    modules/mod_expires.so
        <IfModule mod_expires.c>
                ExpiresActive On

                ExpiresDefault "access plus 1 day"
                ExpiresByType image/gif "access plus 1 weeks"
                ExpiresByType image/png "access plus 1 weeks"
                ExpiresByType image/jpeg "access plus 1 weeks"
                ExpiresByType image/jpg "access plus 1 weeks"
                ExpiresByType text/css "access plus 1 weeks"
                ExpiresByType application/javascript "access plus 1 weeks"
                ExpiresByType application/x-shockwave-flash "access plus 1 weeks"
        </IfModule>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
적용여부는 브라우저 캐시 삭제후 page speed 플러그인으로 쉽게 확인 가능

 

:
Posted by mastar

http://suite.tistory.com/ fs 2006



mysql_install_db 실행시 아래와 같은 메시지가 나오는데


============================================================================

mkdir: `/var/lib/mysql/mysql' 디렉토리를 만들 수 없습니다: 허가 거부됨
chmod: cannot access `/var/lib/mysql/mysql': 그런 파일이나 디렉토리가 없음
mkdir: `/var/lib/mysql/test' 디렉토리를 만들 수 없습니다: 허가 거부됨
chmod: cannot access `/var/lib/mysql/test': 그런 파일이나 디렉토리가 없음

=========================================================================


레드헷 AS4 경우 이미 rpm으로 설치된 mysql /etc/my.cnf 파일을 참조해서 문제가 발생하는것 같은데

삭제 하지않고 해결 방법은 아래와 같다 .



 - ./mysql_install_db  --no-defaults 실행하여 디비 생성


-  ./mysqld_safe  --defaults-file=/my.cnf 환경파일있는디렉토리/my.cnf & 옵션을 추가 하여 데몬을 실행하거나


    share/mysql/mysql.server 파일을  ./bin/server 파일로 복사하여 데몬을 실행 한다면

    server 파일 220 란인쯤에 #parse_server_arguments 를 주석 처리하여  사용하면된다.

    ./bin/server start | stop






 

 

:
Posted by mastar

http://suite.tistory.com/  fs 2006 9


바이너리로 설치 에러시 처리 방법

1 .아래 에러 경우 초기 디비를 생성

060826 15:00:38  mysqld started
060826 15:00:38 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when t
his MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=kmsdrm01-bin' to avoid this problem.
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!


mysql 홈디렉토리에서 scripts 포함하여 실행


ex)./scripts/mysql_install_db


2. 아래 에러 경우 mysql 설치된 디렉토리 소유권을 safe_mysqld를 실행하는 계정의 소유로 변경한다.


060901 15:28:21  mysqld started
060901 15:28:22 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when t
his MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=kmsdrm01-bin' to avoid this problem.
^G/usr/local/mysql/bin/mysqld: File './kmsdrm01-bin.index' not found (Errcode: 13)
060901 15:28:22 [ERROR] Aborting

060901 15:28:22 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

60901 15:29:03  mysqld started
^G/usr/local/mysql/bin/mysqld: File './kmsdrm01-bin.index' not found (Errcode: 13)
060901 15:29:03 [ERROR] Aborting


 

예를 루트로 /usr/local/mysql 설치 하게되면 소유권은 루트가 되지만 기본 safe_mysqld 실행시에 user=mysql 계정으로 실행되어

mysql 계정이  접근을 하지 못한다.

이를 해결할려면 /usr/local/mysql 디렉토리 소유권(chown)을 mysql에게 주던지 safe_mysqld 를 열어 user=root로 수정한다.




 

:
Posted by mastar

http://suite.tistory.com/   fs 2008 2


 mysql 5점대 버전을 UTF-8로 설치중에 mysql_install_db 실행하면 아래와같은



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


/search/MPA/mysql5/libexec/mysqld: Character set 'euckr' is not a compiled character set and is not specified in the '/home/xt
en/MPA/mysql5/share/mysql/charsets/Index.xml' file
080225 18:18:40 [ERROR] Aborting

080225 18:18:40 [Note] /search/MPA/mysql5/libexec/mysqld: Shutdown complete

Installation of system tables failed!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


같은 메시지 나오면 설치시 ./configure --with-charset=utf8  --with-extra-charsets=complex 추가 해서 해결

 

:
Posted by mastar

http://suite.tistory.com/   fs 2008 03 19


make 하면 나오는에러 내용


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/usr/lib/libdb-4.3.so: could not read symbols: File in wrong format


/usr/lib/libexpat.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


이런류 에러원인은 32비트에서 쓰던 소스를  64비트 가서 컴파일 하면서 나오는 현상인데
해결은 여러가지가 있겠지만 링크 파일을 바꾸는방법이 제일 쉬운것 같다.


ex)

CentOS 4.4 64비트경우

==== .bash_profile =====


64비트용으로 변경후

#/usr/lib> ln -s /usr/lib64/libexpat.so libexpat.so
#/usr/lib> ln -s /usr/lib64/libdb-4.3.so libdb-4.3.so


다시 컴파일

/httpd-2.0.54/>make clean
/httpd-2.0.54/>./configure
/httpd-2.0.54/>make
/httpd-2.0.54/>make install

 

:
Posted by mastar

http://suite.tistory.com/   fs  2008.4



configure에서 --with-mysqld-user= 옵션을 주어도  root 쪽 기본 디렉토리를 바로 볼때


에러 메시지 예

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mkdir: `/var/lib/mysql' 디렉토리를 만들 수 없습니다: 허가 거부됨
chmod: cannot access `/var/lib/mysql': 그런 파일이나 디렉토리가 없음
mkdir: `/var/lib/mysql/mysql' 디렉토리를 만들 수 없습니다: 그런 파일이나 디렉토리가 없음
chmod: cannot access `/var/lib/mysql/mysql': 그런 파일이나 디렉토리가 없음
mkdir: `/var/lib/mysql/test' 디렉토리를 만들 수 없습니다: 그런 파일이나 디렉토리가 없음
chmod: cannot access `/var/lib/mysql/test': 그런 파일이나 디렉토리가 없음
Installing all prepared tables
080410 17:13:00 [Warning] Can't create test file /var/lib/mysql/srch1.lower-test
/search/MPA/mysql5/libexec/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2)
080410 17:13:00 [ERROR] Aborting

080410 17:13:00 [Note] /search/MPA/mysql5/libexec/mysqld: Shutdown complete

Installation of system tables failed!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


=> 설치된 mysql/share/mysql/my-medium.cnf 설정파일을 mysql/bin/my.cnf 에 복사해서 실행시 설정파일을 적용한다


ex1) 최초 디비 생성

     @>mysql/bin/mysql_install_db --defaults-file=my.cnf

ex2) mysql 데몬 기동

     @>mysql/bin/mysqld_safe --defaults-file=my.cnf &


종료할때는 ps -ef |grep mysql해서  kill로 ~~

        


 

:
Posted by mastar