1월, 2016의 게시물 표시

centos apache http 서버 구동시키기

<아파치를 이용해 파일을 http로 제공하기> <centos6.5> 설치하기 # yum -y install httpd* 시작하기 # service httpd start    or   # /etc/rc.d/init.d/httpd start apache 데몬 활성화 # chkconfig httpd on ( 서버 부팅 시 자동으로 Apache 데몬을 실행할 수 있게 추가 합니다) 설정파일 # vi /etc/httpd/conf/httpd.conf    <- 설정 파일 경로 설정파일 변경 # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # #DocumentRoot "/var/www/html" DocumentRoot "/home/inspace/TEST_WEB" # # This should be changed to whatever you set DocumentRoot to. # <Directory "/home/~~/~~"> # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories).  # # First, we configure the "default" to be a very restrictive set of...

python soap 사용하기

suds 라이브러리 설치 pip install <suds><- 정확하지 않다. 사용할 API 주소를 이요해서 client 생성 WSDL_URL = 'http://testIp.com:9090/test.asmx?WSDL' ws_clietn= wsClient(WSDL_URL) result=ws_client.service.TestAPI(0,0,"Collect Complete") TestAPI(int x, int y, string value) <--- 사용되는 API

centos ftp VSFTP설정

<설치관련> http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_vsftpd_%EC%84%A4%EC%B9%98_%EB%B0%8F_%EC%84%A4%EC%A0%95 <500oops - 에러발생> http://matthew.kr/centos-%EC%9D%98-vsftpd-%EC%A0%91%EC%86%8D%EC%8B%9C-500-oops-cannot-change-directoryroot-%EC%97%90%EB%9F%AC/ [root@fiamm ~]# setsebool allow_ftpd_full_access on [root@fiamm ~]# service vsftpd restart

python web Server 기본 (Rest,JSON)

<출처>https://mafayyaz.wordpress.com/2013/02/08/writing-simple-http-server-in-python-with-rest-and-json/ <code> from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer from SocketServer import ThreadingMixIn import threading import argparse import re import cgi   class LocalData( object ):   records = {}   class HTTPRequestHandler(BaseHTTPRequestHandler):     def do_POST( self ):   if None ! = re.search( '/api/v1/addrecord/*' , self .path):   ctype, pdict = cgi.parse_header( self .headers.getheader( 'content-type' ))   if ctype = = 'application/json' :   length = int ( self .headers.getheader( 'content-length' ))   data = cgi.parse_qs( self .rfile.read(length), keep_blank_values = 1 )   recordID = self .path.split( '/' )[ - 1 ]   LocalData.records[recordID] = data   print "record %s is added successfully" % recordID   else : ...