検索
リンク
タグ
ASP.NET
.NET
ASP.NET MVC
F#
Visual Studio
Azure
ASP.NET Core
ライトニングトーク
Plone
Selenium
AJAX
C#
jQuery
SQL Server
ADO.NET Entity Framework
JavaScript
WebMatrix
EFCore
LINQ
Fizz-Buzz
カテゴリ
最新の記事
最新のコメント
記事ランキング
最新のトラックバック
以前の記事
2024年 03月 2024年 02月 2024年 01月 2023年 12月 2023年 11月 2023年 10月 2023年 09月 2023年 08月 2023年 07月 2023年 06月 2023年 05月 2023年 04月 2023年 03月 2023年 02月 2023年 01月 2022年 12月 2022年 11月 2022年 10月 2022年 09月 2022年 08月 2022年 07月 2022年 06月 2022年 05月 2022年 04月 2022年 03月 2022年 02月 2022年 01月 2021年 12月 2021年 11月 2021年 10月 2021年 09月 2021年 08月 2021年 07月 2021年 06月 2021年 05月 2021年 04月 2021年 03月 2021年 02月 2021年 01月 2020年 12月 2020年 11月 2020年 10月 2020年 09月 2020年 08月 2020年 07月 2020年 06月 2020年 05月 2020年 04月 2020年 03月 2020年 02月 2020年 01月 2019年 12月 2019年 11月 2019年 10月 2019年 09月 2019年 08月 2019年 07月 2019年 06月 2019年 05月 2019年 04月 2019年 03月 2019年 02月 2019年 01月 2018年 12月 2018年 11月 2018年 10月 2018年 09月 2018年 08月 2018年 07月 2018年 06月 2018年 05月 2018年 04月 2018年 03月 2018年 02月 2018年 01月 2017年 12月 2017年 11月 2017年 10月 2017年 09月 2017年 08月 2017年 07月 2017年 06月 2017年 05月 2017年 04月 2017年 02月 2017年 01月 2016年 12月 2016年 11月 2016年 10月 2016年 09月 2016年 08月 2016年 07月 2016年 06月 2016年 05月 2016年 04月 2016年 03月 2016年 02月 2016年 01月 2015年 12月 2015年 11月 2015年 10月 2015年 09月 2015年 08月 2015年 07月 2015年 05月 2015年 04月 2015年 03月 2015年 02月 2015年 01月 2014年 12月 2014年 11月 2014年 10月 2014年 09月 2014年 08月 2014年 06月 2014年 04月 2014年 03月 2014年 02月 2014年 01月 2013年 12月 2013年 10月 2013年 09月 2013年 08月 2013年 07月 2013年 06月 2013年 05月 2013年 04月 2013年 03月 2013年 02月 2013年 01月 2012年 12月 2012年 11月 2012年 10月 2012年 09月 2012年 08月 2012年 07月 2012年 06月 2012年 05月 2012年 04月 2012年 03月 2012年 02月 2012年 01月 2011年 12月 2011年 11月 2011年 10月 2011年 09月 2011年 08月 2011年 07月 2011年 06月 2011年 05月 2011年 04月 2011年 03月 2011年 02月 2011年 01月 2010年 12月 2010年 11月 2010年 10月 2010年 09月 2010年 08月 2010年 07月 2010年 06月 2010年 05月 2010年 04月 2010年 03月 2010年 02月 2010年 01月 2009年 12月 2009年 10月 2009年 09月 2009年 07月 2009年 06月 2009年 05月 2009年 04月 2009年 03月 2009年 02月 2009年 01月 2008年 12月 2008年 11月 2008年 10月 2008年 09月 2008年 08月 2008年 07月 2008年 06月 2008年 05月 2008年 04月 2008年 03月 2008年 02月 2008年 01月 2007年 12月 2007年 11月 2007年 04月 2007年 03月 2007年 02月 2007年 01月 2006年 11月 2006年 10月 2006年 09月 2006年 08月 2006年 07月 |
2014年 01月 31日
Windows Server 2012 R2 Standard Edition を
GUI なしの Core インストール し、OS のインストール処理が完了した以降、
(GUI & 対話なしで) コマンドだけで行なう コマンドプロンプトの内容をメモ。 なお、先に謝っておくが、1箇所だけはGUI使う必要があった。 > @rem コンピュータ名の変更 > netdom renamecomputer %computername% /newname:{新しいコンピュータ名} > @rem 再起動 > shutdown -t 0 -r > @rem Active Directory ドメインへの参加 > netdom join %computername% /domain:{ドメイン名} /userd:{ドメイン管理者のユーザー名} /passwordd:{ドメイン管理者のパスワード} > @rem 再起動 > shutdown -t 0 -r > @rem ファイヤーウォールをリモートデスクトップ接続が通過できるように許可 > netsh advfirewall firewall set rule group="remote desktop" new enable=yes > @rem ※英語OSの場合。日本語OSの場合は group="リモート デスクトップ" とする。 > @rem リモートデスクトップ接続を有効化 > cscript C:\Windows\System32\Scregedit.wsf /ar 0 > @rem タイムゾーンの変更 > control datetime.cpl > @rem ※コントロールパネルの日付と時刻アプレットGUIが現れるので、その GUI で設定。 > @rem SQL Server 2012 Express x64 EN のインストール > @rem ※\\server\shareにインストーラを置いてある前提。 > @rem ※インスタンス名は "SQLEXPRESS" を指定。 > @rem ※外部からの接続を許可。 > \\server\share\SQLEXPR_x64_EN.exe /qs /ACTION=Install /FEATURES=SQLEngine,Conn /SQLSYSADMINACCOUNTS="{管理者としたいドメインユーザまたはグループ名}" /TCPENABLED=1 /IACCEPTSQLSERVERLICENSETERMS /INSTANCENAME=SQLEXPRESS > @rem iis8 のインストール、リモート管理の有効化、ASP.NET 4 の有効化 > @rem ※ネットで検索しながらやったので PowerShell 経由と dism コマンド経由とが混在してしまったがどちらかいっぽうで実施できるはず。 > @rem ※iis本体のインストール。 > powershell PS> Install-WindowsFeature web-server PS> Install-WindowsFeature web-mgmt-service > @rem ※iisのリモート管理を許可する。 PS> Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1 PS> exit > net stop wmsvc > net start wmsvc > @rem ※さらに ASP.NET を載せる。 > dism /online /enable-feature /all /featurename:IIS-ISAPIFilter > dism /online /enable-feature /all /featurename:IIS-ISAPIExtensions > dism /online /enable-feature /all /featurename:IIS-NetFxExtensibility > dism /online /enable-feature /all /featurename:IIS-ASPNET > dism /online /enable-feature /all /featurename:IIS-NetFxExtensibility45 > dism /online /enable-feature /all /featurename:IIS-ASPNET45 > @rem ※ クライアントPC 側は、Web Platform Installer 経由で「リモート管理用 IIS マネージャ v1.1」をインストールすることでリモート管理が可能。 > @rem ※ サービス Web Management Service はスタートアップ種別が手動なので、自動(遅延開始) に「コンピュータの管理」GUIでリモート接続して設定変更しておく。GUI使わずに scs コマンドで設定できたはず。 > @rem サインアウト > shutdown -l 以上で、バックエンドに SQL Server によるデータベースを使用した ASP.NET による Web アプリケーションを稼働できる、リモート管理可能な Windows Server 2012 R2 サーバーができあがる。 サービスのスタートアップ指定は、ついうっかり、クライアント側のリモート管理コンソール GUI から設定してしまったが、こちらは本当は sc コマンドで設定できるはずだ。 ただ、本稿では "実録" にこだわったので、あえてそのまま載せた。 それ以外で GUI を使ったのはタイムゾーン指定だけ。 あとはすべてコマンドプロンプトからのコマンド実行、対話なしで実施できてしまう。 各コマンドについて説明はしないが、これが実際に1台のWebアプリサーバーをセットアップした一連のコマンドの 本物の実録 である。 ちなみに、この手順でのサーバーOS構築を、Hyper-V Server 2012 上の仮想マシンで実施してみたところ、その仮想マシンの 仮想ディスク (.vhdx) のサイズは、たったの 8GB少々 であった。 この程度のサイズだと、ライブマイグレーションも迅速にできて、きわめて快適にハードウェア構成の変更・入れ替えができる。 以上、なにかの参考になれば幸いである。
by developer-adjust
| 2014-01-31 22:01
| その他IT系
|
Comments(0)
|
ファン申請 |
||