Active Directory
このセクションでは、 Active Directory およびドメイン・ネーム・サーバー (ADDNS) サーバーを作成するために必要なビルド・タスクについて順を追って説明します。
仮想サーバーの注文
以下の仕様の仮想サーバーは、ADDNS サーバー・ホストに適しており、 UI を使用した仮想サーバー・インスタンスの作成の手順を使用して注文できます。
- プロファイル: bx2-2x8
- タイプ: Public
- OS: WIndows 2019
- NIC 数量: 1
- データ・ボリューム: なし
サーバーへの接続
仮想サーバーをデプロイした後、リモートでサーバーにアクセスできるように浮動 IP アドレスを接続する必要があります。 浮動 IP アドレスの追加を参照してください。
Windows 管理者のパスワードにアクセスするには、 Windows インスタンスへの接続 を参照してください。ただし、要約すると、ラップトップから以下のコマンドが使用されます。ここで、instances コマンドは仮想サーバーの < INSTANCE_ID> を返します。
ibmcloud is instances
ibmcloud is instance-initialization-values <INSTANCE_ID> --private-key @~/.ssh/id_rsa
ドメインの作成
ドメインを作成するには、以下のコマンドを使用します。
Install-WindowsFeature
コマンドを使用して、AD 機能をサーバーにインストールします。- AD フォレストを構成します。
WinThreshold
値は、< Domain_Name> というドメイン名を使用して Windows Server 2016 フォレストを構成します。例えば、sqlserver.test および < NB_Domain> (sqlserver など)。 ご使用の標準に準拠した < Safe_Mode_Admin_Password> のパスワードを作成します。 サーバーが再始動し、DNS が構成されます。これには、DNS リゾルバーを161.26.0.10
および161.26.0.11
に設定することも含まれます (仮想サーバーのネットワーク・インターフェースがこれらの DNS サーバーで既に構成されているため)。
$domainfull = "<Domain_Name>"
$domainnb = "<NB_Domain>"
$smpassword = "<Safe_Mode_Admin_Password>"
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath “C:\Windows\NTDS” -DomainMode “WinThreshold” -DomainName $domainfull -DomainNetbiosName $domainnb -ForestMode “WinThreshold” -InstallDns:$true -LogPath “C:\Windows\NTDS” -NoRebootOnCompletion:$false -SysvolPath “C:\Windows\SYSVOL” -SafeModeAdministratorPassword (ConvertTo-SecureString $smpassword -AsPlainText -Force)-Force:$true
グループおよびユーザーの作成
以下の Powershell コマンドは、 SQL Admins
という新規 AD グループを作成し、 <Password>
というパスワードを持つ新規ユーザー sqluser1
を SQL Admins
グループに追加します。 suffix
は、ドメイン・ネームの接尾部です (例: com
または local
)。
$password = "<Password>"
$domainnb = "<NB_Domain>"
$dnssuffix = "<suffix>"
$path = "CN=Users,DC=" + $domainnb + ",DC=" + $dnssuffix
New-ADGroup -Name "SQL Admins" -SamAccountName SQLAdmins -GroupCategory Security -GroupScope Global -DisplayName "SQL Administrators" -Path $path -Description "Members of this group are SQL Administrators"
$secpassword = ConvertTo-SecureString $password -AsPlainText -Force
New-ADUser -Name "sqluser1" -AccountPassword $secpassword -Enabled $true
Add-ADGroupMember -Identity SQLAdmins -Members sqluser1
以下の Powershell コマンドは、 SQL Service
という新規 AD グループを作成し、 <Password>
というパスワードを持つ新規ユーザー sqlsvc
を SQL Service
グループに追加します。 suffix
は、ドメイン・ネームの接尾部です (例: com
または local
)。
$password = "<Password>"
$domainnb = "<NB_Domain>"
$dnssuffix = "<suffix>"
$path = "CN=Users,DC=" + $domainnb + ",DC=" + $dnssuffix
New-ADGroup -Name "SQL Service" -SamAccountName SQLService -GroupCategory Security -GroupScope Global -DisplayName "SQL Service" -Path $path -Description "Members of this group are services accounts for SQL"
$secpassword = ConvertTo-SecureString $password -AsPlainText -Force
New-ADUser -Name "sqlsvc" -AccountPassword $secpassword -Enabled $true
Add-ADGroupMember -Identity SQLService -Members sqlsvc
代替サービス・アカウントを使用する場合は、 管理対象サービス・アカウント、グループ管理対象サービス・アカウント、および仮想アカウントを参照してください。
NTP サーバーの構成
IBM Cloud NTP サーバーから時刻を自動的に同期するには、以下のコマンドを実行します。
w32tm /config /manualpeerlist:"161.26.0.6" /syncfromflags:MANUAL /update
net stop w32time
net start w32time
w32tm /query /status