Ben Curry - CISSP, SharePoint Server MVP

All MindsharpBlogs

http://www.microsoft.com/mspress/books/10623.aspx

My Links

Archives

Image Galleries

Blog Stats

Favorite SharePoint Books

My Favorite Blogs

New SharePoint Server 2007 Installation Scripts

Ok, so I'll post these on our premium content for free download later in the week, but several people have emailed me that they need them now. If you need the instructions, they are already on our premium content area for download - so go get the zip file, and there is a docx file in there. You will still need several files in the zip, like translate.js and the host header scripts for IIS6. So, download the old zip from premium content and replace the 3 build scripts with these.

Each script will start with “--StartScriptName.cmd--” and end with “--EndScriptName.cmd--”

--StartConfig.XML--(this is for an Advanced, Complete Binary Installation)


 
  
  
  
 


  
  
  
 


 
   

 

--EndConfig.xml--

--StartBits.cmd--


@echo off
REM ////////////////////////////////////////////
REM // script install the binaries for sharepoint
REM // farm.
REM ////////////////////////////////////////////


REM ////////////////////////////////////////////
REM // need real paths      ##        //
REM ////////////////////////////////////////////
d:\x86\setup /config c:\scripts\config.xml

--EndBits.cmd--

--StartFarmBuild.cmd--

@echo off
REM //////////////////////////////////////////////////
REM // script farm -- creating dbs and setting sites /
REM //  sharepoint farm.                             /
REM //////////////////////////////////////////////////


REM //////////////////////////////////////////////////
REM // applications
REM //////////////////////////////////////////////////
set s="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
set ps="c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe"

REM //////////////////////////////////////////////////
REM // your enterprise SQL server
REM //////////////////////////////////////////////////
set sql=SPSQL

REM //////////////////////////////////////////////////
REM // account vars
REM //////////////////////////////////////////////////
set mossfarm=contoso\moss
set mosscrawler=contoso\mosscrawler
set sspapid=contoso\sspapid
set myapid=contoso\myapid
set sspservice=contoso\coressp
set portalapid=contoso\portalapid
set mossservice=contoso\mossservice

REM //////////////////////////////////////////////////
REM // password
REM //   NOTE:if using a % sign in password you must
REM //        escape it with a % sign 'iuyOP%%$#@!11'
REM //        is interpreted as 'iuyOP%$#@!11'
REM //       
REM //////////////////////////////////////////////////
set p=[YOURPASSWORD]

REM //////////////////////////////////////////////////
REM // urls
REM //////////////////////////////////////////////////
set sspportalurl=http://ssp.contoso.msft
set mysiteurl=http://my.contoso.msft
set portalurl=http://portal.contoso.msft

REM //////////////////////////////////////////////////
REM // start work here
REM //////////////////////////////////////////////////

Echo ===============================
Echo == Creating Farm
Echo ===============================
:: Creating Farm via populating the ConfigDB. Set SQL Servername, configDB name, Central Admin ContentDB, and Farm Account.
%ps% -cmd configdb -create -server %sql% -database Contoso_Config_DB -user %mossfarm% -password %p% -admincontentdatabase Central_Admin_Content
Echo ======================
Echo Provision Central Admin
Echo ======================
:: @pause
::  Provision Central Admin Application on this server. Uses configDB and ContentDB above. Set port number to suit your requirements.
%ps%  -cmd adminvs -provision -port 45009 -windowsauthprovider onlyusentlm
Echo ======================
Echo Install all Services
Echo ======================
::  Install all services on machine
%ps% -cmd services install
Echo ======================
Echo Securing File System and Registry Keys
Echo ======================
:: @pause
:: Set Security on File System and Registry Keys
%ps% -cmd secureresources
Echo ======================
Echo Starting MOSS Search
Echo ======================
:: @pause
::  Start SharePoint Server Search Service with only Index.Verify database and services names. Change role to Index, Query, or IndexQuery, depending on your farm topology.
%s% -o osearch -action start -role Indexquery -farmcontactemail admin@contoso.msft -farmperformancelevel maximum -farmserviceaccount %mossservice% -farmservicepassword %p%
Echo ======================
Echo Starting WSS Search
Echo ======================
::  Start WSS Search. Verify database and service names.
%s% -o spsearch -action start -farmserviceaccount %mossservice% -farmservicepassword %p% -farmcontentaccessaccount %mosscrawler% -farmcontentaccesspassword %p% -databaseserver %sql% -databasename WSS_Search
Echo ======================
Echo Installing all Features
Echo ======================
::  Install all features on machine
%ps% -cmd installfeatures
Echo ======================
Echo Creating My Sites Web
Echo ======================
::  Create My Site Web application. Verify database name and administrator's names.
%s% -o extendvs -url %mysiteurl% -ownerlogin "%mossfarm%" -owneremail "admin@contoso.msft" -exclusivelyusentlm -ownername "mossAdmin" -databaseserver %sql% -databasename WSS_Content_MySite -sitetemplate spsmsitehost -description "My Site Host" -sethostheader -apidname MySiteAppPool -apidtype configurableid -apidlogin %myapid% -apidpwd %p%
Echo ======================
Echo Enabling Self Service Site Management for %mysiteurl%
Echo ======================
::  Enable Self Service Site Management (Creation) on %mysiteurl%
%s% -o enablessc -url %mysiteurl%
Echo ======================
Echo Creating SSP Web
Echo ======================
::  Create SSP Web application. Verify database and apid names. (APID = Application Pool Identity)
%s% -o extendvs -url %sspportalurl% -exclusivelyusentlm -databaseserver %sql% -databasename WSS_Content_Contoso_SSP -donotcreatesite -description "Contoso SSP Admin Host" -sethostheader -apidname "Contoso SSP" -apidtype configurableid -apidlogin %sspapid% -apidpwd %p%
::  We must reset IIS before building the SSP. If you are local on the box, you can check all services are created before creating SSP.
iisreset
Echo ======================
Echo Creating SSP
Echo ======================
:: @pause
::  Create SSP. Verify all names and URLs.
%s% -o createssp -title "Contoso SSP" -url %sspportalurl% -mysiteurl %mysiteurl% -ssplogin %sspservice% -indexserver APP2 -indexlocation c:\indexes -ssppassword %p% -sspdatabaseserver %sql% -sspdatabasename Contoso_SSP_Config -searchdatabaseserver %sql% -searchdatabasename Contoso_SSP_Search -ssl no
Echo ======================
Echo Creating Portal
Echo ======================
:: @pause
::  Creating Portal. Change the URL if you will have a different URL than 'portal'.
%s% -o extendvs -url %portalurl% -ownerlogin %mossfarm% -owneremail "admin@contoso.msft" -exclusivelyusentlm -ownername "Administrator" -databaseserver %sql% -databasename WSS_Contoso_Portal_Content -sitetemplate spsportal -description "Contoso Portal" -sethostheader -apidname PortalAppPool -apidtype configurableid -apidlogin %portalapid% -apidpwd %p%
::  CALLING portalhh.cmd to add Contoso Host Headers
REM //////////////////////////////////////////////////
REM //  call the cmd files that create the host
REM // headers and alternate access mappings
REM //////////////////////////////////////////////////
call portalhh.cmd
call ssphh.cmd
call myhh.cmd
call aam.cmd

