[Alfresco] 圖示缺少(16×16 icons for OpenOffice)

No Comments

在 data list 中, 如果有附加文件時, 文件的icon會出不來
是因為內建的圖示, 沒有16×16的尺寸, 需要另外再建

cd /opt/alfresco-community/tomcat/webapps/share/components/images/filetypes
sudo convert -resize 16×16 odg-file-32.png odg-file-16.png
sudo convert -resize 16×16 odp-file-32.png odp-file-16.png
sudo convert -resize 16×16 ods-file-32.png ods-file-16.png
sudo convert -resize 16×16 odt-file-32.png odt-file-16.png
sudo convert -resize 16×16 zip-file-32.png zip-file-16.png
sudo convert -resize 16×16 xlsx-file-32.png xlsx-file-16.png
sudo convert -resize 16×16 wmv-file-32.png wmv-file-16.png
sudo convert -resize 16×16 wma-file-32.png wma-file-16.png
sudo convert -resize 16×16 webm-file-32.png webm-file-16.png
sudo convert -resize 16×16 wav-file-32.png wav-file-16.png
sudo convert -resize 16×16 tif-file-32.png tif-file-16.png
sudo convert -resize 16×16 tiff-file-32.png tiff-file-16.png
sudo convert -resize 16×16 swf-file-32.png swf-file-16.png
sudo convert -resize 16×16 svg-file-32.png svg-file-16.png
sudo convert -resize 16×16 psd-file-32.png psd-file-16.png
sudo convert -resize 16×16 pptx-file-32.png pptx-file-16.png
sudo convert -resize 16×16 png-file-32.png png-file-16.png
sudo convert -resize 16×16 ogv-file-32.png ogv-file-16.png
sudo convert -resize 16×16 mpeg-file-32.png mpeg-file-16.png
sudo convert -resize 16×16 mp4-file-32.png mp4-file-16.png
sudo convert -resize 16×16 mp3-file-32.png mp3-file-16.png
sudo convert -resize 16×16 jpg-file-32.png jpg-file-16.png
sudo convert -resize 16×16 gif-file-32.png gif-file-16.png
sudo convert -resize 16×16 htm-file-32.png htm-file-16.png
sudo convert -resize 16×16 docx-file-32.png docx-file-16.png
sudo convert -resize 16×16 css-file-32.png css-file-16.png
sudo convert -resize 16×16 bmp-file-32.png bmp-file-16.png
sudo convert -resize 16×16 avi-file-32.png avi-file-16.png

[Alfresco] 安裝步驟

No Comments

選定並安裝作業系統
1. OS: Ubuntu or CentOS

安裝 Alfresco 本體
2. install Aflresco-CE (Community Edition)

安裝外部附加元件(Add-ons)
3. install AMPs (bePGE Project )
https://addons.alfresco.com/addons/becpg-project-manager-alfresco

修正中文語系
4. run cn2tw-bat.sh

重新執行 Alfresco, 以便套件語系資料
5. /etc/init.d/alfresco restart

[Alfresco] 簡轉繁批次檔內容

No Comments

檔名: cn2tw-bat.sh

#/bin/bash

# check i18n files
files=`sudo find ./ -name *zh_CN.properties`
for file in $files;
do
    sudo  cn2tw.sh $file;
done

# check js files
jsfiles=`sudo find ./ -name *zh_CN.js`
for file in $jsfiles;
do
    sudo  cn2tw.sh $file;
done

# modify files with bad translation
sudo /usr/bin/cn2tw-lang.sh

# check files needs to be modified
echo "-------------------------------------------"
echo "如有檔案被列出, 請修改裡面的 zh_CN 為 zh_TW"
grep zh_CN  `find ./ -name *zh_TW*`
cd /opt/alfresco-community
pwd
sed -i 's/zh_CN/zh_TW/g' ./tomcat/webapps/share/modules/editors/tinymce/langs/zh_TW.js



# restart Alfresco
#echo ""
#echo "------------------------------------------"
echo "Remember to restart Alfresco services"
#service alfresco restart

————————————————————
檔名:cn2tw.sh

#!/bin/bash

#echo "############## 處理編碼 ############"
echo "正在處理 $1"
#echo "已把 $1 轉換為 UTF-8 格式"
native2ascii -reverse "$1" "$1_utf8_cn"

#echo "轉換 $1.utf8_cn 為正體中文,並刪除 $1.utf8_cn "
cconv -f UTF8-CN -t UTF8-TW "$1_utf8_cn" -o "$1_utf8_tw"
rm "$1_utf8_cn"

#echo "轉換 $1.utf8_tw 為unicode, 並刪除 $1.utf8_tw"
native2ascii "$1_utf8_tw" "$1_uni_tw"
rm "$1_utf8_tw"


#echo "############# 處理檔名 ###########"
#echo "更改 $1_uni_tw 的檔名為 zh_TW, 並檢視檔名 "
rename -f  's/zh_CN/zh_TW/' "$1_uni_tw" > filename.txt
uni_tw_filename=`awk '{printf $4}' filename.txt`
echo "$uni_tw_filename"
#rm filename.txt

#echo "修改檔名為 zh_TW, 且無 _uni_tw "
chmod 644 $uni_tw_filename
#chmod 644 $1_uni_tw
echo "$uni_tw_filename"
rename -f 's/_uni_tw//' $uni_tw_filename
#echo "$uni_tw_filename done"
echo "$1 done"

[Graylog] PA Network rule reference

No Comments

REF: https://www.paloaltonetworks.com/documentation/61/pan-os/pan-os/reports-and-logging/syslog-field-descriptions.html

潛在威脅條件:14天內(實際只有10天索引)

action:alert, block-url, deny,
action: reset-server, reset-client, reset-both (利用TCP發送 reset 封包給主機或用戶)

PA-Network FW 偵測的類型
Type:TRAFFIC, THREAT, SYSTEM, CONFIG
在 THREAT的 Subtype:應注意 spyware,virus, flood, packet, vulnerability, wildfire-virus, scan

ThreatID: (建議查手冊, 看看有沒有區段可以設定)
Suspicious DNS Query (generic:apk.hz5l.hz155.com)(4010379)
Suspicious DNS Query (generic:rlhqw.cn)(4077880)
Suspicious DNS Query (generic:sslbaidu.jomodns.com)(4083430)
Trojan-Spy/Win32.zbot.aahsy(2556727)
Trojan-Downloader/MSWord.cryptoload.im(1210808)
Trojan-Downloader/MSWord.agent.dpfgv(1210131)
Trojan-Downloader/MSWord.cryptoload.ec(1210235)
Virus/Win32.Adwind.af(1251891)
Virus/Win32.WGeneric.jhukl(1210208)
Virus/Win32.WGeneric.jhvwt(1210379)
Virus/Win32.WGeneric.jhvsx(1210326)
Virus/Win32.WGeneric.jhvxq(1210542)
Nsanti User-Agent Traffic(10028)
FTP: login Brute-force attempt(40001)
一些關鍵字:Brute-force, Virus, User-Agent, Trojan, Suspicious, Vulnerability

Description: 可能是critical
一些關鍵字: failed

RepeatCount: Number of sessions with same Source IP, Destination IP, Application, and Subtype seen within 5 seconds; used for ICMP only
也許是…..網路擁塞

Application: 可以看用戶的軟體行為
一些關鍵字: unknown-tcp

[Alfresco] 增加 mimetype

No Comments

REF: http://docs.alfresco.com/5.1/tasks/mimetype-add.html

以新增 python 檔案為例
sudo vim /opt/alfresco-community/tomcat/shared/classes/alfresco/extension/mimetype/mimetypes-extension-map.xml

加入以下內容, 把原本的範例註解起來

並且加入以下設定


py

重啟 Alfresco 即可
或 /etc/init.d/alfresco restart

[Alfresco] 利用MMT或apply_amps增加 AMP

No Comments

http://docs.alfresco.com/community/concepts/dev-extensions-modules-management-tool.html

