blog.visualp.com
# yum install subversion |
# mkdir /home/svn |
# cd /home/svn # svnadmin create repo-tasks |
# vi /home/svn/repo-tasks/conf/svnserve.conf |
### This file controls the configuration of the svnserve daemon, if you ### use it to allow access to this repository. (If you only allow ### access through http: and/or file: URLs, then this file is ### irrelevant.) ### Visit http://subversion.tigris.org/ for more information. [general] ### These options control access to the repository for unauthenticated ### and authenticated users. Valid values are "write", "read", ### and "none". The sample settings below are the defaults. anon-access = none auth-access = write ### The password-db option controls the location of the password ### database file. Unless you specify a path starting with a /, ### the file's location is relative to the conf directory. ### Uncomment the line below to use the default password file. password-db = passwd ### The authz-db option controls the location of the authorization ### rules for path-based access control. Unless you specify a path ### starting with a /, the file's location is relative to the conf ### directory. If you don't specify an authz-db, no path-based access ### control is done. ### Uncomment the line below to use the default authorization file. #authz-db = authz ### This option specifies the authentication realm of the repository. ### If two repositories have the same authentication realm, they should ### have the same password database, and vice versa. The default realm ### is repository's uuid. realm = Tasks Repository |
# vi /home/svn/repo-tasks/conf/passwd |
### This file is an example password file for svnserve. ### Its format is similar to that of svnserve.conf. As shown in the ### example below it contains one section labelled [users]. ### The name and password for each user follow, one account per line. [users] # harry = harryssecret # sally = sallyssecret svnuser = svnpass |
# svnserve -d -r /home/svn/ # vi /etc/sysconfig/iptables |
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT |
# /etc/init.d/iptables restart |
ps -el | grep 'Z'
Z 가 Zombie 다!
참고로
S : sleeping
R : running
D : waiting (over het algemeen voor IO)
T : gestopt (suspended) of getrasseerd
Z : zombie (defunct)
iptables -A INPUT -s 차단IP주소 -j DROP
예) 192.168.1.1 전체 대역을 차단할때
iptables -A INPUT -s 192.168.1.0/24 -j DROP
차단 내용확인
iptables -L
삭제
iptables -D INPUT 3
모두삭제
iptables -F
저장
service iptables save
해제
는
vi iptables에서 직접 목록 제거후 save 후 restart하면된다.
#tar cvf compress_image.tar image --exclude .svn
웹사이트 방문자들이 파일이나 이미지를 다운로드할때 보여지는 주소, 예를 들어 이미지 주소가
http://www.guitina.com/wp-content/uploads/blockberry.jpg 일때 http://www.guitina.com/wp-content/uploads/ 를 주소창에 입력하면
그 디렉토리 안에 있는 모든 파일들이 보여질때가 있다.
이런 노출을 방지하기 위해서
1. 각 디렉토리마다 index 파일을 넣기
2. 각 파일에 권한 설정을 해주기
3. Apache <Directory> 설정을 바꿔 숨기기
만약 Apache를 처음 실행하고 이 설정을 바꿔주지 않으면 모든 파일이 노출된다.
내 경우는 vhost를 자주 사용해서 사이트 모든 파일 목록을 보이지 않게 설정하는데 3번의 경우를 자주 이용한다.
1.
<
Directory
/>
2.
Options Indexes FollowSymLinks
3.
AllowOverride All
4.
< /
Diretory
>
Apache Directory Options의 처음 값 중에 Indexes 지워주면
1.
<
Directory
/>
2.
Options FollowSymLinks
3.
AllowOverride All
4.
< /
Directory
>
이 사이트내 Index 목록 볼 수 없게 된다.
이때 중요한 것은 혹시 사이트내 .htaccess 파일이 있고
.htaccess 파일에서 Options Indexes를 설정해준다면 위 코드에서 AllowOverride All 설정때문에
파일 리스트가 보인다.
특정 폴더만 이 옵션을 사용하려면
1.
<
Directory
/ www/ folder>
2.
Options Indexes FollowSymLinks
3.
AllowOverride All
4.
< /
Directory
>
위 코드와 같이 폴더를 지정해주면 된다.
[원문] : http://www.guitina.com/2009/06/25/apache-%EC%84%9C%EB%B2%84-%ED%8C%8C%EC%9D%BC-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%88%A8%EA%B8%B0%EA%B8%B0/
하루만에 쓸만한 내용을 두개씩이나 올리긴 처음이군^^
뭐 그저 혼자 쓸모 있다고 생각 하지만요.
혹시 서버를 관리해본 경험이 있다면, SSH 나 TELNET 등을 알것입니다.
물론 윈도우라면 원격지원도 이와 유사하겠죠.
이런 모든 프로그램등은 특정한 포트를 통해 관련 프로그램을 사용함으로써 서버에 접속을 할수 있답니다. 그런데 제가 이번에 소개할 녀석은 웹을 통해 서버를 관리 할 수 있습니다.(왠지 이렇게 말하지 꼭 약장수가 약소개 하는것 같군요.)
Webmin은 오픈소스 라이센스의 서버 관리 프로그램입니다.
Webmin의 특징이라면 자체 웹 서버를 내장하고 있기 때문에 Apache가 죽은 상황에서도 서버 접근이 가능하다는 것과 테마 적용을 통해 디자인 변경이 가능 하다는것, 또한 자바 애플릿이 지원되는 환경에서는 파일 매니져도 사용이 가능 하다고 합니다.
Webmin은 충분히 강력하기 때문에 어느정도 익숙해지기만 하면 위에서 설명한 터미널(SSH,TELNET등)에 접근할 필요가 없어집니다.
주요 프로그램들의 경우 이미 관리 모듈이 존재하고(대충 확인 해본결과 상당수 기본 내장되어 있는듯, 그리고 내장이 안되어 있는 모듈도 몇번에 클릭으로 추가가능함) 이 관리 모듈을 통하면 정말 서버 관리가 편해질듯...
물론 제가 아직 제대로 사용해보지 않았기에 얼마까지 편의를 제공하는지, 그리고 실제로 어느정도 까지 편한지는 제대로 설명하기 힘듭니다. 하지만 같이 올리는 스크린샷을 보시면 어떤 기능이 있는지 예상하실수 있으리라 봅니다.
내용 그만 보기
우선 기능 스크린샷에 앞서 설치법 부터 해야 겠죠..^^
근데 rpm이 제공되기 때문에... 무척이나 쉽습니다. 용량이 다소 큰게 문제지만요.
webmin 사이트에서 설치 파일을 받도록 하자.
http://www.webmin.com/download.html
[root@ns ~]# rpm -Uvh webmin-1.290-1.noarch.rpm
준비 중... ########################################### [100%]
Operating system is Redhat Linux
1:webmin ########################################### [100%]
Webmin install complete. You can now login to http://ns.my2pc.net:10000/
as root with your root password.
가볍게 인스톨이 끝남과 동시에, 루트 유저를 통해 로그인이 가능한 웹주소를 알려주는군요.
친절하기도 해라ㅎㅎ^^