핸디소프트/일일일~2020. 11. 5. 16:51

atomic0x90.github.io/ubuntu/2020/08/31/ubuntu-started-gnome-display-manager-freezing.html

Posted by 배터리
핸디소프트/일일일~2016. 12. 20. 17:00

CentOS 6.7 (Linux) 환경에서


Apache 2.4.9 + tomat 6.0 환경에서   mod_url 모듈 설치(한글파일사용)



사내 환경에서 에디터쪽 내부에 파일링크를 걸 경우 한글일 경우 다운로드시 apache 404 에러를 발생하면서 해당 경로를 찾지 못함

에 따른 설치임


 

아파치 설치 폴더(저의기준)

/usr/local/apache/

 

1. mod_url 소스를 다운로드 받음

참조 : http://kldp.net/frs/?group_id=490&release_id=2185

위 URL 에서 http://kldp.net/modurl/ 로 접근후 http://kldp.net/modurl/release/ 에서

2186-mod_url-apache2-1.6.2.5.tar.bz2 파일 다운로드 후 


 

2. 압축 풀기

# tar xvf 2186-mod_url-apache2-1.6.2.5.tar.bz2

 

 

3.apxs 를 통한 모듈 추가

usr/local/apache/bin/./apxs -i -c ../mod_url-apache2/mod_url.c

 

4. httpd.conf 아래 내용 추가

# vi /usr/local/apache/conf/httpd.conf

 

  LoadModule redurl_module      modules/mod_url.so

 

 

5. 모듈활성화를 위한 httpd.conf에 추가

  <IfModule mod_url.c>
        CheckURL On
</IfModule>

 

 

6. 아파치 재가동

# /usr/local/apache/bin/./apachectl restart



Posted by 배터리

회사 서버의 dbf 파일에 계정이 4-5개가 넘어가면서 갑자기 파일크기가 급 커짐..


보통 3-4G 정도였는데 갑자기 30G 로 늘어남..ㅠㅠ


이에 따라 해당 계정의 용량이 99% 치는 현상..


일단 dbf 파일들 크기 확인


select tablespace_name, bytes/1024/1024 mb, file_name

         from dba_data_files;

         


그래서 해당 몇몇 커진 파일들에 대해 디렉토리를 이동시킴



DB MOUNT 상태에서 tablespace의 datafile을 이동. 

(모든 tablespace 가능 - system, sysaux tablespace는 반드시 mount단계에서 해야 한다고 함.)


우선 DB를 shutdown 시킨다.


SQL> shutdown immediate


그 후 dbf 파일을 이동시킬 디렉토리를 혹은 경로를 만들고 그 경로에 HDATA_1_1.dbf 파일을 이동한다.


기존경로      : /home1/ora_data/gw83/HDATA_1_1.dbf

이동시킬 경로 : /home2/ora_data2/HDATA_1_1.dbf


mv HDATA_1_1.dbf /home2/ora_data2/


이동이 완료되면

shutdown된 DB를 mount 상태까지만 올린다.


SQL> startup mount


이동 경로를 Database에 알려 주자. 그리고 OPEN시킨다.


SQL> alter database rename

         file '/home1/ora_data/gw83/HDATA_1_1.dbf'

         to '/home2/ora_data2/HDATA_1_1.dbf';


SQL> alter database open;



* 추가로 이후 서버 어플리케이션에서 동작시 여전히 용량문제가 오류로 찍히는바

dbf 파일을 추가 생성해줌

(기존 오라클 dbf 파일이 32G 를 넘을 수 없어 dbf 파일을 새로 만들어준것.)


ALTER TABLESPACE HDATA_1

ADD datafile '/home2/ora_data2/HDATA_1_2.dbf' size 1000M autoextend on

/

alter database datafile '/home2/ora_data2/HDATA_1_2.dbf'

autoextend on

/

Posted by 배터리
핸디소프트/일일일~2014. 10. 6. 14:54

/usr/sbin/postconf: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

/usr/sbin/postlog: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory


libpcre.so.1 이 64bit 환경에서 링크가 정상적으로 걸리지 않아서 발생한 문제


#cd /lib64

# ln -s /usr/local/lib/libpcre.so.1 libpcre.so.1


로 설정후 make install 정상동작


Posted by 배터리
핸디소프트/일일일~2014. 7. 29. 17:08

root 계정으로


# cat /proc/partition  => raid1 구성된 전체 디스크 정보 확인

