ClarkConnect 4.2 RTL8110SC Gigabit Ethernet Card 설치하기

ClarkConnect 4.2에 RTL8110SC Gigabit 랜카드를 설치

ClarkConnect 4.2 에 R8110SC 기가비트 랜카드를 설치하게 되면 드라이버는 설정이 되나 초기화가 되지 않고 에러가 발생한다.
여러 포럼을 뒤적거린 결과 CentOS4.4 버전에 포함된 r8169.ko가 구버전이라는 사실을 알았다. (8110sc는 8169로 잡히게 된다.)

1. ClarkConnect에 Kernel 소스 및 개발 도구 설치
# apt-get update
# apt-get install cc-devel kernel-sourcecode kernel-devel

2. Source 버전에 따라 Symbolic Link 수정
# ln -s /usr/src/kernels/2.x.x-x.x.x.cc-i686 /lib/modules/2.x.x-x.x.x.x.cc/build

3. RTL8110SC 드라이버 구하기
http://www.realtek.com.tw 에서 Linux Kernel 2.6.x 드라이버를 다운 받는다.( 여기서 다운받기 )
적당한곳에 압축을 푼다.

3. r8169.ko Build & Instll
# make clean modules
# make install
# service network restart

우분투 랜카드 변경시 설정

랜카드 변경되었을때 설정

1. dmseg 에서 랜카드가 잡혀있는지 확인
.. 중략..
[   32.309241] eth0: RTL8169sc/8110sc at 0xdc83c000, 00:30:18:ae:19:dc, XID 18000000 IRQ 17
[   32.310119] eth1: RTL8169sc/8110sc at 0xdc83e000, 00:30:18:ae:19:dd, XID 18000000 IRQ 16
[   32.310992] eth2: RTL8169sc/8110sc at 0xdc84e000, 00:30:18:ae:19:de, XID 18000000 IRQ 18
[   18.790000] eth3: VIA Rhine II at 0x1e800, 00:30:18:a6:95:13, IRQ 21.
.. 후략..

2. etc/network/interface  에 다음과 같이 설정을 추가 해준다.
auto lo eth0 eth1 eth2 eth3 eth4
iface lo inet loopback
iface eth4 inet dhcp
iface eth3 inet dhcp
iface eth0 inet dhcp
iface eth1 inet dhcp
iface eth2 inet dhcp

3. 각각의 세부 eth설정은 ifconfig를 이용한다

우분투 서버 셋팅하기

우분투 기본 환경 설정

1. Ubuntu 7.1 Server 설치

# sudo apt-get update
# sudo apt-get dist-update

2. Locale 변경
#  sudo locale-gen ko_KR.EUC-KR
#  /etc/environment 의 LANG를 ko_KR.EUC-KR로 수정

3. Webmin 설치

# Webmin 다운로드 :  webmin_1.400_all.deb
# dpkg –install webmin_1.400_all.deb
# apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

4. apache2 환경설정

# sudo a2enmod rewrite : mod_rewrite추가
# /etc/apache2/sites-available/default 에 AllowOverride all로 변경
# /etc/apache2/Apache2.conf에 다음의 설정을 추가/확인
<IfModule mod_rewrite.c>
   RewriteEngine On
</IfModule>

5. proFTPD 환경설정

# sudo apt-get install proftpd
# /etc/proftpd/proftpd.conf에 다음의 내용을 추가
<Global>
RootLogin off              # root 로그인 방지
AllowForeignAddress on     # 외부 접속 허용/금지
AllowRetrieveRestart on    # 이어받기 허용/금지
AllowStoreRestart on       # 이어쓰기 허용/금지
DeferWelcome on           
ServerIdent on
LoginPasswordPrompt on     # 사용자 암호 묻기
AllowOverwrite on          # 겹쳐쓰기 허용
AuthAliasOnly on           # 인증된 alias 사용자만 사용
UserAlias #### #### (ftp user, shell user : 필요한 사용자 이름으로 지정)
UseFtpUsers on             # Ftp용 사용자를 사용
RequireValidShell off      # shell로 로그인된 사용자만 사용
HiddenStor on              # hidden속성 저장
</Global>

