Системное администрирование


Проверка сертификата
admin_dm
https://sslanalyzer.comodoca.com
https://www.sslshopper.com/ssl-checker.html
Tags:

Очистка удалённых ящиков Exchange 2010 SP1-SP3
admin_dm

$mailboxes = Get-ExchangeServer | Where-Object {$_.IsMailboxServer –eq $true} | ForEach-Object { Get-MailboxStatistics –Server $_.Name | Where-Object {$_.DisconnectDate –notlike ‘’}} | select displayname, mailboxguid, database
$mailboxes | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }

Tags:

Zabbix показать unsupported items
admin_dm
use zabbix;
SELECT hosts.host AS hostname, items.description AS item, items.key_ AS “key” FROM items RIGHT JOIN hosts ON items.hostid=hosts.hostid WHERE items.state = 1;
Tags: ,

Очистка логов Exchange
admin_dm

Делаем VSS backup (ненастоящий)


  1. Включаем циклическое ведение логов на базе (если dag то можно не перезапускать Information Store)

  2. cmd от Администратора

  3. Diskshadow

  4. Type add volume x: x- диск на котором база

  5. begin Backup

  6. create

  7. end Backup

  8. Смотрим логи выполнения в просмотре событий

  9. Выполняем full backup базы

Tags:

Настройка proxmox в hetzner
admin_dm
После установки debian из rescue режима командой installimage ставим proxmox
Особое внимание уделить поддержке сетевой карты и raid контроллера
После установки, proxmox будет доступен по
https://111.111.111.111:8006/

Настроить сеть
iptables -A POSTROUTING -s 10.0.2.0/24 -o eth0 -j SNAT --to-source 111.111.111.111 -t nat
iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 3389 -j DNAT --to-destination 10.0.2.15 -t nat
111.111.111.111 - внешний ip
10.0.2.0/24 - внутренняя сеть vm
10.0.2.15 - vm на который нужно сделать проброс RDP
10.0.2.1 - ip бриджа proxmox, + не забыть включить маршрутизацию в sysctl.conf
Настройка сети в proxmox
cat /etc/network/interfaces
### Hetzner Online GmbH - installimage
# Loopback device:
auto lo
iface lo inet loopback
iface lo inet6 loopback
# device: eth0
auto  eth0
iface eth0 inet static
address   111.111.111.111
netmask   255.255.255.192
gateway   136.243.80.65
# default route to access subnet
up route add -net 136.243.80.64 netmask 255.255.255.192 gw 136.243.80.65 eth0
auto vmbr1
iface vmbr1 inet static
address   10.0.2.1 #Add ANY ip address of the subnet
netmask   255.255.255.0 #This is the netmask of that particular subnet
broadcast  10.0.2.255
bridge_ports none #bridge settings
bridge_stp off
bridge_fd 0
up route add -net 10.0.2.0 netmask 255.255.255.0 gw 10.0.2.1
Правила
cat /etc/network/if-up.d/00-iptables
#!/bin/sh
iptables-restore < /etc/firewall.conf
В настройках vm выбрать quemu, тип  сети brige и vmbr1, назначить ip из сети 10.0.2.0 / 24
Тип адаптера net   и scsi - virtio, заранее подмонтировать дополнительный iso c virtio-win.iso

Обновление FREEBSD
admin_dm
freebsd-update fetch
freebsd-update install
freebsd-update upgrade -r 11.0-RELEASE
freebsd-update install
shutdown -r now
freebsd-update install
shutdown -r now
freebsd-version -k
uname -mrs
Tags:

Конвертация сертификатов
admin_dm

Converting Using OpenSSL

These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software.


  • Convert a DER file (.crt .cer .der) to PEM


    openssl x509 -inform der -in certificate.cer -out certificate.pem
    


  • Convert a PEM file to DER


    openssl x509 -outform der -in certificate.pem -out certificate.der
    


  • Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM


    openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes
    
    You can add -nocerts to only output the private key or add -nokeys to only output the certificates.
    


  • Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)


    openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
    


  • Convert PEM to CRT (.CRT file)


    openssl x509 -outform der -in certificate.pem -out certificate.crt
    


