Share via


Configuring Host Header Mode Windows SharePoint Services 2.0 by Using Scripts

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 the following:

  • Create an IIS 6 Application Pool for Windows SharePoint Services Administration Virtual Server, configure its ID to STSBeta\STSAdminAcct, and change the port number to 8080

  • Create a Windows SharePoint Services configuration database, and specify running Windows SharePoint Services in host-header and Active Directory account creation mode

  • Create an IIS 6 Application Pool for Windows SharePoint Services site virtual server and configure its ID to STSBeta\STSAcct

  • Extend the Windows SharePoint Services virtual server and create a new content database

    Note

    If you want to customize this script for your needs, you need to change the settings in red text to fit your configuration. For example, you should change the STSAcct password from "Password" to another, more secure password.

    Note

    When you copy and paste the script into a text editor such as Microsoft Notepad, be careful to save it as an ANSI text file, and then change the file extension to .bat.

    Note

    Refer to the Windows SharePoint Services Administrator's Guide and Stsadm.exe Help for the details of the commands operations used in this script.

Script 1. Configure First Windows SharePoint Services Web Server.bat

Set _Active DirectoryMINSITEPORT=8080
Set _Active DirectoryDOMAIN=STSBeta
Set _Active DirectoryOU="Sharepoint Users"
Set _STSActive DirectoryMINAPPPOOLNAME=Windows SharePoint ServicesAdminAppPool
Set _STSActive DirectoryMINAPPPOOLUSERNAME=STSBeta\STSAdminAcct
Set _STSActive DirectoryMINAPPPOOLUSERPWD=Password
Set _STSAPPPOOLNAME=Windows SharePoint ServicesAppPool
Set _STSAPPPOOLUSERNAME=STSBeta\STSAcct
Set _STSAPPPOOLUSERPWD=Password
Set _SQLSERVER=SQL101
Set _CONFIGDBNAME=Windows SharePoint Services_Config_DB
Set _CONTENTDBNAME=Windows SharePoint Services_Content_DB
Set _SITENAME=Default
Set _OUTSMTPSERVER=SMTP101
Set _FROMActive DirectoryDRESS=stsbeta@microsoft.com
Set _FROMActive DirectoryDRESS=stsbeta@microsoft.com
Set _EMAILENCODING=UTF-8
Set _CODEPAGE=65001 
Set _VirtualServerName= Default Web Site 
c:
cd "\pro*\com*\mi* s*\we* se*\60\bin"

REM CREATING THE Active DirectoryMIN APP POOL AND CONFIGURING STS Active DirectoryMIN SITE
stsadm -o setadminport -port %_Active DirectoryMINSITEPORT% -admapcreatenew -admapidname %_STSActive DirectoryMINAPPPOOLNAME% -admapidtype configurableid -admapidlogin %_STSActive DirectoryMINAPPPOOLUSERNAME% -admapidpwd %_STSActive DirectoryMINAPPPOOLUSERPWD%

IISReset

REM CREATING THE CONFIG DB - WITH Active Directory and SCALABLE MODE ON

stsadm -o setconfigdb -ds %_SQLSERVER% -dn %_CONFIGDBNAME% -hh -adcreation -addomain %_Active DirectoryDOMAIN% -adou %_Active DirectoryOU%

REM CONFIGURING STS MAIL SETTINGS

stsadm -o email -outsmtpserver %_OUTSMTPSERVER% -fromaddress %_FROMActive DirectoryDRESS% -replytoaddress %_REPLYTOActive DirectoryDRESS% -codepage %_CODEPAGE%

REM EXTENDING VIRTUAL SERVER
stsadm -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 multiple front-end Web servers. The configuration on the remaining front-end Web servers is different, because the servers need to connect to the existing configuration and content databases instead of creating new ones. If your deployment has only one front-end Web server, you can skip to the next section.

The second script (Script 2) does the following:

  • Creates an IIS 6.0 Application Pool for Windows SharePoint Services administration virtual server, configures its ID to STSBeta\STSAdminAcct, and changes the port number to 8080

  • Connects to an existing Windows SharePoint Services configuration database

  • Creates an IIS 6.0 Application Pool for Windows SharePoint Services site virtual server and configures its ID to STSBeta\STSAcct

  • Extends the Windows SharePoint Services virtual server and maps to an existing content database

Script 2. Configure Other Windows SharePoint Services Web Servers.bat

Set _Active DirectoryMINSITEPORT=8080
Set _Active DirectoryDOMAIN=STSBeta
Set _Active DirectoryOU="Sharepoint Users"
Set _STSActive DirectoryMINAPPPOOLNAME=Windows SharePoint ServicesAdminAppPool
Set _STSActive DirectoryMINAPPPOOLUSERNAME=STSBeta\STSAdminAcct
Set _STSActive DirectoryMINAPPPOOLUSERPWD=Password
Set _STSAPPPOOLNAME=Windows SharePoint ServicesAppPool
Set _STSAPPPOOLUSERNAME=STSBeta\STSAcct
Set _STSAPPPOOLUSERPWD=Password
Set _SQLSERVER=SQL101
Set _CONFIGDBNAME=Windows SharePoint Services_Config_DB
Set _CONTENTDBNAME=Windows SharePoint Services_Content_DB
Set _SITENAME=Default
Set _OUTSMTPSERVER=SMTP101
Set _FROMActive DirectoryDRESS=stsbeta@microsoft.com
Set _FROMActive DirectoryDRESS=stsbeta@microsoft.com
Set _EMAILENCODING=UTF-8
Set _CODEPAGE=65001
Set _VirtualServerName= Default Web Site 
c:
cd "\pro*\com*\mi* s*\we* se*\60\bin"
REM CREATING THE Active DirectoryMIN APP POOL AND CONFIGURING STS Active DirectoryMIN SITE
stsadm -o setadminport -port %_Active DirectoryMINSITEPORT% -admapcreatenew -admapidname %_STSActive DirectoryMINAPPPOOLNAME% -admapidtype configurableid -admapidlogin %_STSActive DirectoryMINAPPPOOLUSERNAME% -admapidpwd %_STSActive DirectoryMINAPPPOOLUSERPWD%

REM USING AN EXISTING CONFIG DB
stsadm -o setconfigdb -connect -databaseserver %_SQLSERVER% -databasename %_CONFIGDBNAME%
IISReset

REM EXTENDING VIRTUAL SERVER
stsadm -o extendvsinwebfarm -url https://%_SITENAME%.stsbeta.iponet.net -vsname %VirtualServerName% -apcreatenew -apidname %_STSAPPPOOLNAME% -apidtype configurableid -apidlogin %_Active DirectoryDOMAIN%\%_STSAPPPOOLUSERNAME% -apidpwd %_STSAPPPOOLUSERPWD% 

IISReset