REM //////////////////////////////////////////////////
REM // POST BUILD
REM //////////////////////////////////////////////////
Echo ========================
Echo Modifying Logging level
Echo and Outbound Smtp
Echo ================calling setlogs.cmd====see premium content for xlsx source file=======
REM  or just set the logging levels in this script
%s% -o setlogginglevel -category general -tracelevel unexpected -windowslogginglevel error
:: @pause
%s% -o email -outsmtpserver 10.1.1.25 -fromaddress administrator@contoso.msft-replytoaddress ContosoAdmins@contoso.msft -codepage 65001

Echo ========================
Echo Setting Application Settings
Echo Setting Recycle Bin Settings
Echo ========================
%s% -o setproperty -pn recycle-bin-enabled -pv yes -url %portalurl%
%s% -o setproperty -pn recycle-bin-enabled -pv yes -url %mysiteurl%
%s% -o setproperty -pn recycle-bin-retention-period -pv 180 -url %portalurl%
%s% -o setproperty -pn recycle-bin-retention-period -pv 180 -url %mysiteurl%
%s% -o setproperty -pn second-stage-recycle-bin-quota -pv 20 -url %portalurl%
%s% -o setproperty -pn second-stage-recycle-bin-quota -pv 20 -url %mysiteurl%

Echo ========================
Echo Setting Maximum Upload
Echo File Size
Echo ========================
%s% -o setproperty -pn max-file-post-size -pv 200 -url %portalurl%
%s% -o setproperty -pn max-file-post-size -pv 200 -url %mysiteurl%
::  Creating managed paths for http://portal. Change for your environment
%s% -o addpath -url http://portal.contoso.msft/projects -type wildcardinclusion
%s% -o addpath -url http://portal.contoso.msft/teams -type wildcardinclusion
%s% -o addpath -url http://portal.contoso.msft/HR -type explicitinclusion
@Echo Added projects, teams, and HR managed paths
::DON'T USE BELOW WHEN RESTORING CONTENT DATABASES!!!!!!
::  Just for fun, create the embedded managed path site collectoin 'HR'
%S% -o createsite -url http://portal.contoso.msft/hr -owneremail administrator@contoso.msft -ownerlogin contoso\administrator -ownername Administrator -sitetemplate sts#1 -title "HR Portal"
@echo created embedded managed path site collection at http://portal.contoso.msft/HR

--EndFarmBuild.cmd--

This script is for connecting servers to an existing farm:

--StartFarmConnect.cmd--

