Categories
vmware

Kemaskini ESXi 5.1 menggunakan PowerShell

> Connect-VIServer -Server 10.0.0.100 -User root -Password password

> Get-VMhost | Select name, ConnectionState, Version, Build

[code lang=’plain’]Name ConnectionState Version Build
—- ————— ——- —–
10.0.0.100 Connected 5.1.0 2323236[/code]

> Set-VMhost -State Maintenance

[code lang=’plain’]Name ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz MemoryUsageGB MemoryTotalGB Version
—- ————— ———- —— ———– ———– ————- ————- ——-
10.0.0.100 Maintenance PoweredOn 4 137 9040 1.527 43.991 5.1.0

> Get-Datastore

Name FreeSpaceGB CapacityGB
—- ———– ———-
maildatastore1 328.009 1,672.750
datastore1 265.133 274.000[/code]

> New-PSDrive -name "mounteddatastore" -Root \ -PSProvider VimDatastore -Datastore (Get-Datastore datastore1)

[code lang=’plain’]Name Used (GB) Free (GB) Provider Root CurrentLocation
—- ——— ——— ——– —- —————
mounted… VimDatastore \10.0.0.100@443\ha-datacenter\da…[/code]

> Copy-Datastoreitem C:\Users\umarz\Downloads\ESXi510-201605001.zip -Destination mounteddatastore:

SSH ke ESXi dan taip

# esxcli software vib install -d /vmfs/volumes/datastore1/ESXi510-201605001.zip
# esxcli system shutdown reboot --reason patch

Categories
linux perisian

Ralat Clamd CentOS 5 LibClamAV Error: mpool_malloc()

Apabila email tidak sampai ke mailbox dan log MailScanner (maillog) terdapat ralat berikut:

Oct 23 22:32:06 email MailScanner[21705]: Virus and Content Scanning: Starting
Oct 23 22:32:06 email MailScanner[21705]: Clamd::ERROR:: COULD NOT CONNECT TO CLAMD, RECOMMEND RESTARTING DAEMON :: .
Oct 23 22:32:07 email MailScanner[21705]: Virus Scanning: Clamd found 1 infections
Oct 23 22:32:07 email MailScanner[21705]: Virus Scanning: No virus scanners worked, so message batch was abandoned and re-tried!

Kemudian cuba restart clamd, ralat berikut pula muncul

LibClamAV Error: mpool_malloc(): Attempt to allocate 8388608 bytes. Please report to http://bugs.clamav.net

Kemaskini clamav untuk selesaikan masalah ini.

yum --disablerepo=\* --enablerepo=rpmforge update clam\*

Categories
linux pemasangan perisian

Pelayan SNMP CentOS 6

Andaian:

IP = 10.0.0.10
Email support = email@domain

Pasang snmpd net-snmp

yum install -y net-snmp-utils
chkconfig snmpd on

/etc/snmp/snmpd.conf

[code lang=’plain’]rocommunity public
syslocation Rack Server IT
syscontact Domain Support
dontLogTCPWrappersConnects yes
rocommunity public default[/code]

/etc/sysconfig/snmpd.options (untuk membenarkan akses dari pelayan lain)

[code lang=’plain’]# snmpd command line options
OPTIONS=”-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -x 127.0.0.1 10.0.0.10″[/code]

Mulakan semula snmpd

service snmpd restart

Uji dengan

snmpwalk -v2c -cpublic 127.0.0.1