Toggle navigation
Log-in
Wiki Index
Page Index
User Index
Application Index
Home
Xwiki8.3 install
Wiki source code of
Xwiki8.3 install
Last modified by
Akiyoshi Yamakawa
on 2016/11/10 19:57
Show line numbers
= Xwiki 8.3 インストール = == 0. Windowsでルーティングを設定し、402教室のサーバにルーティングする。 == 1. 自分のIF番号を確認する。(Windowsの管理者権限コマンドラインで以下を行い、Qualcom Atherosの番号を探す。 下記の例だと、「13」がIF番号 C:\Windows\system32>route print ~===================================================================== インターフェイス一覧 (% style="background-color:#ffa500;" %)13(%%)...2c d0 5a 42 e0 53 ......(% style="background-color:#ffd700;" %)Atheros AR938x(%%) Wireless Network Adapter 17...0a 00 27 00 00 11 ......VirtualBox Host-Only Ethernet Adapter 1...........................Software Loopback Interface 1 12...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface 18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3 19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4 ~===================================================================== 1. ルーティングを設定できる。((( 設定:下記のIPアドレスの86の部分は、自分の使っているサーバにより、87、88に変更して設定する。 C:\>route add 192.168.1.0 mask 255.255.255.0 172.16.94.(% style="background-color:#ffd700;" %)86(%%) IF 13 OK! \\解除: C:\>route delete 192.168.1.0 mask 255.255.255.0 172.16.94.86 IF 13 OK! ))) == 1.Xwikiのダウンロード == 1. 自分の仮想マシンにログインする。 Teratermの場合: 192.168.1.11 root himitu でログインする。 Linuxのsshの場合: ssh root@192.168.1.11 パスワード:himitu 1. ダウンロードサイト [[https:~~/~~/www.xwiki.org/xwiki/bin/view/Download/>>url:https://www.xwiki.org/xwiki/bin/view/Download/||target="_blank"]] 8.3 を選び、下記 zip 版を、自分の仮想マシン内にダウンロードする。 ZIP Package ファイル名: xwiki-enterprise-jetty-hsqldb-8.3.zip 1. 皆でダウンロードすると時間がかかるので、 (% style="background-color:#ffd700;" %)今回は、下記に置いてあります。(%%) 172.16.94.86:/tmp/Xwiki83.zip 172.16.94.87:/ tmp/Xwiki83.zip 172.16.94.88:/ tmp/Xwiki83.zip 1. コピー方法:各自の仮想マシンから以下を実行する。 cd でホームディレクトリに移動後、下記のいずれかでコピーする。 パスワード:LinuxServer@pass scp root@192.168.1.10:/tmp/xwiki83.zip . ←空白&ピリオドあります。 scp root@192.168.1.20:/tmp/xwiki83.zip . ←空白&ピリオドあります。 scp root@192.168.1.30:/tmp/xwiki83.zip . ←空白&ピリオドあります。 == 2.Xwikiの解凍と配置 == 1. 解凍する。 cd unzip xwiki83.zip ls xwiki-enterprise-jetty-hsqldb-8.3 というディレクトリができる。 1. 配置する。(ディレクトリのまるごと移動) mv xwiki-enter prise-jetty-hsqldb-8.3 /var/www/xwiki83 == 3.ポートの変更 == 1. 配置したディレクトリに移動 cd /var/www/xwiki83 1. 下記ファイルのポートを変更 start_xwiki.sh stop_xwiki.sh 8080→8090 8079→8091 1. 変更方法 vi エディタで、:(コロン)を打って、下記コマンドで一括変更 :%s/8080/8090/g :%s/8079/8091/g == 4.起動 == 1. 下記コマンドで起動する。 **./start_xwiki.sh &** 1. ((( しばらく待つ。**[root@localhost xwiki83]# ./start_xwiki.sh & Starting Jetty on port 8090, please wait...** (途中略) JavaのException (at ・・・・のようなメッセージ)がでていないか注意する。 \\6250d33c{HTTP/1.1}{0.0.0.0:8090} 2016-11-01 10:37:08.133:INFO:oejs.Server:main: Started @71222ms 2016-11-01 10:37:08.133:INFO:oxtjl.NotifyListener:main: ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- 2016-11-01 10:37:08.146:INFO:oxtjl.NotifyListener:main: (% style="background-color:#ffd700;" %)Server started, you can now open http:~/~/localhost:8090/ in your browser to access your wiki.(%%) 2016-11-01 10:37:08.146:INFO:oxtjl.NotifyListener:main: ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- こんな感じのメッセージがでたら、エンターキーを押して、コマンドラインにしておいてよい。(放置してもよい。) [root@localhost xwiki83]# ))) == 5.ブラウザでアクセス、ログイン == 1. Linux内のFirefoxからアクセスする場合: **http:~/~/localhost:8090/** \\しばらく、%表示が上がっていくので、待つと、初期画面が表示される。 1. Linux外からのブラウザでアクセスする場合: 11. LinuxのIPアドレスを確認 11. ポート 8090, 8091を開く。 コマンド: {{{firewall-cmd --add-port=8090/tcp --zone=public --permanent }}} {{{firewall-cmd --add-port=8091/tcp --zone=public --permanent }}} {{{firewall-cmd --reload}}} firewall-cmd ~-~-list-all 表示される内容に、8090, 8091があることを確認する。 1. \\ 11. Linux外のブラウザから下記でアクセス。 **http:~/~/192.168.1.11:8090/** 1. **ログインする。 画面右上の横三本線(三)をクリックし、ログインする。 ID: Admin 初期パスワード: admin** == 6.一般ユーザに登録させない設定 == 1. 画面右上三本線(三)クリックし、 Administer Wiki を選択。 1. Users&Groupsの、Rights(権限)をクリック 1. Usersのラジオボタンをクリック選択する。 1. Unregisterred User (未登録ユーザ)の、「Register」をクリックして チェックを外し、×(侵入禁止マーク)にする。 1. 画面左上「Xwikiロゴ」をクリックして、ホームに戻る。 == 7. ページの作成、編集 == 1. 画面真ん中右寄りの「+」マークで文書作成、適宜タイトルをつける。 作成位置に注意。 /Home/Homeに作ると便利。です。 1. 画面真ん中右寄りの「鉛筆マーク」で文書編集できます。 リンク 画像挿入 などやってみましょう。 == 8. 編集機能の追加 == 1. URLに下記を入れる。 **192.168.1.11:8090/xwiki/bin/edit/CKEditor/EditSheet?editor=object \\[[image:ckedit-tuning.PNG||height="400" width="370"]]** 1. **下記をクリック** JavaScriptExtension 0: CKEditor Loader \\下記のような編集テキストが表示される。((( /* #set ($ckeditorPath = $services.webjars.url('org.xwiki.contrib:application-ckeditor-webjar', 'ckeditor')) #set ($bootstrap3typeaheadPath = $services.webjars.url('org.webjars.npm:bootstrap-3-typeahead', 'bootstrap3-typeahead.min')) #if ("$!ckeditorPath" == '') ~#~# Before 6.3RC1 #set ($ckeditorPath = $services.webjars.url('application-ckeditor-webjar/1.8.5/ckeditor.js')) #set ($bootstrap3typeaheadPath = $services.webjars.url('bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js')) #elseif ($ckeditorPath.indexOf('?') >= 0) ~#~# Before 7.1M1 the WebJar resource path was included in the query string which means we have to specify the '.js' ~#~# extension (Require.js doesn't add it in this case). #set ($ckeditorPath = "${ckeditorPath}.js") #set ($bootstrap3typeaheadPath = "${bootstrap3typeaheadPath}.js") #end #set ($ckeditorBasePath = $stringtool.removeEnd($stringtool.removeEnd($ckeditorPath, '.js'), 'ckeditor')) #set ($resourcePickerBundlePath = "${ckeditorBasePath}plugins/xwiki-resource/resourcePicker.bundle.min") #set ($macroWizardBundlePath = "${ckeditorBasePath}plugins/xwiki-macro/macroWizard.bundle.min") #set ($modalPath = "${ckeditorBasePath}plugins/xwiki-dialog/modal.min") #if ($resourcePickerBundlePath.indexOf('?') >= 0) ~#~# Before 7.1M1 the WebJar resource path was included in the query string which means we have to specify the '.js' ~#~# extension (Require.js doesn't add it in this case). #set ($resourcePickerBundlePath = "${resourcePickerBundlePath}.js") #set ($macroWizardBundlePath = "${macroWizardBundlePath}.js") #set ($modalPath = "${modalPath}.js") #end */ require.config({ paths: { ckeditor: '$!ckeditorPath', resource: '$!resourcePickerBundlePath', resourcePicker: '$!resourcePickerBundlePath', entityResourcePicker: '$!resourcePickerBundlePath', entityResourceSuggester: '$!resourcePickerBundlePath', entityResourceDisplayer: '$!resourcePickerBundlePath', modal: '$!modalPath', macroWizard: '$!macroWizardBundlePath', 'bootstrap3-typeahead': '$!bootstrap3typeaheadPath', 'autosave': "$xwiki.getSkinFile('js/xwiki/editors/autosave', true)" }, shim: { ckeditor: { exports: 'CKEDITOR', ~/~/ This includes dependencies of the plugins bundled with the CKEditor code. deps: ['jquery', 'resource', 'resourcePicker', 'macroWizard'] } } }); (function() { window.CKEDITOR_BASEPATH = "$!ckeditorBasePath"; var init = function($, ckeditor, xwikiMeta) { $('.ckeditor-textarea').each(function() { var editor = ckeditor.replace(this, { allowedContent: true, ~/~/ Modify the strike and underline core styles to match what the XWiki Rendering is generating and expecting. ~/~/ See CKEDITOR-52: Unable to un-strike or un-underline saved content coreStyles_strike: { element: 'del', overrides: ['s', 'strike'] }, coreStyles_underline: { element: 'ins', overrides: 'u' }, ~/~/ Don't convert Latin characters to the corresponding named HTML entities in the HTML output because the HTML ~/~/ cleaner used on the server side doesn't recognize some of them (XCOMMONS-929). ~/~/ See CKEDITOR-38: CKEditor converts Umlaute to HTML equivalents entities_latin: false, filebrowserUploadUrl: XWiki.currentDocument.getURL('get', $.param({ sheet: 'CKEditor.FileUploader', outputSyntax: 'plain', form_token: xwikiMeta.form_token })), ~/~/ This is used in CKEditor.FileUploader so we must keep them in sync. fileTools_defaultFileName: '~_~_fileCreatedFromDataURI~_~_', fullPage: true, height: 500, linkShowAdvancedTab: (% style="background-color:#ffd700;" %)false(%%), ← (% style="color:#ff0000;" %)**trueに変更!**(%%) linkShowTargetTab: (% style="background-color:#ffd700;" %)false(%%), ← (% style="color:#ff0000;" %)**trueに変更**(%%) (% style="background-color:#ffd700;" %)~/~/ (%%)removeButtons: 'Find,Anchor', (% style="background-color:#ffd700;" %)~/~/(%%)removePlugins: 'bidi,colorbutton,font,justify,(% style="background-color:#ffd700;" %)save(%%),specialchar', (% style="background-color:#ffd700;" %)removePlugins: 'save'(%%), ← (% style="color:#ff0000;" %)**saveだけ残し、あとは消す。**(%%) toolbarGroups: [ {name: 'basicstyles', groups: ['basicstyles', 'cleanup']}, {name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi']}, {name: 'clipboard', groups: ['clipboard', 'undo']}, {name: 'editing', groups: ['find', 'selection', 'spellchecker']}, {name: 'forms'}, '/', {name: 'links'}, {name: 'insert'}, {name: 'styles'}, {name: 'colors'}, {name: 'document', groups: ['mode', 'document', 'doctools']}, {name: 'tools'}, {name: 'others'}, {name: 'about'} ], 'xwiki-resource': { dispatcher: XWiki.currentDocument.getURL('get', 'sheet=CKEditor.ResourceDispatcher&outputSyntax=plain') }, 'xwiki-save': { leaveConfirmation: true }, 'xwiki-source': { htmlConverter: XWiki.currentDocument.getURL('get', 'sheet=CKEditor.HTMLConverter&outputSyntax=plain') } }); }); }; var loadTreeCode = function(callback) { if (!require.specified('tree')) { ~/~/ Before 6.4 require.config({ paths: { jsTree: "$!services.webjars.url('jstree', 'jstree.min.js')", JobRunner: "$!services.webjars.url('org.xwiki.platform:xwiki-platform-job-webjar', 'jobRunner.min.js')", tree: "$!services.webjars.url('org.xwiki.platform:xwiki-platform-tree-webjar', 'tree.min.js')" } }); } require(['tree'], function() { callback(); }); }; require([ 'jquery', 'ckeditor', ~/~/ Used to access the form token. 'xwiki-meta', ~/~/ Used to catch form action events fired from Prototype.js code (actionButtons.js). 'xwiki-events-bridge', ~/~/ Activate the auto-save feature. 'autosave', ~/~/ Configures the path to the tree widget module and its dependencies. "$!services.webjars.url('org.xwiki.platform:xwiki-platform-tree-webjar', 'require-config.min.js', {'evaluate': true})", ~/~/ Used on the link, image and macro dialogs to select pages and attachments. 'entityResourcePicker', 'entityResourceSuggester', 'entityResourceDisplayer' ], function($, ckeditor, xwikiMeta) { ~/~/ xwiki-meta module is available only since 6.3M2 xwikiMeta = xwikiMeta || { form_token: $('meta[name="form_token"]').attr('content') }; ~/~/ Load the tree used by the page and attachment pickers. loadTreeCode(function() { init($, ckeditor, xwikiMeta); }); }); })(); ))) 1. 下記を変更 linkShowAdvancedTab: false, ← false をtrueに変更 linkShowTargetTab: false, ← false をtrueに変更 1. 下記を変更(saveのみ残し、あとは消す。) removePlugins: 'bidi,colorbutton,font,justify,save,specialchar', ↓ removePlugins: 'save', 1. 最後に、画面下の方の Save & View ボタンをクリックして、保存する。 1. 画面左上の「Xwiki」ロゴをクリックする。 1. 適当なページを選び、編集(鉛筆アイコン)をクリックして、編集ボタン群で下記を確認。 フォントカラー、背景カラー、URLリンクのターゲットが表示されることを確認。