OpenSSL Convert PEM


  • Convert PEM to DER


    openssl x509 -outform der -in certificate.pem -out certificate.der
    


  • Convert PEM to P7B


    openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer
    


  • Convert PEM to PFX


    openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
    


OpenSSL Convert DER


  • Convert DER to PEM


    openssl x509 -inform der -in certificate.cer -out certificate.pem
    


OpenSSL Convert P7B


  • Convert P7B to PEM


    openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
    


  • Convert P7B to PFX


    openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
    
    openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer
    


OpenSSL Convert PFX


  • Convert PFX to PEM


    openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes
    


Generate rsa keys by OpenSSL


  • Using OpenSSL on the command line you’d first need to generate a public and private key, you should password protect this file using the -passout argument, there are many different forms that this argument can take so consult the OpenSSL documentation about that.


    openssl genrsa -out private.pem 1024
    


  • This creates a key file called private.pem that uses 1024 bits. This file actually have both the private and public keys, so you should extract the public one from this file:


    openssl rsa -in private.pem -out public.pem -outform PEM -pubout
    
    or
    
    openssl rsa -in private.pem -pubout > public.pem
    
    or
    
    openssl rsa -in private.pem -pubout -out public.pem
    


    You’ll now have public.pem containing just your public key, you can freely share this with 3rd parties. You can test it all by just encrypting something yourself using your public key and then decrypting using your private key, first we need a bit of data to encrypt:


  • Example file :


    echo 'too many secrets' > file.txt
    


  • You now have some data in file.txt, lets encrypt it using OpenSSL and the public key:


    openssl rsautl -encrypt -inkey public.pem -pubin -in file.txt -out file.ssl
    


  • This creates an encrypted version of file.txt calling it file.ssl, if you look at this file it’s just binary junk, nothing very useful to anyone. Now you can unencrypt it using the private key:


    openssl rsautl -decrypt -inkey private.pem -in file.ssl -out decrypted.txt
    


  • You will now have an unencrypted file in decrypted.txt:


    cat decrypted.txt
    |output -> too many secrets
    


