아래 사이트 보고 한 번에 성공 감사합니다.
http://kimegoo.blog.me/120116996187
The server reported an error while performing the "cvs checkout" command.
: XML error at line 1: Document is empty
:
: XML error at line 1: Start tag expected, '<' not found
:
: XML error at line 1: Document is empty
:
: XML error at line 1: Start tag expected, '<' not found
:
: cvs [server aborted]: Malformed fileattr.xml file in /프로젝트명/폴더명/CVS. Please fix or delete this file
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
ServerKeyBits 1024
PermitRootLogin yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
HostbasedAuthentication no
PasswordAuthentication no
PermitEmptyPasswords no
Subsystem sftp /usr/libexec/sftp-serve
ssh client 프로그램으로 B장비에 접속하려면 다음을 yes로 한다.
PasswordAuthentication yes
5. B에서 ssh를 재시작한다. (관리자 페이지에서 정지/시작)
6. B에서 다음을 실행하면 A장비 /volume1/ 밑에 있는 모든 파일,디렉토리가 B장비 /volume1 로 옮겨진다.
--delete 옵션을 주면 A에서 파일이 없어지면 B도 삭제되니 주의해야만 한다.
rsync -avPzr --delete --stats -l -t -e ssh 사용자id@A의ip_address:/volume1/ /volume1
ex) rsync -avPzr --delete --stats -l -t -e ssh root@192.168.1.100:/volume1/web/ /volume1/web
/volume1/web에 있는 모든 파일, 디렉토리를 /volume1/web에 복사한다. (정확히 말하면 일치시킨다.)
7. 사용자 디렉토리에 backup.sh 작성
#!/bin/sh
rsync -avPzr --delete --stats -l -t -e ssh root@192.168.0.21:/volume1/web/ /volume1/web
8. ./backup.sh 을 실행하여 잘되는제 확인합니다.
9. /etc/crontab 을 수정하여 일정한 시간이 되면 backup.sh가 수행되도록 합니다.
10. backup.sh 끝에 poweroff를 넣으면 백업후 자동 종료까지 됩니다.
// OPTION //
-v : 진행 상황을 상세하게 보여줌
-r : 지정한 디렉토리의 하위 디렉토리까지 재귀적으로 실행
-l : 소프트 링크 보존
-H : 하드 링크 보존
-p : 버전 속성 보존
-o : 소유 속성 보존(루트)
-g : 그룹 속성 보존
-t : 타임스탬프 보존
-D : 디바이스 파일 보존(루트)
-z : 데이터 압축 전송
-b : 낡은 파일은 ~가 붙음
-u : 추가된 파일만 전송 새 파일은 갱신하지 않음
--existing : 추가된 파일은 전송하지 않고 갱신된 파일만 전송
--delete : 서버에 없는 파일은 클라이언트에서도 삭제
-a : 아카이브 모드. rlptgoD를 자동 지정
-c : 서버와 클라이언트의 파일 크기를 세밀히 체크
--stats : 결과를 보고
-e ssh(rsh) : 전송 암호화
1.다이나믹DNS업데이트 실행 스크립트를 만듭니다.
[root]# vi /usr/local/bin/ddns.sh |
[root]# chmod +x /usr/local/bin/ddns.sh |
3. /etc/crontab 파일 편집하여,일정한 시간마다(예:매 5분) 다이나믹DNS 업데이트 스크립트 작동하도록 합니다.
[root]# vi /etc/crontab |
4. /etc/rc.d/rc.local 파일에 다이나믹DNS 업데이트 스크립트 실행 라인을 추가하여, 시스템 시작시에 스크립트 실행되도록 합니다.
(리눅스배포판의 종류에 따라 시작스크립트 방식이 다릅니다. Ubuntu 리눅스의 경우 /etc/rc.local 을 사용합니다. Debian 리눅스의 경우 rc.local 파일을 사용하지 않습니다. 자세한 사항은 Debian 리눅스FAQ를 참조하십시오.)
[root]# vi /etc/rc.d/rc.local |
| ||||||||||||||||||||||||
|
원본 : http://azeditech.com/tomcat/multiple-tomcat-instances.html
Running multiple Tomcat instances on one server
Download Tomcat 4.1 or 5.5, and unzip it into an appropriate directory. I usually put it in /usr/local, so it ends up in a directory called /usr/local/apache-tomcat-5.5.17 (5.5.17 being the current version as of this writing), and make a symlink named /usr/local/tomcat to that directory. When later versions come out, I can unzip them and relink, leaving the older version in case things don't work out (which rarely if ever happens, but I'm paranoid).
For each instance of Tomcat you're going to run, you'll need a directory that will be CATALINA_HOME. For example, you might make them /var/tomcat/serverA and /var/tomcat/serverB.
In each of these directories you need the following subdirectories: conf, logs, temp, webapps, and work.
Put a server.xml and web.xml file in the conf directory. You can get these from the conf directory of the directory where you put the tomcat installation files, although of course you should tighten up your server.xml a bit.
The webapps directory is where you'll put the web applications you want to run on the particular instance of Tomcat.
I like to have the Tomcat manager webapp installed on each instance, so I can play with the webapps, and see how many active sessions there are. See my instructions for configuring the Tomcat manager webapp.
Tomcat listens to at least two network ports, one for the shutdown command, and one or more for accepting requests. Two instances of Tomcat can't listen to the same port number on the same IP address, so you will need to edit your server.xml files to change the ports they listen to.
The first port to look at is the shutdown port. This is used by the command line shutdown script (actually, but the Java code it runs) to tell the Tomcat instance to shut itself down. This port is defined at the top of the server.xml file for the instance.
<Server port="8001" shutdown="_SHUTDOWN_COMMAND_" debug="0">
Make sure each instance uses a different port value. The port value will normally need to be higher than 1024, and shouldn't conflict with any other network service running on the same system. The shutdown string is the value that is sent to shut the server down. Note that Tomcat won't accept shutdown commands that come from other machines.
Unlike the other ports Tomcat listens to, the shutdown port can't be configured to listen to its port on a different IP address. It always listens on 127.0.0.1.
The other ports Tomcat listens to are configured with the <Connector> elements, for instance the HTTP or JK listeners. The port attribute configures which port to listen to. Setting this to a different value on the different Tomcat instances on a machine will avoid conflict.
Of course, you'll need to configure whatever connects to that Connector to use the different port. If a web server is used as the front end using mod_jk, mod_proxy, or the like, then this is simple enough - change your web server's configuration.
In some cases you may not want to do this, for instance you may not want to use a port other than 8080 for HTTP connectors. If you want all of your Tomcat intances to use the same port number, you'll need to use different IP addresses. The server system must be configured with multiple IP addresses, and the address attribute of the <Connector> element for each Tomcat instance will be set to the appropriate IP address.
Startup scripts are a whole other topic, but here's the brief rundown. The main different from running a single Tomcat instance is you need to set CATALINA_BASE to the directory you set up for the particular instance you want to start (or stop). Here's a typical startup routine:
JAVA_HOME=/usr/java JAVA_OPTS="-Xmx800m -Xms800m" CATALINA_HOME=/usr/local/tomcat CATALINA_BASE=/var/tomcat/serverA export JAVA_HOME JAVA_OPTS CATALINA_HOME CATALINA_BASE $CATALINA_HOME/bin/catalina.sh start