Configuring Host Header Mode Windows SharePoint Services by Using Scripts
Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
After installing Windows SharePoint Services and language packs,the Internet Platform and Operations group ran the following script(Script 1) on the first front-end Web server to do thefollowing:
Create an IIS 6 Application Pool for Windows SharePointServices Administration Virtual Server, configure its ID toSTSBeta\STSAdminAcct, and change the port number to 8080
Create a Windows SharePoint Services configuration database,and specify running Windows SharePoint Services in host-header andActive Directory account creation mode
Create an IIS 6 Application Pool for Windows SharePointServices site virtual server and configure its ID toSTSBeta\STSAcct
Extend the Windows SharePoint Services virtual server andcreate a new content database
Notes:
If you want to customize this script for your needs, you needto change the settings in red text to fit your configuration. Forexample, you should change the STSAcct password from"Password" to another, more secure password.
When you copy and paste the script into a text editor such asMicrosoft Notepad, be careful to save it as an ANSI text file, andthen change the file extension to .bat.
Refer to the Windows SharePoint Services Administrator'sGuide and Stsadm.exe help for the details of the commandsoperations used in this script.
Script 1. Configure First Windows SharePoint Services WebServer.bat
Set _Active DirectoryMINSITEPORT=8080Set _Active DirectoryDOMAIN=STSBetaSet _Active DirectoryOU="Sharepoint Users"Set _STSActive DirectoryMINAPPPOOLNAME=Windows SharePoint ServicesAdminAppPoolSet _STSActive DirectoryMINAPPPOOLUSERNAME=STSBeta\STSAdminAcctSet _STSActive DirectoryMINAPPPOOLUSERPWD=PasswordSet _STSAPPPOOLNAME=Windows SharePoint ServicesAppPoolSet _STSAPPPOOLUSERNAME=STSBeta\STSAcctSet _STSAPPPOOLUSERPWD=PasswordSet _SQLSERVER=SQL101Set _CONFIGDBNAME=Windows SharePoint Services_Config_DBSet _CONTENTDBNAME=Windows SharePoint Services_Content_DBSet _SITENAME=DefaultSet _OUTSMTPSERVER=SMTP101Set _FROMActive DirectoryDRESS=stsbeta@microsoft.comSet _FROMActive DirectoryDRESS=stsbeta@microsoft.comSet _EMAILENCODING=UTF-8Set _CODEPAGE=65001Set _VirtualServerName= Default Web Sitec:cd "\pro*\com*\mi* s*\we* se*\60\bin"REM CREATING THE Active DirectoryMIN APP POOL AND CONFIGURING STS Active DirectoryMIN SITEstsadm -o setadminport -port %_Active DirectoryMINSITEPORT% -admapcreatenew -admapidname %_STSActive DirectoryMINAPPPOOLNAME% -admapidtype configurableid -admapidlogin %_STSActive DirectoryMINAPPPOOLUSERNAME% -admapidpwd %_STSActive DirectoryMINAPPPOOLUSERPWD%IISResetREM CREATING THE CONFIG DB - WITH Active Directory and SCALABLE MODE ONstsadm -o setconfigdb -ds %_SQLSERVER% -dn %_CONFIGDBNAME% -hh -adcreation -addomain %_Active DirectoryDOMAIN% -adou %_Active DirectoryOU%REM CONFIGURING STS MAIL SETTINGSstsadm -o email -outsmtpserver %_OUTSMTPSERVER% -fromaddress %_FROMActive DirectoryDRESS% -replytoaddress %_REPLYTOActive DirectoryDRESS% -codepage %_CODEPAGE%REM EXTENDING VIRTUAL SERVERstsadm -o extendvs -url https://%_SITENAME%.stsbeta.iponet.net -ownerlogin %_Active DirectoryDOMAIN%\%_SITENAME% -owneremail default@microsoft.com -ownername %_SITENAME% -apcreatenew -apidname %_STSAPPPOOLNAME% -apidtype configurableid -apidlogin %_STSAPPPOOLUSERNAME% -apidpwd %_STSAPPPOOLUSERPWD% -databaseserver %_SQLSERVER% -databasename %_CONTENTDBNAME%IISReset
The server farm described in this paper includes multiplefront-end Web servers. The configuration on the remaining front-endWeb servers is different, because the servers need to connect tothe existing configuration and content databases instead ofcreating new ones. If your deployment has only one front-end Webserver, you can skip to the next section.
The second script (Script 2) does the following:
Creates an IIS 6.0 Application Pool for Windows SharePointServices administration virtual server, configures its ID toSTSBeta\STSAdminAcct, and changes the port number to 8080
Connects to an existing Windows SharePoint Servicesconfiguration database
Creates an IIS 6.0 Application Pool for Windows SharePointServices site virtual server and configures its ID toSTSBeta\STSAcct
Extends the Windows SharePoint Services virtual server and mapsto an existing content database
Script 2. Configure Other Windows SharePoint Services WebServers.bat
Set _Active DirectoryMINSITEPORT=8080Set _Active DirectoryDOMAIN=STSBetaSet _Active DirectoryOU="Sharepoint Users"Set _STSActive DirectoryMINAPPPOOLNAME=Windows SharePoint ServicesAdminAppPoolSet _STSActive DirectoryMINAPPPOOLUSERNAME=STSBeta\STSAdminAcctSet _STSActive DirectoryMINAPPPOOLUSERPWD=PasswordSet _STSAPPPOOLNAME=Windows SharePoint ServicesAppPoolSet _STSAPPPOOLUSERNAME=STSBeta\STSAcctSet _STSAPPPOOLUSERPWD=PasswordSet _SQLSERVER=SQL101Set _CONFIGDBNAME=Windows SharePoint Services_Config_DBSet _CONTENTDBNAME=Windows SharePoint Services_Content_DBSet _SITENAME=DefaultSet _OUTSMTPSERVER=SMTP101Set _FROMActive DirectoryDRESS=stsbeta@microsoft.comSet _FROMActive DirectoryDRESS=stsbeta@microsoft.comSet _EMAILENCODING=UTF-8Set _CODEPAGE=65001Set _VirtualServerName= Default Web Sitec:cd "\pro*\com*\mi* s*\we* se*\60\bin"REM CREATING THE Active DirectoryMIN APP POOL AND CONFIGURING STS Active DirectoryMIN SITEstsadm -o setadminport -port %_Active DirectoryMINSITEPORT% -admapcreatenew -admapidname %_STSActive DirectoryMINAPPPOOLNAME% -admapidtype configurableid -admapidlogin %_STSActive DirectoryMINAPPPOOLUSERNAME% -admapidpwd %_STSActive DirectoryMINAPPPOOLUSERPWD%REM USING AN EXISTING CONFIG DBstsadm -o setconfigdb -connect -databaseserver %_SQLSERVER% -databasename %_CONFIGDBNAME%IISResetREM EXTENDING VIRTUAL SERVERstsadm -o extendvsinwebfarm -url https://%_SITENAME%.stsbeta.iponet.net -vsname %VirtualServerName% -apcreatenew -apidname %_STSAPPPOOLNAME% -apidtype configurableid -apidlogin %_Active DirectoryDOMAIN%\%_STSAPPPOOLUSERNAME% -apidpwd %_STSAPPPOOLUSERPWD%IISReset