RSA TOOLS Options in OpenSSL


  • NAME

    rsa - RSA key processing tool


  • SYNOPSIS

    openssl rsa [-help] [-inform PEM|NET|DER] [-outform PEM|NET|DER] [-in filename] [-passin arg] [-out filename] [-passout arg] [-aes128] [-aes192] [-aes256] [-camellia128] [-camellia192] [-camellia256] [-des] [-des3] [-idea] [-text] [-noout] [-modulus] [-check] [-pubin] [-pubout] [-RSAPublicKey_in] [-RSAPublicKey_out] [-engine id]


  • DESCRIPTION

    The rsa command processes RSA keys. They can be converted between various forms and their components printed out. Note this command uses the traditional SSLeay compatible format for private key encryption: newer applications should use the more secure PKCS#8 format using the pkcs8 utility.


  • COMMAND OPTIONS


    -help
    


    Print out a usage message.


    -inform DER|NET|PEM
    


    This specifies the input format. The DER option uses an ASN1 DER encoded form compatible with the PKCS#1 RSAPrivateKey or SubjectPublicKeyInfo format. The PEM form is the default format: it consists of the DER format base64 encoded with additional header and footer lines. On input PKCS#8 format private keys are also accepted. The NET form is a format is described in the NOTES section.


    -outform DER|NET|PEM
    


    This specifies the output format, the options have the same meaning as the -inform option.


    -in filename
    


    This specifies the input filename to read a key from or standard input if this option is not specified. If the key is encrypted a pass phrase will be prompted for.


    -passin arg
    


    the input file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in openssl.


    -out filename
    


    This specifies the output filename to write a key to or standard output if this option is not specified. If any encryption options are set then a pass phrase will be prompted for. The output filename should not be the same as the input filename.


    -passout password
    


    the output file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in openssl.


    -aes128|-aes192|-aes256|-camellia128|-camellia192|-camellia256|-des|-des3|-idea
    


    These options encrypt the private key with the specified cipher before outputting it. A pass phrase is prompted for. If none of these options is specified the key is written in plain text. This means that using the rsa utility to read in an encrypted key with no encryption option can be used to remove the pass phrase from a key, or by setting the encryption options it can be use to add or change the pass phrase. These options can only be used with PEM format output files.


    -text
    


    prints out the various public or private key components in plain text in addition to the encoded version.


    -noout
    


    this option prevents output of the encoded version of the key.


    -modulus
    


    this option prints out the value of the modulus of the key.


    -check
    


    this option checks the consistency of an RSA private key.


    -pubin
    


    by default a private key is read from the input file: with this option a public key is read instead.


    -pubout
    


    by default a private key is output: with this option a public key will be output instead. This option is automatically set if the input is a public key.


    -RSAPublicKey_in, -RSAPublicKey_out
    


    like -pubin and -pubout except RSAPublicKey format is used instead.


    -engine id
    


    specifying an engine (by its unique id string) will cause rsa to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine will then be set as the default for all available algorithms.


  • NOTES

    The PEM private key format uses the header and footer lines:


    -----BEGIN RSA PRIVATE KEY-----
    
    -----END RSA PRIVATE KEY-----
    


    The PEM public key format uses the header and footer lines:


    -----BEGIN PUBLIC KEY-----
    
    -----END PUBLIC KEY-----
    


    The PEM RSAPublicKey format uses the header and footer lines:


    -----BEGIN RSA PUBLIC KEY-----
    
    -----END RSA PUBLIC KEY-----
    


    The NET form is a format compatible with older Netscape servers and Microsoft IIS .key files, this uses unsalted RC4 for its encryption. It is not very secure and so should only be used when necessary.

    Some newer version of IIS have additional data in the exported .key files. To use these with the utility, view the file with a binary editor and look for the string "private-key", then trace back to the byte sequence 0x30, 0x82 (this is an ASN1 SEQUENCE). Copy all the data from this point onwards to another file and use that as the input to the rsa utility with the -inform NET option.

    EXAMPLES

    To remove the pass phrase on an RSA private key:


     openssl rsa -in key.pem -out keyout.pem
    


    To encrypt a private key using triple DES:


     openssl rsa -in key.pem -des3 -out keyout.pem
    


    To convert a private key from PEM to DER format:


      openssl rsa -in key.pem -outform DER -out keyout.der
    


    To print out the components of a private key to standard output:


      openssl rsa -in key.pem -text -noout
    


    To just output the public part of a private key:


      openssl rsa -in key.pem -pubout -out pubkey.pem
    


    Output the public part of a private key in RSAPublicKey format:
    openssl rsa -in key.pem -RSAPublicKey_out -out pubkey.pem

    Либо онлайн:
    https://www.sslshopper.com/ssl-converter.html



Tags:

Быстрый перевод всех баз в режим совместимости SQL сервера
admin_dm
use master;
go
DECLARE UserDatabases_CTE_Cursor Cursor
FOR
select name as DatabaseName
from sys.sysdatabases
where ([dbid] > 4) and ([name] not like '$')
OPEN UserDatabases_CTE_Cursor
DECLARE @dbName varchar(100);
DECLARE @compatQuery varchar(500);
Fetch NEXT FROM UserDatabases_CTE_Cursor INTO @dbName
While (@@FETCH_STATUS <> -1)
BEGIN
set @compatQuery =  'ALTER DATABASE ' + @dbName + ' SET COMPATIBILITY_LEVEL = 110;'
print @compatQuery
EXEC (@compatQuery)
Fetch NEXT FROM UserDatabases_CTE_Cursor INTO @dbName
END
CLOSE UserDatabases_CTE_Cursor
DEALLOCATE UserDatabases_CTE_Cursor
GO
Tags:

Linux поиск больших файлов
admin_dm
find / -mount -type f -ls 2> /dev/null | sort -rnk7 | head -10 | awk '{printf "%10d MB\t%s\n",($7/1024)/1024,$NF}'

