All posts

전체 글

httpd version: 2.2.15

 

If you put the httpd module to be used in the 'modules/' directory, it will works.

But for 'mod_dnssd', you need to install the package of the module.

 

When I just added the module file in 'modules/', the error occurred like under.

Cannot load /etc/httpd/modules/mod_dnssd.so into server: libavahi-common.so.3: cannot open shared object file: No such file or directory

 

In this case, you can easily solve the problem like this.

# yum install mod_dnssd -y

 

And maybe a httpd reboot will be required.

# service httpd restart

IIS 웹 서버에서 BonCode 버전 업그레이드를 진행하던 중 다음과 같은 오류가 발생했다.

IIS 에러 문구

 

그래서 BonCodeAJP13.dll 의 런타임을 확인해 보았다.

 

PS > $path = "D:\BonCodeAJP13.dll"
PS > [Reflection.Assembly]::ReflectionOnlyLoadFrom($path).ImageRuntimeVersion

 

dll 런타임 확인하기

 

이제 IIS 응용 프로그램 풀에서 해당 사이트의 풀을 dll의 런타임과 동일한 버전으로 변경해주면 된다.

dll 런타임과 동일한 .NET CLR 버전 변경

 

서비스 재시작 필요없이 바로 정상작동 하는 것을 확인할 수 있다.

Server:

1. Install nfs-utils

# yum -y install nfs-utils

2. Setting config file

 /etc/exports

[Directory]    [Client_IP](rw,sync,no_root_squash,no_subtree_check)
/home    10.110.0.10(rw,sync,no_root_squash,no_subtree_check)

3. Apply the settings

# exportfs -a

 

Client:

1. Install nfs-utils

# yum -y install nfs-utils

2. Create a directory to mount

# mkdir -p /mnt/nfs/home

3. Mount

# mount [Server_IP]:[Server_Drectory] [Directory]
# mount 192.168.10.243:/home /mnt/nfs/home

4. Confirm

# df -h

 

 

Refer:

 

nfs(5) - Linux man page

nfs(5) - Linux man page Name nfs - fstab format and options for the nfs file systems Synopsis /etc/fstab Description NFS is an Internet Standard protocol created by Sun Microsystems in 1984. NFS was developed to allow file sharing between systems residing

linux.die.net

 

AWS CentOS root 계정 로그인.

 

# sudo su -
# sudo -i

 

스크립트

#!/bin/sh

BackupDir="/var/service/DB/"
DATE=$(date +%Y%m%d)
DELDATE=$(date --date "28 day ago" +%Y%m%d)
SqlAcc="-uUser1 -pPassword1"
SqlOption="${SqlAcc} --default-character-set=utf8 --routines --single-transaction --quick"

rm -rf ${BackupDir}${DELDATE}
mkdir ${BackupDir}${DATE}
chmod 700 ${BackupDir}${DATE}

DBlist=$(mysql ${SqlAcc} -e "show databases" | grep -v Database | grep -v information_schema)
# DBlist=$(cat ./DB_List.txt)

for DB in $DBlist; do
  FileName="${BackupDir}${DATE}/${DB}.sql"
  mysqldump ${SqlOption} --no-create-db ${DB} > $FileName
  gzip --best --rsyncable $FileName
  done

chmod 400 ${BackupDir}${DATE}/*

# when you recovery, SQL file overwrite to DB.

 

스케줄 등록(crontab)

# crontab -e

 0 6 * * * /var/service/DB/DBbak.sh

 

스크립트 설명

더보기
#!/bin/sh

* BackupDir="[DB 백업 경로]"    // 백업 경로.
DATE=$(date +%Y%m%d)
* DELDATE=$(date --date "[숫자] day ago" +%Y%m%d)    // 백업 기간.
* SqlAcc="-u[유저명] -p[비밀번호]"

// 필요 옵션 추가해서 사용.
* SqlOption="${SqlAcc} [옵션]"


rm -rf ${BackupDir}${DELDATE}    // 백업 기간 지난 백업본 삭제.
mkdir ${BackupDir}${DATE}
chmod 700 ${BackupDir}${DATE}


// DB 목록 직접 조회 후 백업 진행.
* DBlist=$(mysql ${SqlAcc} -e "show databases" | grep -v [백업 제외 DB명])

// DB 목록을 사용할 경우.
# DBlist=$(cat ./DB_List.txt)


// DB 백업 진행
for DB in $DBlist; do
  FileName="${BackupDir}${DATE}/${DB}.sql"
  mysqldump ${SqlOption} --no-create-db ${DB} > $FileName
  gzip --best --rsyncable $FileName     // 압축 원하지 않을 경우 제외해도 무방.
  done


chmod 400 ${BackupDir}${DATE}/*    // 삭제 방지


# 복구할 때는 sql 파일을 DB로 덮어쓰기 진행.

DB 복구하는 방법