6. Samba 환경설정

# sudo smbpasswd -a <userid> : Samba 사용자 추가
# /etc/samba/smb.conf Global 옵션 추가/확인
[global]
 encrypt passwords = true
 netbios name = <server name>
 server string = <server name>
 writable = yes 
 invalid users = root
 workgroup = WORKGROUP
 unix charset = euc-kr
# /etc/samba/smb.conf 에 공유디렉토리 추가
[test]
 hide dot files = no
 delete readonly = yes
 path = /../../.. (공유할 디렉토리)
 sync always = yes
# sudo /etc/init.d/samba restart
 

7. Java 설치

# sudo apt-get install sun-java5-bin sun-java5-plugin
# sudo update-alternatives –config java : Java Defualt를 설정

8. Tomcat & JDK 설치

# sudo apt-get install tomcat5.5 sun-java6-jdk tomcat5.5-webapps tomcat5.5-admin
# /etc/default/tomcat5.5 에 JAVA_HOME 설정/확인
JAVA_HOME=/usr/lib/jvm/java-6-sun
# sudo update-alternatives –config java : Java Defualt를 설정
# sudo /etc/init.d/tomcat5.5 start : 톰켓 시작
# wget http://localhost:8180 : 접속하여 확인

9. SVN 설치

# sudo apt-get install subversion libapache2-svn
# svnadmin create –fs-type fsfs /../../.. : 리포지토리 디렉토리 생성
# svnserve -d -r /../../..  : 시작 스크립트
# killall svnserve          : 종료 스크립트

10. build환경 구성
# sudo apt-get install gcc
# sudo apt-get install build-essential

특이사항
# 보안상 문제가 있을지라도 Webmin은 상당히 좋은 툴 이다. 이런저런 스크립트가 내장되어 대부분 gui에서 실행하면 스크립트와 설정파일을 얻을수가 있다

# 문자세트를 euc-kr로 통일 Ftp, Web, Samba, Local에서 만든 한글 디렉토리또는 파일이름이 잘 출력된다.

XPath 의 표현

XPath의 표현식

예)
//map[ @varSetName=’images’]/key[@name=’name’]/value/@valueString

위와 같은 표현일때 해당되는 노드가 여러개이면 리스트 형태로 나온다.

((LIST[ ‘조건식1 또는 index”])[‘조건식2 또는 index”])[‘조건식3 또는 index’]

위와 같이 리스트형태의 Index또는 조건식을 수행함으로서 특정 노드를 찾아낼 수 있다.

Python – 간단한 minidom 사용법

 
xml.dom.minidom:







   1 from xml.dom.minidom import parse, parseString
2
3 dom1 = parse( “foaf.rdf” ) # parse an XML file
4 dom2 = parseString( “<myxml>Some data <empty/> some more data</myxml>” )
5 print dom1.toxml()
6 print dom2.toxml()


Examples of Use



  • node.nodeName
  • node.nodeValue
  • node.childNodes


Find Elements


You can manually walk through the childNodes tree, comparing nodeNames.

You might be able to use getElementsByTagName as well:




   1 from xml.dom.minidom import parse
2 dom = parse(“foo.xml”)
3 for node in dom.getElementsByTagName(‘bar’): # visit every node <bar />
4 print node.toxml()

getElementsByTagName, works recursively into the tree, I believe.


Add an Element


Create & add an XML element (Something like <foo />) to an XML document.




   1 from xml.dom.minidom import parse
2 dom = parse(“bar.xml”)
3 x = dom.createElement(“foo”) # creates <foo />
4 dom.childNodes[1].appendChild(x) # appends at end of 1st child’s children
5 print dom.toxml()


Add an Element with Text Inside


Create & add an XML element to an XML document, the element has text inside.

ex: <foo>hello, world!</foo>




   1 from xml.dom.minidom import parse
2 dom = parse(“bar.xml”)
3 x = dom.createElement(“foo”) # creates <foo />
4 txt = dom.createTextNode(“hello, world!”) # creates “hello, world!”
5 x.appendChild(txt) # results in <foo>hello, world!</foo>
6 dom.childNodes[1].appendChild(x) # appends at end of 1st child’s children
7 print dom.toxml()


Import a Node


You can use DOM 2 “importNode” to take part of one XML document, and put it into another XML document.




   1 from xml.dom.minidom import parse
2 dom1 = parse(“foo.xml”)
3 dom2 = parse(“bar.xml”)
4 x = dom1.importNode(dom2.childNodes[1], # take 2nd node in “bar.xml”
5 True) # deep copy
6 dom1.childNodes[1].appendChild(x) # append to children of 2nd node in “foo.xml”
7 print dom1.toxml()


Links




See Also


출처 http://wiki.python.org/moin/MiniDom

xml문서 만들기

from xml.dom import minidom

# New document
xml = minidom.Document()

Actually the how-to could be finished here, but I will show a little bit more about the minidom.

The next snippet shows how to create an element, set attributes and add this on our document created in the last step.

# Creates user element
userElem = xml.createElement(“user”)

# Set attributes to user element
userElem.setAttribute(“name”, “Sergio Oliveira”)
userElem.setAttribute(“nickname”, “seocam”)
userElem.setAttribute(“email”, “seocam@seocam.net”)
userElem.setAttribute(“photo”,”seocam.png”)

# Append user element in xml document
xml.appendChild(userElem)


If you know the DOM specification nothing until here is new for you, but the next 2 snippets shows how to return a string and how to write a file with our xml document.
# Print the xml code
print xml.toxml(“UTF-8″)
fp = open(“file.xml”,”w”)
xml.writexml(fp, ” “, “”, “\n”, “UTF-8″)

# Method’s stub
# writexml(self, writer, indent=”, addindent=”, newl=”, encoding=None)


The result generated by both methods:
<?xml version=”1.0″ encoding=”UTF-8″?>
<user email=”seocam@seocam.net” name=”Sergio Oliveira”
nickname=”seocam” photo=”seocam.png”>

출처 http://www.seocam.net/how-tos/creating-a-new-xml-document-with-python-minidom

ora-12638 credential retrieval failed

ora-12638 credential retrieval failed 에 대한 Oracle 포럼 에 올라와 있는 답변

Hi JA,

I’m no Oracle expert, but from what can make out the NTS option makes the Oracle client attempt to use your current Windows domain credentials to authenticate you with the Oracle server. This could fail for a couple of reasons:

– The Oracle server is not configured to support Windows authentication
– The credentials you use to login to your local machine are not sufficient to allow you to login to the server.

In my case, it was the later. Despite the fact that I had told the client to use a different user name and password, it was still attempting to login using my domain credentials first. This failed because I was logged on to my local machine using my normal domain credentials rather than my administrator account.

Replacing the line:

SQLNET.AUTHENTICATION_SERVICES= (NTS)

with

SQLNET.AUTHENTICATION_SERVICES= (NONE)

in sqlnet.ora resolved the issue by disabling local support for authenticating using Windows credentials.

HTH,
Carey

출처 – oracle forum
http://forums.oracle.com/forums/thread.jspa?threadID=332525

상속계층의 표현

상속계층에 있는 클래스를 다음과 같이 클래스 별로 Table을 등록

public class Item {
 private int itemNumber;
 private String itemName;
 ….
}

public class LargeItem extends Item {
 private Vector middleItemList;
 …
}

<hibernate-mapping package=”net.maxoft.session.beans”>
  <class name=”Item” table=”CategoryItem”>
      <id name=”itemNumber” column=”Id”  unsaved-value=”null”>
          <generator class=”increment”/>
      </id>    
      <property name=”itemName” column=”CategoryName”/>  
     
      <joined-subclass name=”LargeItem” table=”LargeCategory”>
          <key column=”Id”/>         
          <bag name=”middleItemList”>
              <key column=”parentItem”/>
              <one-to-many class=”MiddleItem”/>
          </bag>             
      </joined-subclass>
  </class>
</hibernate-mapping>