This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //#Использовать deployka/src | |
| #Использовать v8runner | |
| СтрокаСоединения = "/FG:\infobases\lvz_std"; | |
| Пользователь = "Пользователь"; | |
| Пароль = ""; | |
| //Конфигуратор = ЗапускПриложений.НастроитьКонфигуратор(СтрокаПодключения, Пользователь, Пароль); | |
| Конфигуратор = Новый УправлениеКонфигуратором(); | |
| Конфигуратор.УстановитьКонтекст(СтрокаСоединения, Пользователь, Пароль); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ChildItem "$env:USERPROFILE\AppData\Local\1C\1Cv8\*","$env:USERPROFILE\AppData\Roaming\1C\1Cv8\*" | Where {$_.Name -as [guid]} |Remove-Item -Force -Recurse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| del /F /Q /S "%USERPROFILE%\AppData\Local\1C\1Cv8" | |
| del /F /Q /S "%USERPROFILE%\AppData\Roaming\1C\1Cv8" | |
| del /F /Q /S "%USERPROFILE%\AppData\Local\1C\1Cv82" | |
| del /F /Q /S "%USERPROFILE%\AppData\Roaming\1C\1Cv82" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #add alias "ib1.1c.domain.local" to srv-ws1.domain.local | |
| Add-DnsServerResourceRecordCName -Name "ib1" -HostNameAlias "srv-ws1.domain.local" -ZoneName "1c.domain.local" -ComputerName "srv-dc" | |
| #sql version | |
| invoke-sqlcmd "select @@version" -ServerInstance "srv-mssql" | |
| #db list | |
| invoke-sqlcmd "select name, database_id, create_date from sys.databases" -ServerInstance "srv-mssql" | |
| Import-Module c:\scripts\update-cname.ps1 | |
| invoke-sqlcmd "select name from sys.databases where database_id > 4" -ServerInstance "srv-mssql" | ForEach-Object {Update-CNAME $_.name "srv-mssql.domain.local" "dbs.domain.local" "srv-dc"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Update-CNAME { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Position=0,HelpMessage="Alias (short name)",Mandatory=$true,ValueFromPipeline=$true)] | |
| [string] $Alias, | |
| [Parameter(Position=1,HelpMessage="CName (FQDN)",Mandatory=$true,ValueFromPipeline=$true)] | |
| [string] $Name, | |
| [Parameter(Position=2,HelpMessage="Zone of the alupdatsdfias",Mandatory=$true,ValueFromPipeline=$true)] | |
| [string] $ZoneName, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Установка клиента telnet | |
| Import-Module servermanager | |
| Add-WindowsFeature telnet-client | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Сразу после установки: | |
| apt install fail2ban sysstat atop htop iotop iftop net-tools mc ncdu zfs-auto-snapshot | |
| apt install dosfstools rsync ntfs-3g ntfs-config perf-tools-unstable | |
| ========================================= | |
| Настройка fail2ban: | |
| /etc/fail2ban/jail.local | |
| [proxmox] | |
| enabled = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sc.exe create "1C:Enterprise RAS" binpath= "C:\Program Files\1cv8\8.3.10.2466\bin\ras.exe cluster --service --port=1545 localhost:1540" displayname= "1C:Enterprise RAS" start= auto | |
| net start "1C:Enterprise RAS" | |
| #https://its.1c.ru/db/v8313doc#bookmark:cs:TI000000192 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- доставка журнала транзакций из бэкапов, сделанных с помощью https://ola.hallengren.com/ | |
| -- https://www.brentozar.com/archive/2017/03/databaserestore-open-source-database-restore-stored-procedure/ | |
| -- Кратко: ставим https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit, выполняем sp_DatabaseRestore.sql | |
| DECLARE @SourceDBName sysname = 'database' -- Имя исходной базы | |
| DECLARE @RootPath NVARCHAR(500) = '\\backup-store\backup$' -- Каталог с бэкапами. Можно указывать общий путь (как в скриптах ola), либо полный путь для базы. Примеры: '\\КаталогБэкапов' или '\\КаталогБэкапов\ИмяСервера\ИмяБазы' | |
| DECLARE @ServerName NVARCHAR(100) = 'source-sql-server-name' -- Если @RootPath указан без имени сервера и базы, то имя сервера используется для вычисления полного пути к бэкапам. Если не указан, то берется имя текущего сервера | |
| DECLARE @FullPath NVARCHAR(500) = @RootPath + '\' + @ServerName + '\' + @SourceDBName + '\FULL\' | |
| DECLARE @LogPath NVARCHAR(500) = @RootPath + '\' + @ServerName + '\' + @SourceDBName + '\L |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #http://tavalik.ru/zapusk-neskolkix-serverov-1spredpriyatiya-raznyx-versij/ | |
| #http://tavalik.ru/agent-servera-1spredpriyatiya-8-ego-parametry-zapuska/ | |
| cd 'C:\Program Files\1cv8\8.3.10.2466\bin' | |
| .\ragent.exe -rmsrvc | |
| .\ragent.exe -instsrvc -port 1540 -regport 1541 -range 1560:1591 -usr .\USR1CV8 -pwd UsrPass8 -d "C:\Program Files\1cv8\srvinfo" | |
| #Установка сервиса данным способ убивает другие имеющиеся службы сервера 1С, при необходимости создания более одной службы пользуемся утилитой sc | |
| #С помощью sc: | |
| sc create "1c-server-1640" binPath= "\"C:\Program Files (x86)\1cv8\8.3.13.1513\bin\ragent.exe\" -srvc -agent -port 1640 -regport 1641 -range 1660:1691 -d \"C:\Program Files (x86)\1cv8\srvinfo2"" start= auto displayname= "Агент сервера 1С:Предприятия 8.3 (1640)" obj= ".\USR1CV8" password= "pwd |