major minor  #blocks  name


   8        0 1953514584 sda

   8        1  104857600 sda1

   8        2  314572800 sda2

   8        3  314572800 sda3

   8        4          1 sda4

   8        5  314572800 sda5

   8        6  314572800 sda6

   8        7  314572800 sda7

   8        8  209715200 sda8

   8        9   10485760 sda9

   8       10   55584768 sda10

   8       16 1953514584 sdb

   8       17  104857600 sdb1

   8       18  314572800 sdb2

   8       19  314572800 sdb3

   8       20          1 sdb4

   8       21  314572800 sdb5

   8       22  314572800 sdb6

   8       23  314572800 sdb7

   8       24  209715200 sdb8

   8       25   10485760 sdb9

   8       26   55584768 sdb10

   9        0   10477440 md0

   9        1  104857472 md1

   9        6  314441536 md6

   9        5  314441536 md5

   9        7  209584000 md7

   9        4  314441536 md4

   9        2  314441536 md2

   9        8   55551872 md8

   9        3  314441536 md3



# cat /proc/mdstat 

=> 현재 raid 상태 확인

Personalities : [raid1] 

md3 : active raid1 sdb3[1] sda3[0]

      314441536 blocks super 1.1 [2/2] [UU]

      bitmap: 0/3 pages [0KB], 65536KB chunk


md8 : active raid1 sdb10[1] sda10[0]

      55551872 blocks super 1.1 [2/2] [UU]

      bitmap: 0/1 pages [0KB], 65536KB chunk


md2 : active raid1 sdb2[1] sda2[0]

      314441536 blocks super 1.1 [2/2] [UU]

      bitmap: 0/3 pages [0KB], 65536KB chunk


md4 : active raid1 sdb5[1] sda5[0]

      314441536 blocks super 1.1 [2/2] [UU]

      bitmap: 0/3 pages [0KB], 65536KB chunk


md7 : active raid1 sdb8[1] sda8[0]

      209584000 blocks super 1.1 [2/2] [UU]

      bitmap: 0/2 pages [0KB], 65536KB chunk


md5 : active raid1 sdb6[1] sda6[0]

      314441536 blocks super 1.1 [2/2] [UU]

      bitmap: 0/3 pages [0KB], 65536KB chunk


md6 : active raid1 sdb7[1] sda7[0]

      314441536 blocks super 1.1 [2/2] [UU]

      bitmap: 0/3 pages [0KB], 65536KB chunk


md1 : active raid1 sdb1[1] sda1[0]

      104857472 blocks super 1.0 [2/2] [UU]

      bitmap: 1/1 pages [4KB], 65536KB chunk


md0 : active raid1 sdb9[1] sda9[0]

      10477440 blocks super 1.1 [2/2] [UU]

      

unused devices: <none>



# mdadm –detail /dev/md0~8 

=> 레이드 정보 보기(파티션 별)

/dev/md3:

        Version : 1.1

  Creation Time : Wed Jun 19 04:51:07 2013

     Raid Level : raid1

     Array Size : 314441536 (299.87 GiB 321.99 GB)

  Used Dev Size : 314441536 (299.87 GiB 321.99 GB)

   Raid Devices : 2

  Total Devices : 2

    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Sun Jul 27 01:30:56 2014

          State : active 

 Active Devices : 2

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 0

           Name : localhost.localdomain:3

           UUID : e50f26db:d51f3dc5:56c69b86:c783c6f4

         Events : 533

    Number   Major   Minor   RaidDevice State

       0       8        3        0      active sync   /dev/sda3

       1       8       19        1      active sync   /dev/sdb3

Posted by 배터리
핸디소프트/일일일~2014. 7. 28. 12:47

1. 수정 및 생성된지 30일이 지난 파일들 찾기

# find -mtime +30

 

2. 어제 수정 및 생성된 파일 찾기

# find -mtime 1 ( 2 , 3 바꿀경우 계속 2일전부터, 3일전부터 수정된 파일을 찾는것임)

 

3. 어제 이후로 수정 및 생성된 파일 찾기

# find -mtime -1  




atime 접근 시간

mtime 수정시간

ctime 생성시간


Posted by 배터리
핸디소프트/일일일~2014. 7. 17. 17:30

SVN 업데이트 - 빌드후 변경된 파일들만 추려야 하는 경우가 생기는대 이때 아래와 같이 xcopy 명령어를 이용한다



E:\gw\8.2.3\03_common>xcopy /K /Y /S /H /C /D:07-17-2014 * E:\gw\8.2.3\dist\823_

17\변경분\hip


E:\gw\8.2.3\03_common 디렉토리를 기준으로 2014년 7월17일자로 변경된 파일을 추출해서

E:\gw\8.2.3\dist\823_17\변경분\hip 디렉토리로 복사한다.


/K (파일속성복사)

/S (하위디렉토리포함)

/H (숨김처리된 파일포함) - 필요는 없을듯

/C (파일복사중 오류가 있어도 진행)


Posted by 배터리
핸디소프트/일일일~2013. 12. 16. 20:10


rm -rf test & 를 한다는 것이

rm -rf test * 로 찍은 후 엔터.. -ㅁ-

테스트 데이터 다 날리고 --

복구툴을 찾아보기 시작 

: 결론은 답이 없다 --;; 알아서 조심.. ㅠㅠ testdisk 로 일부 파일이 지워진 경우 수동으로 확인후 복구할수도 있겠으나 이건 삭제된 데이터 양이 적을 경우에나 해당..



extundelete

[root@luna /]# extundelete /dev/cciss/c0d0p4 --restore-directory /home2/gw80/hip/
NOTICE: Extended attributes are not restored.
WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.
The partition should be unmounted to undelete any files without further data loss.
If the partition is not currently mounted, this message indicates 
it was improperly unmounted, and you should run fsck before continuing.
If you decide to continue, extundelete may overwrite some of the deleted
files and make recovering those files impossible.  You should unmount the
file system and check it with fsck before using extundelete.
Would you like to continue? (y/n) 
y
Loading filesystem metadata ... 164 groups loaded.
Loading journal descriptors ... 32247 descriptors loaded.
Failed to restore file /home2/gw80/hip/
Could not find correct inode number past inode 2.
Try altering the filename to one of the entries listed below.
File name                                       | Inode number | Deleted status
.                                                 2
..                                                2
lost+found                                        11
gw80                                              524289
vmail                                             393217
directory_201                                     156909         Deleted
extundelete: Operation not permitted while restoring directory.
extundelete: Operation not permitted when trying to examine filesystem



ext4magic

[root@luna /]# ext4magic /dev/cciss/c0d0p4 -M  -d /home1/test/RRRR2/

hip/ 아래 데이터는 복구안됨


testdisk

[root@luna testdisk-6.14]# ./testdisk_static  

로 해당 경로에서 복구 시도하였으나 파일단위로 복구되면서.. 즉  1.java 2.class 3.jsp 로 복구하면서 뭐가 뭔지 알수 없음 --


Posted by 배터리
핸디소프트/일일일~2013. 10. 31. 13:34

- win7, win8 에서  클라이언트의 *.htx, *.hwx 파일이 XSviewer.exe 로 열리지 않는 현상이 관찰되어


  인스톨쉴드(버전 X) 스크립트로 해당 확장자에 대해 XSviewer.exe 로 연결시킴


- 설치완료 후엔 레지스트리에 다음과 같이 추가된다

HKEY_CLASSES_ROOT\.htx

HKEY_CLASSES_ROOT\.hwx

HKEY_CLASSES_ROOT\htx.Document

HKEY_CLASSES_ROOT\hwx.Document


- 참고로 아래 부분은 On END 쪽에 넣으면 설치완료후 확인창이 나오지 않기에 OnFirstUIAfter() 쪽에 넣고 메시지박스로 출력하도록 조정


- 위의 OnFirstUIAfter() 쪽에 넣으면 특정 파일들 (dll ) 이 레지스트리에 등록이 되지 않아 OnMoved() 로 변경

 : 참고로 onMoved() 는 설치할 파일이 PC에 복사되고 난 후 실행되는 부분


prototype NUMBER    MakeAssociation(STRING, STRING,STRING);

prototype NUMBER    MakeAssociationEx1(STRING, STRING,STRING);

prototype NUMBER    MakeAssociationEx2(STRING, STRING,STRING);



////////////////////////////////////////////////////////////////////////

//                                                                    //

//  확장자, 확장자 아이콘 등록  함수                                 //

//  Function:   MakeAssociation                                       //

//                                                                    //

//  Purpose:    Creates a file association in the Registry.  Use      //

//            this function for Explorer shell only, as it will       //

//            not create the extra application identification keys,   //

//            which are necessary for Program Mananger shell.         //

//            For Program Manager shell, you can use the script-      //

//            based function MakeAssociationEx.                       //

//                                                                    //

//  Parameters:                                                       //

//      szApp:    String with full path to the executable to be       //

//                associated with the file extension.                 //

//                                                                    //

//      szExtension:  String with the extension to be associated      //

//                with an application.  Must include the preceding    //

//                period (for example:  ".txt")                       //

//                                                                    //

//      szIcon :   String with full path to the executable to be      //

//                associated with the file Icon                       //

//                                                                    //

//                                                                    //

////////////////////////////////////////////////////////////////////////


  

function MakeAssociation(szApp, szExtension, szIcon)

BOOL      bResult;

NUMBER    nResult;

STRING szOpen;

begin

  RegDBSetDefaultRoot ( HKEY_CLASSES_ROOT );

  //bResult = RegDBKeyExist(szExtension);

  //if (bResult = TRUE) then

//    nResult = AskYesNo ("Warning the extension " + szExtension + " is already registered. Overwrite?", YES);

//    if (nResult = NO) then

//       return -1;

//    endif;

//  endif;

  LongPathToShortPath (szApp);

  szApp = szApp + " \"%1\"";

  szOpen = "open" + " \"%1\""; 

  RegDBCreateKeyEx (szExtension, "");

  

  RegDBCreateKeyEx (szExtension + "\\DefaultIcon", "");

  RegDBSetKeyValueEx (szExtension + "\\DefaultIcon","", REGDB_STRING, szIcon, -1);

  RegDBCreateKeyEx (szExtension + "\\shell", "");

  RegDBCreateKeyEx (szExtension + "\\shell\\open", "");

  RegDBCreateKeyEx (szExtension + "\\shell\\open\\command", "");

  RegDBSetKeyValueEx (szExtension + "\\shell\\open\\command", "", REGDB_STRING, szApp, -1);

  

  //RegDBCreateKeyEx (szExtension + "\\shell\\open\\ddeexec", "");//추가

  //RegDBSetKeyValueEx (szExtension + "\\shell\\open\\ddeexec", "", REGDB_STRING, szOpen, -1);//추가

  

  return 0;

end;


////////////////////////////////////////////////////////////////////////  


function MakeAssociationEx1(szApp, szExtension, szName)

BOOL      bResult;

NUMBER    nResult;

STRING    svKeyName;


begin

  RegDBSetDefaultRoot ( HKEY_CLASSES_ROOT );


  StrSub ( svKeyName , szExtension , 1 , 3 );

  svKeyName = svKeyName + ".Document";


//  bResult = RegDBKeyExist(szExtension);

//  if (bResult = TRUE) then

//    nResult = AskYesNo ("Warning the extension " + szExtension + " is already registered. Overwrite?", YES);

//    if (nResult = NO) then

//       return -1;

//    endif;

//  endif;


  LongPathToShortPath (szApp);

  szApp = szApp + " \"%1\"";

  RegDBCreateKeyEx (szExtension, "");

  RegDBSetKeyValueEx ( szExtension , "" , REGDB_STRING , svKeyName , -1 );


  RegDBCreateKeyEx (svKeyName, "");

  RegDBSetKeyValueEx ( svKeyName , "" , REGDB_STRING , szName , -1 );

  RegDBCreateKeyEx (svKeyName + "\\shell", "");

  RegDBCreateKeyEx (svKeyName + "\\shell\\open", ""); 

  RegDBCreateKeyEx (svKeyName + "\\shell\\print", ""); 

  RegDBCreateKeyEx (svKeyName + "\\shell\\open\\command", "");

  //RegDBCreateKeyEx (svKeyName + "\\shell\\print\\command", "");

  RegDBSetKeyValueEx (svKeyName + "\\shell\\open\\command", "", REGDB_STRING, szApp, -1);

  //RegDBSetKeyValueEx (svKeyName + "\\shell\\print\\command", "", REGDB_STRING, szApp, -1);


  return 0;

end;  //End of function MakeAssociationEx


////////////////////////////////////////////////////////////////////////


function MakeAssociationEx2(szApp, szExtension, szName)

BOOL      bResult;

NUMBER    nResult;

STRING    svKeyName;


begin

  RegDBSetDefaultRoot ( HKEY_CLASSES_ROOT );


  StrSub ( svKeyName , szExtension , 1 , 3 );

  svKeyName = svKeyName + ".Document";


//  bResult = RegDBKeyExist(szExtension);

//  if (bResult = TRUE) then

//    nResult = AskYesNo ("Warning the extension " + szExtension + " is already registered. Overwrite?", YES);

//    if (nResult = NO) then

//       return -1;

//    endif;