Монтаж систем отопления, вентиляция,водоснабжение, электрика, умный дом
admin_dm
Монтаж систем отопления, вентиляция,водоснабжение, электрика, умный дом, охранная, пожарная сигнализация, дом под ключ
Инженерные коммуникации, строительство домов, дач.
Сайт:
professional-rus.ru

Мониторинг производительности linux
admin_dm
Нагрузка по дискам iostat -xm 2
Память free -m
Очередь mysql ("mysqladmin pr | grep -v Sleep")
Tags:

Exchange удаление спам письма
admin_dm
Get-Mailbox –Server “имя сервера*” –ResultSize unlimited | Search-Mailbox -SearchQuery 'subject:"spammer.ru"' –DeleteContent
Tags:

mysql бэкап\рестор
admin_dm
Бэкап mysqldump -u username -p databasename > backup.sql
Рестор mysql -u root -p servicedesk < backup.sql
Tags:

Скрипт отправки отчета по схд netapp
admin_dm

touch /root/reports/$(date +%y%m%d).log
echo NETAPP8 - SAS DISK >>/root/reports/$(date +%y%m%d).log
sshpass -p Password ssh netapp8 "sysstat  -c 5 -x" >>/root/reports/$(date +%y%m%d).log
echo NETAPP7 - SATA DISK >>/root/reports/$(date +%y%m%d).log
sshpass -p Password ssh netapp7 "sysstat  -c 5 -x" >>/root/reports/$(date +%y%m%d).log


echo NETAPP01 - SATA SLOW  >>/root/reports/$(date +%y%m%d).log
sshpass -p Password ssh netapp01 "sysstat  -c 5 -x" >>/root/reports/$(date +%y%m%d).log
echo NETAPP02 - SATA SLOW  >>/root/reports/$(date +%y%m%d).log
sshpass -p Password ssh netapp02 "sysstat  -c 5 -x" >>/root/reports/$(date +%y%m%d).log

cat /root/reports/$(date +%y%m%d).log | mail -s "Netapp usage report" admin@mail.ru

Tags: ,

Резервное копирование базы ManageEngine
admin_dm
Резервное копирование базы ManageEngine:
cd C:\ManageEngine\ServiceDesk\mysql\bin
mysqldump -u root -p servicedesk --port=33366  > backup_servicedesk.sql

Для управления можно воспользоваться воспользоваться любым доступным по для mysql

Пример

SELECT * INTO sd.dbo.HolidayDefinition
FROM openquery(mysql, ‘SELECT * FROM servicedesk.HolidayDefinition’)

EXEC master.dbo.sp_addlinkedserver
@server = N’MYSQL’,
@srvproduct=N’MySQL’,
@provider=N’MSDASQL’,
@provstr=N’DRIVER={MySQL ODBC 5.1 Driver}; SERVER=127.0.0.1;;Port=33366;DATABASE=servicedesk; USER=root; PASSWORD=; OPTION=3′


--------------------------------------------------------------------------------------------------------------------------------------

insert sd.dbo.HolidayDefinition select * from sd2.dbo.HolidayDefinition

//Удаление таблицы
TRUNCATE table servicedesk.dbo.ServiceReq_301

//выбор одной строки
—select * from dbo.ServiceReq_301 where WORKORDERID = 53111
/выбор нескольких строк
—select * from dbo.ServiceReq_301 where WORKORDERID between 53088 and 53109
//очистка одной тсроки
—delete from dbo.ServiceReq_301 where WORKORDERID = 53132
//очистка нескольких строк
—delete from dbo.ServiceReq_301 where WORKORDERID between 53088 and 53109

Tags:

Интересные сайты
admin_dm
http://www.ekzorchik.ru

www.unix.ck.ua

http://blog.volobuev.su
http://msbro.ru
http://serveradmin.ru

Полное удаление Exchange из Active Directory
admin_dm

CN=Configuration,DC=DOMAIN,DC=LOCAL
CN=Services
->; DELETE
CN=Microsoft Exchange
CN=Microsoft Exchange Autodiscover

CN=Default naming context,DC=DOMAIN,DC=LOCAL
->; DELETE
CN=Microsoft Exchange Security Groups
CN=Microsoft Exchange Security Objects

Additional steps:

Hard Disk:
On the server’s hard disk you’ve to DELETE the Exchange Server installation folder.
Usually it’s C:\Program Files\Microsoft\Exchange Server

IIS:
DELETE the Exchange Back End and Front End websites with the IIS-Manager

AD Users and Computers:
DELETE the following users in the “Users” container:

DiscoverySearch Mailbox{GUID}
Exchange Online-ApplicationAccount
FederatedEmail.GUID
Migration.GUID
*SystemMailbox{GUID}
*HealthMailboxGUID

Registry:
DELETE the key “ExchangeServer” under:
HKLM\Software\Microsoft

DELETE the keys “MSExchange*” under:
HKLM\CurrentControlSet\Services

Tags:

Ошибки при свежей установке Linux (centos,asterisk,elastix)
admin_dm
При свежей установке возникают следующие проблемы:
Дистрибутив не обновлён
решается yum update
скрипты выдают ошибки:
bash: mail: command not found
решается:
yum install mailx
/usr/bin/find: /var/lib/asterisk/sounds/tts: No such file or directory
решается:
mkdir /var/lib/asterisk/sounds/tts && chown asterisk:asterisk /var/lib/asterisk/sounds/tts
fatal: cannot open file `/var/spool/hylafax/etc/xferfaxlog' for reading (No such file or directory)
решается:
touch /var/spool/hylafax/etc/xferfaxlog && chown uucp:uucp /var/spool/hylafax/etc/xferfaxlog
Установка lame
rpm -ivh https://forensics.cert.org/cert-forensics-tools-release-el7.rpm
yum  install lame

Ошибка при установке 32 битных драйверов на windows 64
admin_dm
Качаем  файл NTPrint_x86.zip
http://www.techfortechs.com/index.php?topic=25.0
http://files.xdigital.com.br/Campo%20DW/Programas/NTPrint/x86/

Under the Drivers area of Print Management, right click, Add Driver.

Click Next.

Select only x86 architecture.

Choose Have Disk.

Browse to the location of the extracted x86 driver for the printer.

Select printer from list (in this case LJ2420)

Click Next.

Windows prompts with the following:

Install Components from Windows Media

Please provide path to Windows media (x86 processor).

Type the path where the file is located and click OK.


isa server tmg blacklist
admin_dm
Для загрузки черных списков с сайтов
http://urlblacklist.com/ , squidguard.mesd.k12.or.us
можно пользоваться утилитой Microsoft ISA Blacklist Updater:
http://www.vadimrapp.com/software.htm

либо воспользоваться скриптом
https://msdn.microsoft.com/en-us/library/ff827416(v=vs.85).aspx

Для статистики можно использовать isastats
http://www.ria-media.net/products/isastats

Генерация запроса на сертификат SSL EXCHANGE (CSR)
admin_dm
New-ExchangeCertificate -GenerateRequest -SubjectName "C=RU, O=firma, cn=mail.firma.ru" -DomainNa
me mail.firma.ru, exch, autodiscover.firma.ru -PrivateKeyExportable $true
Tags:

Форум Системных Администраторов
admin_dm
Форум Системных Администраторов


Узнать версию Exchange
admin_dm
Get-ExchangeServer | Format-List Name, Edition, AdminDisplayVersion

http://eightwone.com/references/versions-builds-dates/
Tags:

Exchange 2016 не открывается OWA или ECP
admin_dm
При установке Exchange 2013 или 2016 возникает ошибка 500 ( что-то пошло не так )
Проблема кроется в отсутствии файла SharedWebConfig.config
Если в папке
C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess или
C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy нету данного файла - то его следует создать:



ECP
DependentAssemblyGenerator.exe -exchangePath “{ExchangeDirectory}\bin” -exchangePath “{Exchange Directory}\FrontEnd\HttpProxy” -configFile “{Exchange Directory}\FrontEnd\\HttpProxy\SharedWebConfig.config”

OWA
DependentAssemblyGenerator.exe -exchangePath “{ExchangeDirectory}\bin” -exchangePath “{Exchange Directory}\ClientAccess” -configFile “{Exchange Directory}\ClientAccess\SharedWebConfig.config”
после - рестартнуть IIS

iisreset /noforce

По мотивам
https://support.microsoft.com/en-us/kb/3099532
Либо открываем так:
https://servername/ecp?ExchClientVer=15
Tags:

Вышел Cumulative Update 1 for Exchange Server 2016
admin_dm

Вышло обновление

Cumulative Update 1 for Exchange Server 2016

https://support.microsoft.com/ru-ru/kb/3134844
Одна из решённых проблем
Exchange Server 2016 - service MSExchangeFrontedTransport
MSExchangeFrontEndTransport 7001 Loading of component 'Dns' failed.

Устанавливаете Exch, обновляете до CU1

Если продолжается - то как временное решение - меняете запуск этой службы вместо SYSTEM на учетную запись в домене.

Также поможет включение\отключение ipv6 в свойствах сетевого адаптера

Установка\cнятие DNS в свойствах коннектеров.

Tags:

Linux увеличение размера диска
admin_dm
linux extend size disk (Linux увеличение размера диска)
df -h
Убеждаемся что нет snapshot (иначе меню resize будет недоступно)
Выключаем машину
подключаем iso gparted http://gparted.org/livecd.php Увеличиваем размер в vmware
Увеличиваем размер в gparted
Включаем машину, выполняем команды
lvextend -L+50G /dev/your-vg/your-volume
resize2fs /dev/your-vg/your-volume
df -h
Tags: ,

Срипт шринка всех баз MS SQL
admin_dm

  • declare @db varchar(255)

    declare c cursor for

    select name from sys.databases where is_read_only=0 and state=0

    and name not in ('master','model','tempdb','msdb')

    open c

    fetch c into @db

    while @@fetch_status=0

    begin

    exec SP_dboption @db,'trunc. log on chkpt.','true'

    DBCC shrinkdatabase (@db)

    fetch next from c into @db

    end

    close c

    deallocate c



Очистка всех подключенных сетевых принтеров vbs
admin_dm
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * From Win32_Printer Where Network = True")
For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
Либо командами

rundll32 printui.dll, PrintUIEntry /dn /q /n \\SERVER\PRINTER
/dd с удалением драйверов

rundll32 printui.dll, PrintUIEntry /dd /dn /q /n \\SERVER\PRINTER


Батник, определяющий битность OS (64 32)
admin_dm
@echo off
Set RegQry=HKLMHardwareDescriptionSystemCentralProcessor
reg query “HKEY_LOCAL_MACHINEHardwareDescriptionSystemCentralProcessor” | find “x86” >nul
If %ERRORLEVEL% == 0 (
RUN setup32.exe
) ELSE (
RUN setup64.exe
)
Tags: ,

Логгирование блокированнного трафика IPTABLES
admin_dm
iptables -N LOGGING
iptables -A INPUT -j LOGGING
iptables -A OUTPUT -j LOGGING
iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "Dropped firewall: " --log-level 7
iptables -A LOGGING -j DROP

Обновление esxi ( update esxi from internet )
admin_dm
esxcli network firewall ruleset set -e true -r httpClient
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5.0-201510
Покажет ESXi-5.5.0-20151004001-standard
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20151004001-standard
reboot
Tags: ,

Узнать внешний ip linux ( how to find out your external ip)
admin_dm
wget -O - -q icanhazip.com
links ip.yandex.ru
wget -O - -q myip.ru
Tags:

esxi настройка ilo
admin_dm

esxcli software vib list | grep hp
cd /var/log/vmware/
wget http://vibsdepot.hp.com/hpq/sep.16.2015/esxi-550-bundles/
hp-esxi5.5uX-bundle-2.3-17.zip
wget http://vibsdepot.hp.com/hpq/sep.16.2015/esxi-550-bundles/
hp-nmi-esxi5.5-bundle-2.3.5.zip
wget http://vibsdepot.hp.com/hpq/sep.16.2015/esxi-550-bundles/
hp-HPUtil-esxi5.5-bundle-2.3-10.zip
esxcli software vib install -d hp-esxi5.5uX-bundle-2.3-17.zip
esxcli software vib install -d hp-nmi-esxi5.5-bundle-2.3.5.zip
esxcli software vib install -d hp-HPUtil-esxi5.5-bundle-2.3-10.zip

reboot esxi esx

Tags: , ,

ShellExecute Failed (2) Error Notepad ++ Проблем с Notepad++
admin_dm



Столкнулся с проблемой при использовании Notepad ++
Приустаноке Notepad++ просит запустить инсталлятор от имени адинисратора.
После чего устанавливается, однако при открытии с помощь контексного меню файлов ( Open with Notepad++ ) возниает ошибка
ShellExecute failed (2): Is this command correct?

Помогло седующее
Отрываем свойства файла notepad++.exe   в папке C:\Program Files (x86)\Notepad++ и снимаем галочку Выполнять эту программу от администратора.



 

Tags:

сетевые настройки linux
admin_dm
отображение сетевых настроек linux одной срокой
cat /etc/resolv.conf | grep -i nameserver ; ifconfig && route -n 

Tags:

Вирус .vault
admin_dm
Вирус шифровальщик перименовал файлы, изменив расширения со стандатных на файлы вида file.jpg.vault
Написал батник для исправления:

forfiles /S /M *.*.vault /C "cmd /c rename @file @fname"

Установка zabbix агента Centos
admin_dm
Если стоял старый агент - можем удалить
yum remove zabbix-agent
yum clean all
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm
(для Centos 7 rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm)
yum install zabbix-agent
nano /etc/zabbix/zabbix_agentd.conf
service zabbix-agent restart
chkconfig zabbix-agent on
tail /var/log/zabbix/zabbix_agentd.log

vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
service iptables restart

Tags:

Не работает сайт после перенос Bitrix
admin_dm


После переноса возникла проблема с сайтом на bitrix
1. сам bitrix старый, поддерживает только php 5.2., поэтому ставим со всеми расширениями его
2. устанавливаем zend
cd /tmp

wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
 cp ZendOptimizer-3.3.9-linux-glibc23-х86_64/data/5_2_x_comp/ZendOptimizer.so /usr/lib64/php/modules
редактируем
/etc/php.ini
[Zend]
zend_extension=/usr/lib64/php/modules/ZendOptimizer.so
service httpd restart



старый php 5.2 на новом centos
admin_dm
Удаляем новый php:
yum remove php*


./configure --prefix=/opt/php52 --with-apxs2=/usr/sbin/apxs --enable-force-cgi-redirect --disable-debug --enable-libxml --enable-reflection --enable-spl --enable-zend-multibyte --with-regex=system --with-tidy --enable-zip --enable-bcmath --enable-calendar --with-curl=shared --enable-dba --enable-exif --enable-ftp --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-gettext=shared --enable-mbstring --with-mcrypt=/usr/include --with-mhash=shared --with-mysql --with-libdir=lib64 --with-mysqli --with-openssl --with-pdo-mysql --enable-sockets --with-xsl --with-zlib --enable-pcntl --enable-soap --with-iconv --enable-exif --enable-ftp --with-curl --with-ttf --enable-xml --with-freetype-dir=/usr --with-gettext --with-gmp --with-pic --with-t1lib=/usr
make
make clean
make install

Либо из RPM
http://rpms.southbridge.ru/rhel6/php-5.2/x86_64/
yum install php php-cli php-common php-pdo php-gd php-mcrypt php-fpm php-mysql php-devel php-mbstring php-pecl php-xml
Tags: , ,

Одно или несколько правил не удалось загрузить на сервер Exchange
admin_dm
При попытке создать новое правило в oulook
Одно или несколько правил не удалось загрузить на сервер Exchange и они были отключены. Возможно, некоторые параметры не поддерживаются, или не хватает места для хранения всех ваших правил.

Get-Mailbox user@firma.ru | FL rulesquota
Set-Mailbox user@firma.ru -RulesQuota:256kb

Информация на офциальном сайте в статье
Отключаются некоторые правила, а сообщение об ошибке при попытке создать или включить правила в Outlook




https://support.microsoft.com/en-us/kb/886616/ru

?

Log in