:: Farm_Connect.cmd
:: Use on all WFE Servers in Farm
:: @Echo On (off for demo)
:: Calling bits.cmd to install binaries
@call bits.cmd
Echo Ready to connect server to farm
"c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe" -cmd configdb -connect -server app1 -database SharePoint_Config_Contoso -user contoso\mossfarm -password P@ssw0rd
"c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe" -cmd services install
"c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe" -cmd installfeatures
:: Setting Security on Registry and File System
@Echo Ready to Set Security on File System and Registry
"c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe" -cmd secureresources
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o osearch -action start -role query -farmcontactemail administrator@contoso.msft -farmperformancelevel maximum -farmserviceaccount "contoso\mossservice" -farmservicepassword P@ssw0rd
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o osearch -action start -role query -farmcontactemail administrator@contoso.msft -farmperformancelevel maximum -farmserviceaccount "contoso\mossservice" -farmservicepassword P@ssw0rd -propagationlocation c:\indexes
iisreset
@Echo Ready to add portal and my sites host headers?
::  CALLING myhh.cmd to add http://my Host Header. Allows your users to enter http://my or http://my.contoso.msft in the browser
call myhh.cmd
::  CALLING portalhh.cmd to add http://portal Host Header
call portalhh.cmd

--EndFarmConnect.cmd--

--StartSampleAlternateAccessMappingsScript.cmd--

REM ////////////////////////////////////////////////////
REM // Adding Alternate Access Mappings         /
REM //             / 
REM ////////////////////////////////////////////////////
rem // applications
set s="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
set ps="c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe"

set sspportalurl=http://ssp.contoso.msft
set myurl=http://my.contoso.msft
set portalurl=http://portal.contoso.msft

rem // create intranet link first
%s% -o addalternatedomain -url %portalurl% -incomingurl http://portal.contoso.msft -urlzone intranet
%s% -o addalternatedomain -url %portalurl% -incomingurl http://portal -urlzone custom
%s% -o addalternatedomain -url %myurl% -incomingurl http://my.contoso.msft -urlzone intranet
%s% -o addalternatedomain -url %myurl% -incomingurl http://my -urlzone custom
%s% -o addalternatedomain -url %sspportalurl% -incomingurl http://ssp.contoso.msft -urlzone intranet
%s% -o addalternatedomain -url %sspportalurl% -incomingurl http://ssp -urlzone custom

--EndSampleAlternateAccessMappingsScript.cmd--

--StartSampleAddContentDatabaseToWebApp.cmd--

@echo off
REM ///////////////////////////////////////////////////////
REM // script farm -- attaching dbs to Web apps          //
REM //                                                   //
REM ///////////////////////////////////////////////////////


rem //  required accounts
set mossfarm=contoso\moss
set mosscrawler=contoso\mosscrawler
set sspapid=contoso\sspapid
set myapid=contoso\myapid
set sspservice=contoso\coressp
set portalapid=contoso\portalapid
set mossservice=contoso\mossservice
rem ////////////////////////////////////////////////////////////////////
rem // if using a % sign in password you must escape it with a % sign //
rem //  'iuyOP%%$#@!11' is interpreted as 'iuyOP%$#@!11'              //
rem ////////////////////////////////////////////////////////////////////
set p=[YOURPASSWORD]

rem // applications
set s="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
set ps="c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe"


REM Add contoso Content Databases
echo  adding WSS_Portal_Home
%s% -o addcontentdb -url http://portal.contoso.msft -databasename "WSS_Portal_Home"
echo  adding WSS_CEO_Home
%s% -o addcontentdb -url http://portal.contoso.msft -databasename "WSS_CEO_Home"
echo  adding WSS_Content_Sandbox
%s% -o addcontentdb -url http://portal.contoso.msft -databasename "WSS_Content_Sandbox"

REM Add Mysite Content Databases

echo  adding WSS_Content_MySite1
%s% -o addcontentdb -url http://my.contoso.msft -databasename "WSS_Content_MySite1"  
echo  adding WSS_Content_Mysite3
%s% -o addcontentdb -url http://my.contoso.msft -databasename "WSS_Content_Mysite3"
echo  adding WSS_Content_Mysite4
%s% -o addcontentdb -url http://my.contoso.msft -databasename "WSS_Content_Mysite4" 
echo  adding WSS_Content_MySite5
%s% -o addcontentdb -url http://my.contoso.msft -databasename "WSS_Content_MySite5"
echo  adding WSS_Content_MySite2
%s% -o addcontentdb -url http://my.contoso.msft -databasename "WSS_Content_MySite2"

--EndSampleAddContentDatabaseToWebApp.cmd--

 

Cheers. I will try to get more detail up about these in the premium content area soon. I have a new version of the scripting a farm whitepaper, but need time to test them against my new images.

Hth,

 

Ben Curry, CISSP, SharePoint Server MVP

http://mindsharpblogs.com/ben

http://www.microsoft.com/mspress/books/10623.aspx

Come see me at SharePoint Connections in Las Vegas!

posted on Saturday, August 23, 2008 7:34 PM

Feedback

# Recent Faves Tagged With "docx" : MyNetFaves 9/12/2008 12:47 PM Pingback/TrackBack

Recent Faves Tagged With "docx" : MyNetFaves

# User links about "applications" on iLinkShare 2/4/2009 1:01 AM Pingback/TrackBack

User links about "applications" on iLinkShare


Comments on this post are closed.
Title  
Name  
Url
CAPTCHA
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments