Currently browsing category

Linux, Page 2

htaccess 對 ldap & kerberos 認證設定範例

ldap example : SSLRequireSSL AuthType Basic AuthName “internal area” AuthBasicProvider ldap AuthLDAPURL “ldaps://ldap.liho.tw ldap2.liho.tw/ou=people,dc=liho,dc=tw?uid” Require valid-user kerberos example : SSLRequireSSL AuthType Kerberos …

Moving a Subversion Repository to New Server

1. backup repository from old server # svnadmin dump /xxx/xxx/repository > repository_name.svn_dump 2. create a repository into new server svnadmin create /xxxx/xxxx/repository …

handbrake CLI convert movie to apple tv example

#/bin/bash /Applications/HandBrakeCLI -i $1 -o ${1%\.*}.m4v –preset=”AppleTV 3″ –srt-file=”${1%\.*}.eng.srt,${1%\.*}.cht.srt” –srt-lang=”eng,zho” –srt-codeset=”UTF-16LE,UTF-16LE”

使用 parted 指令建立硬碟

以往我都用互動模式 後來突發奇想想把硬碟分割放到 script 內 果然可以用外部指令達成. 酷 # parted /dev/sdc –script — mklabel gpt # parted /dev/sdc –script — mkpart primary 0% 100% …

自訂 .ssh/config 檔案

用下列檔案之後, 就可以直接 ssh xxx 機器短名 然後會帶入你要的帳號 # cat .ssh/config Host xxx Hostname xxx.liho.tw User root Host yyy Hostname yyy.liho.tw User root Host …

create linux ram disk to share via nfs

# mkdir -p /mnt/ramdisk # mkdir -p /exports/ramdisk # mount -t tmpfs -o size=32G tmpfs /mnt/ramdisk # mount –bind /mnt/ramdisk /exports/ramdisk # …