//  endif;


  LongPathToShortPath (szApp);

  szApp = szApp + " \"%1\"";

  RegDBCreateKeyEx (szExtension, "");

  RegDBSetKeyValueEx ( szExtension , "" , REGDB_STRING , svKeyName , -1 );


  RegDBCreateKeyEx (svKeyName, "");

  RegDBSetKeyValueEx ( svKeyName , "" , REGDB_STRING , szName , -1 );

  RegDBCreateKeyEx (svKeyName + "\\shell", "");

  RegDBCreateKeyEx (svKeyName + "\\shell\\open", ""); 

  RegDBCreateKeyEx (svKeyName + "\\shell\\print", ""); 

  //RegDBCreateKeyEx (svKeyName + "\\shell\\open\\command", "");

  RegDBCreateKeyEx (svKeyName + "\\shell\\print\\command", "");

  //RegDBSetKeyValueEx (svKeyName + "\\shell\\open\\command", "", REGDB_STRING, szApp, -1);

  RegDBSetKeyValueEx (svKeyName + "\\shell\\print\\command", "", REGDB_STRING, szApp, -1);


  return 0;

end;  //End of function MakeAssociationEx2


///////////////////////////////////////////////////////////////////////////////


function OnMoved()

begin         

MakeAssociation(TARGETDIR ^ "\\bin" ^ "XSViewer.exe", ".htx",TARGETDIR ^ "\\bin" ^ "XSViewer.exe,0" );

MakeAssociation(TARGETDIR ^ "\\bin" ^ "XSViewer.exe", ".hwx",TARGETDIR ^ "\\bin" ^ "XSViewer.exe,0" );

MakeAssociationEx1(TARGETDIR ^ "\\bin" ^ "XSViewer.exe", ".htx",TARGETDIR ^ "\\bin" ^ "XSViewer.exe,0" );

MakeAssociationEx1(TARGETDIR ^ "\\bin" ^ "XSViewer.exe", ".hwx",TARGETDIR ^ "\\bin" ^ "XSViewer.exe,0" );

MakeAssociationEx2(TARGETDIR ^ "\\bin" ^ "XSViewer.exe /p", ".htx",TARGETDIR ^ "\\bin" ^ "XSViewer.exe,0" );

MakeAssociationEx2(TARGETDIR ^ "\\bin" ^ "XSViewer.exe /p", ".hwx",TARGETDIR ^ "\\bin" ^ "XSViewer.exe,0" );

//MessageBox ("HANDY Groupware 클라이언트가 설치 완료 되었습니다.", INFORMATION);


end;



Posted by 배터리
핸디소프트/일일일~2013. 10. 29. 16:45

1. 회사 서버내에 특정시간대(새벽 4시경) 에 telnet 접속 시도가 있어 아예 차단시킴

# vi /var/log/secure

Oct 28 01:31:31 sky xinetd[775]: START: telnet pid=25429 from=123.212.190.xxx

Oct 28 04:22:37 sky xinetd[775]: START: telnet pid=26149 from=1.85.161.176

Oct 28 04:22:44 sky xinetd[775]: START: telnet pid=26150 from=1.85.161.176

Oct 28 04:22:52 sky xinetd[775]: START: telnet pid=26151 from=1.85.161.176

Oct 28 04:22:59 sky xinetd[775]: START: telnet pid=26152 from=1.85.161.176

Oct 28 04:23:06 sky xinetd[775]: START: telnet pid=26153 from=1.85.161.176

Oct 28 04:23:13 sky xinetd[775]: START: telnet pid=26154 from=1.85.161.176


=> 123.212.190 으로 시작하는 IP는 정상 / 1.85 로 들어오는 IP는 비정상


2. 또한 message 로그에도 다음과 같은 로그가 보임

# vi /var/log/message

Oct 28 04:22:44 sky telnetd[26149]: ttloop: peer died: EOF

Oct 28 04:22:51 sky telnetd[26150]: ttloop: peer died: EOF

Oct 28 04:22:59 sky telnetd[26151]: ttloop: peer died: EOF


=> ttloop: peer died: EOF 는 텔넷접속시도 하다가 연결이 안된거라고 하는데 ㄷㄷ



3. 방법은 아래와 같이 처리


# vi /etc/hosts.deny 

ALL:ALL

=> ALL:ALL 은 모두 접근하지 못하게 함

    /etc/hosts.allow에 지정한 곳만 접근이 허용됨


# vi /etc/hosts.allow

in.telnetd : 123.212.190.0/255.255.255.0

=> 텔넷 접속시 123.212.190. 로 시작하는 IP대역대만 접속을 허가



이후 xinetd 데몬 재실행 및 연결 확인 (지정해준 IP 대역대 외에서 접속시 차단됨을 확인)


[root@localhost etc]#  service xinetd restart

Posted by 배터리