2021. 5. 12. 10:45ㆍjava
문제는 page provider를 fileSystemProvider 가 아니라 jdbc provider를 사용해야 한다는 것.
기존 게시판(본문이 오라클 db에 저장되어 있음)에서 본문 콘텐츠을 옮겨 와야하고, 첨부파일도 옮겨와야 한다.
1. apache jspwiki 기본 설치
- apache jspwiki 의 소스는 다음의 깃허브 레포지토리에 저장되어 있다.
apache/jspwiki
Apache JSPWiki is a leading open source WikiWiki engine, feature-rich and built around standard JEE components (Java, servlets, JSP) - apache/jspwiki
github.com
- apache jspwiki ()의 기본적인 설치는 다음과 같다.
Beta release Released 2014-12-26 Tested with JSPWiki 2.10.5
==========================================================================
가. Requirements
다음과 같은 시스템 요구사항을 가진다. 일반적인 것이기 때문에 다음 소프트웨어의 설치는 생략한다.
- Java 1.6 이상
- tomcat 6.x 이상 (Servlet API 2.5 이상 지원)
나. 다운로드
다음 URL에서 JSPWiki를 다운받는다.
archive.apache.org/dist/jspwiki/2.10.5/
여기서 설치할 버전은 2.10.5를 기준으로 한다.
다. 설치
1) 바이너리 파일 중 JSPWiki.war 파일을 다운로드 후 Rename 한다.
Rename은 원하는 Url (예를 들면 http://aisolomon.kins.re.kr/wiki ) 에 따라 변경한다. 예시 url 기준이라면, wiki.war 로 리네임 함.
2) `$TOMCAT_HOME/webapps` folder에 war를 둔다.
3) jspwiki-custom.properties 수정
각종 wiki 데이터가 생성될 디렉토리가 필요하다. 여기서는 /home/wikidata 디렉토리 생성했다.
그리고 tomcat의 `$TOMCAT_HOME/lib` folder 밑에 jspwiki-custom.properties 를 두고 내용을 수정한다.
(the `WEB-INF/` folder of the WAR 밑에 둘수 도 있으나 jspwiki.war 재배포시 다시 넣어야 하는 수고를 덜기 위해 위 경로에 넣어두자 !!)
...
jspwiki.fileSystemProvider.pageDir = /home/wikidata/
...
jspwiki.basicAttachmentProvider.storageDir = /home/wikidata/
...
log4j.appender.FileLog.File = /home/wikidata/jspwiki.log
...
** `jspwiki.xmlUserDatabaseFile`, `jspwiki.xmlGroupDatabaseFile` 의 설정에 대해서도 찾아볼것 !!
4) tomcat 시작...
5) 설치확인
다음 URL로 접속하여 설치사항을 확인한다. 물론 ip와 port는 자신의 환경에 맞게...
URL: http://localhost:8080/wiki/Install.jsp
처음에는 관리계정이 없다.
각각 설정을 확인하고 "Configure" 버튼을 클릭한다. 그러면 설치가 되고 admin 계정이 생성되고 임의적으로 생성된 Password를 알려준다.
생성된 admin 암호는 "Configure" 클릭한 다음 화면에 나타나니 화면이동 말고 잘 적어둔다.
톰캣 재기동...
6) 접속
다음 URL에 접속하고 admin으로 로그인해서 이것 저것 살펴본다. ^^
http://localhost:8080/wiki/
wiki에 대한 접근권한 변경은 the `WEB-INF/jspwiki.policy` 파일을 변경하면 된다.
2. JDBC Page Provider 적용
- jdbc page provider 소스
내가 찾은 페이지와 첨부파일 콘텐츠를 sql database에 저장하는 page provider 소스는 다음 깃허브 레포에서 찾을수 잇다. 이를 어떻게 기존 jspwiki에 integration 하면 되는지도 나와 있는데 한번 해봐야 한다.
github.com/hyowong/jspwiki-jdbcprovider
hyowong/jspwiki-jdbcprovider
JSPWiki has a pluggable content provider system. This package supplies providers for page and attachment content backed by a SQL database. - hyowong/jspwiki-jdbcprovider
github.com
전제조건:
Beta release Released 2014-12-26 Tested with JSPWiki 2.10.1
설치방법 :
#####Install
- If you're upgrading from a previous version, please read the section UPGRADE after reading this section
Basically,
- Copy the dist/JDBCProvider.jar file into JSPWiki's WEB-INF/lib directory.
- If you are planing to use DBCP, copy commons-dbcp2-2.0.jar and commons-pool2-2.2.jar in lib to WEB-INF/lib
- If you are planning to use C3P0, copy c3p0-0.9.2.1.jar in lib to WEB-INF/lib
- Copy the appropiate databasedriver to WEB-INF/lib
- Copy the jdbcprovider.properties into WEB-INF directory
- Edit the jdbcprovider.properties so that it reflects your favorite database-connection option.
- Copy the jdbcprovider..properties (e.g. jdbcprovider.syase.properties) into WEB-INF directory
- Merge the jspwiki.aditional.properties file into the jspwiki.properties file. Remember to remove the current page and attachment providers.
- Run the appropriate create_tables code to create the database tables (unless you are upgrading from a older version of JDBCProvider)
Note: the page provider and the attachment provider operate independently and you may use only one or both.
Example of changes to jspwiki.properties:
jspwiki.pageProvider = com.forthgo.jspwiki.jdbcprovider.JDBCPageProvider
jspwiki.attachmentProvider = com.forthgo.jspwiki.jdbcprovider.JDBCAttachmentProvider
jspwiki.jdbcprovider.configuration=jdbcprovider.properties
김*국 책임 참조해주면 땡큐!!
'java' 카테고리의 다른 글
[긁어다 쓰는 소스]] 공통코드 메모리에 올려서 사용하기 (0) | 2021.05.28 |
---|---|
(김책임의 고민) JSPWiki: Unable to load and setup properties from jspwiki.properties ubuntu1.20.04 (0) | 2021.05.13 |
jspwiki 사용법 (기본 with no plugin) (0) | 2021.05.07 |
(펌글) 요즘 개발자 커뮤니티 정보 (0) | 2021.04.29 |
[Stack Overflow 사용법] 개발자의 성장과 경험 포인트 (1) | 2021.04.27 |