[글쓴이:] aiseki@gmail.com
헤이리 마을
ㆍ
ㆍ
ㆍ
헤이리 마을에서…
헤이리 마을
ㆍ
ㆍ
ㆍ
ㆍ
ㆍ
ㆍ
ㆍ
ㆍ
ㆍ
헤이리 마을에서…
헤이리 마을
헤이리마을에서…
아이템박스(www.itembox.co.kr)
아데나365(www.adena365.com)
ClamAV
[zlib 설치]
http://www.zlib.net
./configure –prefix=/usr/local/zlib
make
make install
[ClamAV 설치]
groupadd clamav
useradd -g clamav -M -d /dev/null -c “Clam AntiVirus” clamav
tar xvfz clamav-0.92.tar.gz
cd clamav-0.92
./configure –prefix=/usr/local/clamav –sysconfdir=/etc –enable-static=yes –enable-shared=yes –disable-dns –with-zlib=/usr/local/zlib
[자동 업데이트 설정하기]
ClamAV에서는 바이러스에 대한 정보를 업데이트하기 위해 FreshClam이라는 것을 제공하고 있다. 이 프로그램은 정해진 시각에 database.clamav.net에 접속해 서버에 설치된 정보와 비교해 업데이트 여부를 체크한다. 업데이트에 대한 기본정보는 다음과 같이 설정해 /var/log/clam-update.log 파일에 남도록 한다.
touch /var/log/clam-update.log
chmod 600 /var/log/clam-update.log
chown clamav /var/log/clam-update.log
/usr/local/clamav/bin/freshclam
httpd.conf
이미지 캐싱 처리 [mod_expires]
제 목 : [튜닝] apache에서 이미지 캐싱 처리(mod_expires)
글쓴이 : 좋은진호(truefeel, http://coffeenix.net/ )
글쓴날 : 2004.2
정리일 : 2004.8.10(정리)
apache에서는 mod_expires 모듈을 통해 Expires HTTP header 를 설정할 수 있다.
이를 통하여 클라이언트(웹페이지 방문자)에 캐싱되는 문서나 이미지들이 많아서 트래픽을
감소시킬 수 있다. 이미지 전용 서버나 이미지 디렉토리에 설정을 해두면 효과적이다.
이미지 서버에 지정한 다음 예를 보자.
[quote]
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault “access plus 1 month”
# 제외할 디렉토리
<Directory “/usr/local/apache/htdocs/temp”>
ExpiresActive Off
</Directory>
</IfModule>
[/quote]
– ExpiresActive On 지시자로 Expires 설정을 enable 한다.
– ExpiresDefault “access plus 1 month” 지시자는 액세스한지 얼마나 지나서 expire할 것인지를 지정한다.
즉, 지정한 기간만큼 클라이언트에 캐싱이 된다. 위에는 1달이다.
이외에 클라이언트에서 액세스한지 1달, 4주, 30일, 1년 등과 같은 expire 주기와
서버의 파일의 수정 시간으로 expire 주기를 설정할 수 있다.
[quote]
ExpiresDefault “access plus 1 month”
ExpiresDefault “access plus 4 weeks”
ExpiresDefault “access plus 30 days”
ExpiresDefault “access plus 1 years”
ExpiresDefault “modification plus 30 days”
[/quote]
– 설정 마지막부분에 Directory 지시자와 ExpiresActive Off 설정을 통해
특정 디렉토리만 expire 설정에서 제외할 수 있다.
반대로 특정 디렉토리만 On으로도 설정할 수 있다. (일반 웹서버에 /images 와 같이 디렉토리가 있는 경우)
[quote]
ExpiresByType image/jpeg “acces plus 4 weeks”
ExpiresByType image/gif “acces plus 4 weeks”
[/quote]
– 위처럼 파일의 유형(image/jpeg, image/gif은 이미지 파일)으로도 가능하다.
아주 간단하지 않는가?
참고로 [다음(daum)] 의 이미지 서버는 28일(4주)로 [야후!코리아] 는 5년으로 설정되어 있다.
VB.Net 2003에서 웹CGI script로 multipart/form-data posting하기
안녕하세요.
VB .NET 2003 windows application에서 특정 웹의 CGI script로 데이타를 보낸 후 그 결과를 받아오는 방법을 알고 싶습니다.
http://pubchem.ncbi.nlm.nih.gov/search/PreQSrv.cgi 로 query를 보내는 것인데,
솔직히 어떻게 해야 될지 잘 모르겠습니다.
http://pubchem.ncbi.nlm.nih.gov/search/ 에 가면 구조 검색 기능이 있는데,
여기에 SMILES 에 예를 들어 ‘CCCCCC’를 넣고 ‘Search’버튼을 누르면,
해당 검색 queyr를 위의 PreQSrv.cgi로 보내게 됩니다.
POST method를 사용하는데,
어떤 식으로 VB .Net에서 구현을 해야될지 모르겠습니다. -_-;;
여러군데 찾아다녀서 아래와 같은 코드를 얻었는데, 계속해서 에러만 납니다.
(Console application 용으로 간단하게 만든것입니다.)
postData가 잘못된 것 같기도 하고 도무지 모르겠습니다. -_-.
고수님들의 조언 꼭 부탁드립니다. 미리 감사드립니다.
——————————————————————————————————————–
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Module Module1
Sub Main()
‘ Create a request using a URL that can receive a post.
Dim request As WebRequest = WebRequest.Create(“http://pubchem.ncbi.nlm.nih.gov/search/PreQSrv.cgi”)
‘ Set the Method property of the request to POST.
request.Method = “POST”
‘ Create POST data and convert it to a byte array.
Dim postData As String = “simpledata_search=CCCCCC&mode=simplequery&check=remote&execution=remote&queue=ssquery&output=entrez”
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
‘ Set the ContentType property of the WebRequest.
request.ContentType = “multipart/form-data”
‘ Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length
‘ Get the request stream.
Dim dataStream As Stream = request.GetRequestStream()
‘ Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length)
‘ Close the Stream object.
dataStream.Close()
‘ Get the response.
Dim response As WebResponse = request.GetResponse()
‘ Display the status.
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
‘ Get the stream containing content returned by the server.
dataStream = response.GetResponseStream()
‘ Open the stream using a StreamReader for easy access.
Dim reader As New StreamReader(dataStream)
‘ Read the content.
Dim responseFromServer As String = reader.ReadToEnd()
‘ Display the content.
Console.WriteLine(responseFromServer)
‘ Clean up the streams.
reader.Close()
dataStream.Close()
response.Close()
End Sub
End Module
————————————————————————————————————-