要看好 AMP 是針對哪個WAR進行更新, 錯了就不會出現

—-
另一種方法
把 amp 檔案, 放到相對應的路徑
ex: /opt/alfresco/amps 或 /opt/alfersco/amps_share
再執行 /opt/alfresco/bin/apply_amps.sh

— updated : 2017/07/21 —
cd /opt/alfresco-community/
java -jar ./bin/alfresco-mmt.jar list /opt/alfresco-community/tomcat/webapps/alfresco/

service alfresco stop
cd /opt/alfresco-community/
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Share /opt/alfresco-community/tomcat/webapps/share
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Share /opt/alfresco-community/tomcat/webapps/share.war
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Repository /opt/alfresco-community/tomcat/webapps/alfresco
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Repository /opt/alfresco-community/tomcat/webapps/alfresco.war
java -jar ./bin/alfresco-mmt.jar install /tmp/AAAR-Alfresco-CE-v5.1-Repository-v4.5.amp /opt/alfresco-community/tomcat/webapps/alfresco
java -jar ./bin/alfresco-mmt.jar install /tmp/AAAR-Alfresco-CE-v5.1-Repository-v4.5.amp /opt/alfresco-community/tomcat/webapps/alfresco.war
java -jar ./bin/alfresco-mmt.jar install /tmp/AAAR-Alfresco-CE-v5.1-Share-v4.5.amp /opt/alfresco-community/tomcat/webapps/share
java -jar ./bin/alfresco-mmt.jar install /tmp/AAAR-Alfresco-CE-v5.1-Share-v4.5.amp /opt/alfresco-community/tomcat/webapps/share.war
service alfresco start

— update 2017-09-19
service alfresco stop
cd /opt/alfresco-community/
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Share /opt/alfresco-community/tomcat/webapps/share
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Share /opt/alfresco-community/tomcat/webapps/share.war
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Repository /opt/alfresco-community/tomcat/webapps/alfresco
java -jar ./bin/alfresco-mmt.jar uninstall AAAR-Alfresco-CE-v5.1-Repository /opt/alfresco-community/tomcat/webapps/alfresco.war

java -jar ./bin/alfresco-mmt.jar install /opt/alfresco-community/amps/AAAR-Alfresco-CE-v5.2-Repository-v4.5.amp /opt/alfresco-community/tomcat/webapps/alfresco
java -jar ./bin/alfresco-mmt.jar install /opt/alfresco-community/amps/AAAR-Alfresco-CE-v5.2-Repository-v4.5.amp /opt/alfresco-community/tomcat/webapps/alfresco.war
java -jar ./bin/alfresco-mmt.jar install /opt/alfresco-community/amps_share/AAAR-Alfresco-CE-v5.2-Share-v4.5.amp /opt/alfresco-community/tomcat/webapps/share
java -jar ./bin/alfresco-mmt.jar install /opt/alfresco-community/amps_share/AAAR-Alfresco-CE-v5.2-Share-v4.5.amp /opt/alfresco-community/tomcat/webapps/share.war
service alfresco start

[Alfresco] 幾個建議的 Add-ons

No Comments

reset password
https://addons.alfresco.com/addons/alfresco-login-reset-password

Custom Alfresco Share header
https://addons.alfresco.com/addons/custom-alfresco-share-header

Permission Label for Share – Increase Alfresco User Engagement (要錢)
https://addons.alfresco.com/addons/permission-label-share-increase-alfresco-user-engagement

ECM Navigator (看資料夾)
https://addons.alfresco.com/addons/ecm-navigator

外部使用者存取安全
https://addons.alfresco.com/addons/sharebox-secure-external-sharing

(未確認) (要錢)
https://addons.alfresco.com/addons/formdocs-alfresco-formfactor

Alfresco Audit Analysis and Reporting (A.A.A.R.), 須另安裝Pentaho Data Integration
https://addons.alfresco.com/addons/alfresco-audit-analysis-and-reporting-aaar

OCR
https://addons.alfresco.com/addons/alfresco-simple-ocr-action

Older Entries