投稿者の投稿
jquery を1.9.1 にしたら jqueryContextMenu が動かなくなった
jquery を1.9.1 にしたら jquery ContextMenu が動かなくなった。
あ~びっくりした
JAVA でファイル名を分解するクラス
JAVA でファイル名を分解するクラス
[text]
package jp.computer-system.util.file;
public class FileString
{
private String filePath = “”;
private String drive;
private String folder;
private String fileName;
private String ext;
public FileString()
{
}
public FileString(String filePath)
{
this.filePath = filePath;
String[] strs = filePath.split(“[/,\\\\]”);
if(strs.length == 0 ) return;
int six = 0;
if(!(strs[0].indexOf(“:”)==-1))
{
six=1;
drive = strs[0];
}
folder = “”;
for(int i=six;i<(strs.length – 1);i++)
{
if(folder.length()!=0)
{
folder += "/" + strs[i];
}
else
{
folder = strs[i];
}
}
fileName = strs[strs.length -1];
int ip = fileName.lastIndexOf(".");
if(ip==-1)
{
ext = "";
}
else
{
if((ip+1)==fileName.length())
{
ext = "";
}
else
{
ext = fileName.substring(ip + 1);
}
}
}
public String getDrive() {
return drive;
}
public void setDrive(String drive) {
this.drive = drive;
}
public String getFolder() {
return folder;
}
public void setFolder(String folder) {
this.folder = folder;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getExt() {
return ext;
}
public void setExt(String ext) {
this.ext = ext;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
}
[/text]
OpenLdapにLINUXユーザーアカウントを作ったけどその他の情報もLDAPに入れておきたかったので作ったSchema
/etc/openldap/schema フォルダーに ldapusers.schema を作成した。
[text]
attributetype ( 1.1.2.1.1.500.1
NAME ‘userName’
DESC ‘jp.compsys user name UTF8’
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch <—- filter の部分文字列検索するためには必要か?!
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{200} )
attributetype ( 1.1.2.1.1.500.2
NAME 'mailAddress'
DESC 'jp.compsys email address'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.1.2.1.1.500.3
NAME 'mailAddressMobile'
DESC 'jp.compsys mobile email address'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
objectclass ( 1.1.2.1.1.100.1
NAME 'personalInfo'
DESC 'jp.compsys personal information'
SUP top AUXILIARY
MAY ( userName $ mailAddress $ mailAddressMobile ) )
[/text]
/etc/openldap/slapd.conf にldapusers.schema を追加する。修正したら slapd を再起動する。
[text]
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/ppolicy.schema
include /etc/openldap/schema/collective.schema
include /etc/openldap/schema/ldapusers.schema <—–ここ
[/text]
javaで使うときは
[text]
// objectClass(必須)
Attribute attrObjClass = new BasicAttribute(“objectClass”);
attrObjClass.add(0, “top”);
attrObjClass.add(1, “account”);
attrObjClass.add(2, “posixAccount”);
attrObjClass.add(3, “personalInfo”);
attrs.put(attrObjClass);
[/text]
intel vPro AMT を使用している場合、ESXi 5.1 でホストをシャットダウンすると wake on lan が動かない
intel vPro AMT の設定で、Desktop: ON in S0, ME Wake in S3, S4-5 にするとIdle Timeout 後にwake on lan で起動しない。
Power Saveing Managementの設定を
Desktop: ON in S0
にするとできるようになった。
これはどういうこと?
使用マザーはIntel DQ77MK
OpenLdapでメールアカウントを作る場合の dovecot の設定 mbox とmail_locationの設定
OpenLdapでメールアカウントを作る場合はhomeディレクトリを作成しない。
じゃあどこにメールを置くの?
メール自身は/var/spool/mail でよいがdovecotのmboxはどうすんの?ということで書いておきます。
まずmbox用フォルダーの作成
[text]
mkdir /var/spool/mbox
chmod 777 /var/spool/mbox
[/text]
10-mail.confの編集
[text]
mail_location = mbox:/var/spool/mbox/%u:INBOX=/var/spool/mail/%u
[/text]
これでよし!
CentOS6 OpenLDAPサーバで認証する。TLS接続しない場合
パッケージのインストールを行います。
[text]
# yum -y install openldap-servers
# yum -y install openldap-clients
[/text]
基本的なファイルを用意する。
[text]
# rm -rf /etc/openldap/slapd.d
# rm -rf /var/lib/ldap/*
# cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
[/text]
confファイルを編集する。
[text]
vi /etc/openldap/slapd.conf
[/text]
内容を修正
OPenLdapに接続するときのパスワードはとりあえず secret にする。後でかえた方がいい
[text]
suffix “dc=hogehoge,dc=com”
rootdn “cn=manager,dc=hogehoge,dc=com”
rootpw secret
[/text]
OS起動時にOpenLDAPを起動するようにする。
OpenLDAPを起動する。
[text]
# chkconfig slapd on
# /etc/init.d/slapd start
[/text]
動いているかを確認する。OKならばよい。
[text]
# ldapsearch -x -D “cn=manager,dc=hogehoge,dc=com” -w secret
[/text]
ベースとなるDNを作成するためLDIFファイルを作成する。
[text]
# cat schema.ldif
dn: dc=hogehoge,dc=com
objectClass: dcObject
objectClass: organization
dc: hogehoge
o: hogehoge
dn: ou=users,dc=hogehoge,dc=com
objectclass: organizationalUnit
ou: users
dn: ou=groups,dc=hogehoge,dc=com
objectclass: organizationalUnit
ou: groups
[/text]
LDIFファイルをLDAPサーバにインポートする。
[text]
# ldapadd -x -D “cn=manager,dc=hogehoge,dc=com” -w secret -f schema.ldif
[/text]
LINUX をTSLなしでLDAP認証にするにはsssdを削除しておく。SSSDを使いたい場合はTLSの設定が必要。
[text]
# yum -y erase sssd
[/text]
必要なパッケージを追加
[text]
# yum -y install pam_ldap nss-pam-ldapd
[/text]
authconfig-tui コマンドでLDAP認証の設定をする
[text]
最初のページで以下のように設定
LDAPを使用
LDAP認証を使用
次のページで以下のように設定する
TLSを使用にはチェックをいれない
サーバー :ldap://127.0.0.1/
ベースDN :dc=hogehoge,dc=com
[/text]
これで十分使える。
Intel DQ77MKマザーボードのマシンに VMWARE ESXi5.1を入れた後追加ドライバーを入れる
DQ77MKマザーボードのマシンに VMWARE ESXi5.1を入れる場合、追加ドライバーを入れてLANカードとADAPTEC RAID 6405Eを認識させる。
[text]
# esxcli software acceptance set –level=CommunitySupported
# esxcli software vib install -v /vmfs/volumes/localstore/net-e1000e-2.1.4.x86_64.vib
# esxcli software vib install -d /vmfs/volumes/localstore/vsphere_esxi_5.1/aacraid-esxi5.1-1.2.1.29900.zip –no-sig-check
# esxcli software vib install -v /vmfs/volumes/localstore/vsphere_esxi_5.1/vmware-esxi-drivers-scsi-aacraid-510.5.2.1.29900.-1.1.5.799733.x86_64.vib –no-sig-check
[/text]
VMWARE ESXi 5.1 で時間がずれる。っと思いきや・・・
VMWARE ESXi 5.1 で時間がずれる。
NTPを設定したのにやっぱりずれる。
中で動かしているドメインコントローラの時間もずれている。
再起動しても治らない。
何故だ 何故だ 何故だ 何故だ
解決策:
一度手作業で日付を合わせるだけでした。
どうも、勝手にNTPで合わせてくれると思い込んでいて、それではまっただけでした。
一度時間を合わせておけばその後はその時間差で合わせてくれるみたいです。
確かにVMWARE ESXiには、locale を設定するところはないのでそういうことで調整するみたいです。
VMWARE 5.1 Could not find a trusted signer
Adaptec RAID ASR-6405のドライバをインストールするとき –no-sig-check を付けないとエラーになる。
こんな感じ
[text]
[InstallationError]
(‘Adaptec_Inc_bootbank_scsi-aacraid_5.1.5.2.1.29900-1OEM.510.0.0.799733’, ‘Could not find a trusted signer.’)
[/text]
こうすればよい
[text]
# esxcli software acceptance set –level=CommunitySupported
# esxcli software vib install -d /vmfs/volumes/startup_disk/aacraid_vmware_drivers_1.2.1-29900/vsphere_esxi_5.1/aacraid-esxi5.1-1.2.1.29900.zip –no-sig-check
# esxcli software vib install -v /vmfs/volumes/startup_disk/vmware-esxi-drivers-scsi-aacraid-510.5.2.1.29900.-1.1.5.799733.x86_64.vib –no-sig-check
[/text]
VMWARE 5.0 でASRock Z77 Extreme4 にパッチを当てるとLAN(Broadcom BCM57781)もAdaptec RAID ASR-6405も認識しなくなる
ASRock Z77 Extreme4 にパッチを当てるとLAN(Broadcom BCM57781)もAdaptec RAID ASR-6405も認識しなくなる。
パッチを当てた後、さらにLAN(Broadcom BCM57781)とAdaptec RAID ASR-6405をインストールする必要がある。
パッチを当てる
[text]
# esxcli software vib install -d /vmfs/volumes/startup_disk/VMWARE_ESXi5/update-from-esxi5.0-5.0_update01.zip
# esxcli software vib install -d /vmfs/volumes/startup_disk/VMWARE_ESXi5/ESXi500-201204001.zip
# esxcli software vib install -d /vmfs/volumes/startup_disk/VMWARE_ESXi5/ESXi500-201205001.zip
# esxcli software vib install -d /vmfs/volumes/startup_disk/VMWARE_ESXi5/ESXi500-201206001.zip
# esxcli software vib install -d /vmfs/volumes/startup_disk/VMWARE_ESXi5/ESXi500-201207001.zip
# esxcli software vib install -d /vmfs/volumes/startup_disk/VMWARE_ESXi5/ESXi500-201209001.zip
[/text]
この語すぐに再起動するとひどい目にあいます。
LANもRAIDも認識されません。
Broadcom BCM57781 と Adaptec RAID ASR-6405のドライバをESXiのローカルフォルダーにコピーしておいてインストールする。
Broadcom BCM57781はtg3-3.123b.v50.1-682322.zipの中に入っているtg3-3.123b.v50.1-offline_bundle-682322.zipを使う。
[text]
# esxcli software vib install -d /vmfs/volumes/startup_disk/tg3-3.123b.v50.1-offline_bundle-682322.zip
[/text]
Adaptec RAID ASR-6405のドライバをインストールする。
[text]
# esxcli software acceptance set –level=CommunitySupported
# esxcli software vib install -d /vmfs/volumes/startup_disk/E6405E/aacraid-esxi5.0-1.1.7.28700.zip
# esxcli software vib install -v /vmfs/volumes/startup_disk/E6405E/vmware-esxi-drivers-scsi-aacraid-500.5.1.7.28700.-1.0.5.406165.x86_64.vib
[/text]