Xwiki8.3 install
Xwiki 8.3 インストール
0. Windowsでルーティングを設定し、402教室のサーバにルーティングする。
- 自分のIF番号を確認する。(Windowsの管理者権限コマンドラインで以下を行い、Qualcom Atherosの番号を探す。
下記の例だと、「13」がIF番号
C:\Windows\system32>route print
=====================================================================
インターフェイス一覧
13...2c d0 5a 42 e0 53 ......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
=====================================================================
- ルーティングを設定できる。
設定:下記の86の部分は、自分の使っているサーバにより、87、88に変更して設定する。
C:\>route add 192.168.1.0 mask 255.255.255.0 172.16.94.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のダウンロード
- 自分の仮想マシンにログインする。
Teratermの場合:
192.168.1.11
root
himitu
でログインする。
Linuxのsshの場合:
ssh root@192.168.1.11
パスワード:himitu - ダウンロードサイト
https://www.xwiki.org/xwiki/bin/view/Download/
8.3 を選び、下記 zip 版を、自分の仮想マシン内にダウンロードする。
ZIP Package
ファイル名:
xwiki-enterprise-jetty-hsqldb-8.3.zip - 皆でダウンロードすると時間がかかるので、
今回は、下記に置いてあります。
172.16.94.86:/tmp/Xwiki83.zip
172.16.94.87:/ tmp/Xwiki83.zip
172.16.94.88:/ tmp/Xwiki83.zip - コピー方法:各自の仮想マシンから以下を実行する。
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の解凍と配置
- 解凍する。
cd
unzip xwiki83.zip
ls
xwiki-enterprise-jetty-hsqldb-8.3 というディレクトリができる。
- 配置する。(ディレクトリのまるごと移動)
mv xwiki-enter prise-jetty-hsqldb-8.3 /var/www/xwiki83
3.ポートの変更
- 配置したディレクトリに移動
cd /var/www/xwiki83
- 下記ファイルのポートを変更
start_xwiki.sh
stop_xwiki.sh
8080→8090
8079→8091
- 変更方法
vi エディタで、:(コロン)を打って、下記コマンドで一括変更
:%s/8080/8090/g
:%s/8079/8091/g
4.起動
- 下記コマンドで起動する。
./start_xwiki.sh &
しばらく待つ。[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: 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.ブラウザでアクセス、ログイン
- Linux内のFirefoxからアクセスする場合:
http://localhost:8090/
しばらく、%表示が上がっていくので、待つと、初期画面が表示される。
- Linux外からのブラウザでアクセスする場合:
- LinuxのIPアドレスを確認
- ポート 8090, 8091を開く。
コマンド:
firewall-cmd --add-port=8090/tcp --zone=public --permanent
firewall-cmd --add-port=8091/tcp --zone=public --permanent
firewall-cmd --reload
-
- Linux外のブラウザから下記でアクセス。
http://192.168.1.11:8090/
- Linux外のブラウザから下記でアクセス。
- ログインする。
画面右上の横三本線(三)をクリックし、ログインする。
ID: Admin
初期パスワード: admin
6.一般ユーザに登録させない設定
- 画面右上三本線(三)クリックし、
Administer Wiki
を選択。
- Users&Groupsの、Rights(権限)をクリック
- Usersのラジオボタンをクリック選択する。
- Unregisterred User (未登録ユーザ)の、「Register」をクリックして
チェックを外し、×(侵入禁止マーク)にする。
- 画面左上「Xwikiロゴ」をクリックして、ホームに戻る。
7. ページの作成、編集
- 画面真ん中右寄りの「+」マークで文書作成、適宜タイトルをつける。
作成位置に注意。 /Home/Homeに作ると便利。です。
- 画面真ん中右寄りの「鉛筆マーク」で文書編集できます。
リンク
画像挿入
などやってみましょう。
8. 編集機能の追加
- URLに下記を入れる。
192.168.1.11:8090/xwiki/bin/edit/CKEditor/EditSheet?editor=object
- 下記をクリック
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: false, ← trueに変更!
linkShowTargetTab: false, ← trueに変更
// removeButtons: 'Find,Anchor',
//removePlugins: 'bidi,colorbutton,font,justify,save,specialchar',
removePlugins: 'save', ← 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);
});
});
})(); - 下記を変更
linkShowAdvancedTab: false, ← false をtrueに変更
linkShowTargetTab: false, ← false をtrueに変更
- 下記を変更(saveのみ残し、あとは消す。)
removePlugins: 'bidi,colorbutton,font,justify,save,specialchar',
↓
removePlugins: 'save',
- 最後に、画面下の方の Save & View ボタンをクリックして、保存する。
- 画面左上の「Xwiki」ロゴをクリックする。
- 適当なページを選び、編集(鉛筆アイコン)をクリックして、編集ボタン群で下記を確認。
フォントカラー、背景カラー、URLリンクのターゲットが表示されることを確認。