Fresh Content on SharePointJoel.com SharePoint Ads
Subscribe in a reader
I haven't heard much traffic on unattended installs in SharePoint, but hey it is possible, you may want to do it for consistency of building or rebuilding servers in your farm.
Here's a quick overview. There are actually 3 commands you need to know.
SETUP.EXE
TechNet has a good article on the config XML and why you'd use it. There's also a setup.exe command line reference. The data here is so lengthy I can see why many have written it off as too complicated for such a simple install.
In a nutshell you run setup and pass the config.xml similar to an answer file.
setup.exe /config \\%path%\config.xml
Where %path% is the path to the config file which may be local or remote.
Config.xml reference
When you want to control how Microsoft Windows SharePoint Services 3.0 is installed, use the Config.xml file along with Setup.exe. For example, you can use the config.xml file to:
Perform a silent installation of Windows SharePoint Services 3.0.
Install Windows SharePoint Services 3.0 by using a common configuration across multiple servers.
Perform an automated or scripted install of Windows SharePoint Services 3.0.
There are some samples in the download or on the DVD:
Setup Contains a config.xml file for use in setting up a clean installation. You must run psconfig.exe after running Setup to finish configuring the server or server farm. [NOTE: Apparently based on some comments this may actually do the all in one installation and auto extend and install SQL express, etc... see comments below]
SetupFarmSilent Contains a config.xml file for use in setting up a server farm in silent mode
SetupGradualUpgradeSilent Contains a config.xml file for use in upgrading an existing server farm gradually.
SetupSilent Contains a config.xml file for use in setting up a clean installation for a single server (stand-alone, with Windows Internal Database) in silent mode
SetupUpgradeSilent Contains a config.xml file for use in upgrading an existing server farm gradually.
Not sure what the difference is between the two upgrade ones.
Here's a good KB article on using the command line and changing the default home directory. For WSS I can see people wanting to use this anyway even if they aren't trying to do unattended, but to force a specific directory.
How to customize the installation location when you install SharePoint Server 2007 from the command line
http://support.microsoft.com/kb/923590
Snippet from the KB:
Note Path is the path of the folder where you want to install SharePoint Server 2007. For example, if you want to install SharePoint Server 2007 to the C:\Test folder, Path is C:\Test.SharePoint Server 2007 includes different Config.xml files for different types of configurations. Each Config.xml file is located in the following folder of the SharePoint Server 2007 installation source, depending on the edition of SharePoint Server 2007 that you have:
Note SetupFoldername is the name of the folder that represents the type of configuration. For example, the configuration may be represented by the SetupFarm folder or the SetupSilent folder.The following is an example of a Config.xml file from the x86\Files\SetupSilent folder that has been modified to include the INSTALLLOCATION parameter. In this example, SharePoint Server 2007 is installed to the C:\Test folder.
<Configuration> <Package Id="sts"> <Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes" /> <Setting Id="REBOOT" Value="ReallySuppress" /> <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" /> </Package> <Package Id="spswfe"> <Setting Id="SETUPCALLED" Value="1" /> <Setting Id="REBOOT" Value="ReallySuppress" /> <Setting Id="OFFICESERVERPREMIUM" Value="1" /> </Package> <INSTALLLOCATION Value="C:\Test" /> <Logging Type="verbose" Path="%temp%" Template="Office Server Setup(*).log" /> <Display Level="none" CompletionNotice="no" /> <PIDKEY Value="PID" /> <Setting Id="SERVERROLE" Value="SINGLESERVER" /> <Setting Id="USINGUIINSTALLMODE" Value="0" /> </Configuration>
PSCONFIG.EXE
Keith Richie has a good post on PSConfig.exe and explains it is your friend. It is true, in fact running this command is much faster, but is also cleaner. Here's his example:
After installing, deselect the "Run the configuration wizard" check box and close, then jump to the BIN folder of the web server extensions path and run PSCONFIG such as follows:
psconfig -cmd configdb -create -server krichie-fosqlp -database krichie-fo-wss-configdb -user adomain\SPService -password "SPServicePassword" -admincontentdatabase krichie-fo-wss-admin-content -dbuser adomain\SQLService -dbpassword "SQLServicePassword"
This will run through the post setup configuration wizard and use the database names that I provide. Now my database names reflect the farm their associated with.
Also, don't forget to provision the admin site itself.
psconfig -cmd adminvs -provision
Here's TechNet reference to Psconfig.exe the "command line reference to configuration wizard". There is a reference for this file on psconfig.exe on WSS and MOSS.
Psconfig.exe -cmd <command> [optional parameters]
The article sounds pretty prescriptive around running these commands in a particular order. Note the upgrade commands may not relate. I'm not sure I prescribe to this being so harsh, your experience may vary.
The commands in psconfig.exe need to be run in a specific order to run successfully. If you use the SharePoint Products and Technologies Configuration Wizard to configure your installation, it calls the commands (also called configuration tasks) in the correct order for you. However, if you use the command line to run psconfig.exe, you need to be sure you are performing the tasks in the correct order. The psconfig.exe commands must be performed in the following order:
1.
configdb
2.
helpcollections
3.
secureresources
4.
services
5.
installfeatures
6.
adminvs
7.
evalprovision (only for stand-alone installations)
8.
applicationcontent
9.
upgrade
This one makes more sense, by the way, the parameters are detailed on TechNet.
You can specify all of the commands to run in a single command-line string. If you do this, then psconfig.exe runs all of the commands in the correct order. For example, on the command line, you can run a command similar to the following:
psconfig.exe –cmd configdb <parameters> –cmd helpcollections <parameters> –cmd secureresources <parameters> –cmd services <parameters> –cmd installfeatures <parameters> –cmd adminvs <parameters> –cmd evalprovision <parameters> –cmd applicationcontent <parameters>
I do find the psconfig setup repair option interesting. Note the reference to using the GUI if you're in a farm if you're doing repair. As well, this comes into play after installing the language packs. If you are installing them, I recommend installing *all* the binaries before configuring the farm otherwise you'll have to re-run psconfig or the configuration wizard and resetting IIS.
STSADM.EXE
TechNet Mag has an article on the stsadm command not necessarily on creating web apps, but exploring the command line tool.
TechNet has an WSS STSADM.EXE reference and SharePoint Server STSADM reference, very little difference except when it comes to SSPs. An index of many of the stsadm commands with properties and content was published last month. I see it is missing a few commands (which I tried to include below). The main one is connecting to the config db, creating the web app (extendvs) and then connecting to it from the other servers in the farm, creating sites and webs, and importing sites where they already exist or simply doing a restore. For all these STSADM is *the* command.
I recommend looking at these commands for unattends:
createsite, extendvs, extendvsinwebfarm, createsiteinnewdb, createadminvs, installfeature, import, provisionservice, addsolution, addcontentdb,
deploywppack, deploysolution
In no particular order or command, since it really depends on how many web apps you're creating and what you're doing with them...
stsadm.exe -o setconfigdb -databaseserver server
extendvs
The basics:
stsadm.exe -o extendvs -url http://server:80 -ownerlogin DOMAIN\name -owneremail someone@example.com
The meat:
stsadm.exe -o extendvs -url <url> -ownerlogin <domain\name> -owneremail <someone@example.com> [-exclusivelyusentlm] [-ownername <display name>] [-databaseuser <database user>] [-databaseserver <database server>] [-databasename <database name>] [-databasepassword <database user password>] [-lcid <language>] [-sitetemplate <site template>] [-donotcreatesite] [-description <iis web site name>] [-sethostheader] [-apidname <app pool name>] [-apidtype <configurableid/NetworkService>] [-apidlogin <DOMAIN\name>] [-apidpwd <app pool password>] [-allowanonymous]
extendvsinwebfarm (this is when it already exists and you want to connect)
c:\Program Files\Common Files\Microsoft Shared\web server edm -help extendvsinwebfarm
stsadm.exe -o extendvsinwebfarm -url <url> -vsname <web application name> [-exclusivelyusentlm] [-apidname <app pool name>] [-apidtype <configurableid/NetworkService>] [-apidlogin <DOMAIN\name>] [-apidpwd <app pool password>] [-allowanonymous]
stsadm.exe -o createweb -url http://server/site/web
stsadm.exe -o adduser -url http://server/site -userlogin DOMAIN\name -useremail someone@example.com -role reader -username "Your Name" -siteadmin
stsadm.exe -o setconfigdb -connect -ds Server1 -dn Server1_collab -du User1 -dp password
The following table explains the commands and parameters from this example.
-o setconfigdb
Creates a connection between Windows SharePoint Services 3.0 and a configuration database.
-connect
Specifies that there is an existing configuration database to use.
-ds Server1
Specifies the server name that contains the database to use.
-dn Server1_collab
Specifies the database name to use on that server.
-du User1
Specifies an administrator user name for the database.
-dp password
Specifies the password for the user.
Ben Curry in his MSPress Microsoft SharePoint Products and Technologies Administrator's Pocket Consultant book has a great STSADM reference. It's one of the most complete command line references I've come across. He produced much of it in an stsadm whitepaper on the 184 command-line options. <update 3/15>Ben did a bang up job on Scripted Installations and Config.xml at the SharePoint Conference and did a post on this. He's done a great job demistifying it, so much so that he's recommending this in DR circles. I agree with him. If you can automate the installion, recovery will be a ton easier. It's not just about how quick you can install, but about turning your install into components so you can quickly recover or re-deploy.</update>
Please see some great comments from those that have used these. Love Paul's post on SharePoint and Sysprep.
PingBack from http://www.universityupdate.com/Technology/Microsoft_Windows/3908218.aspx
Nice post.
I used some of the ideas you've discussed here when I created a cloneable VM for developing on. It might be of interest:
http://paulhorsfall.co.uk/archive/2007/05/21/SharePoint-Sysprep-and-SQL.aspx
Paul, that's great! Would love to hear more about how this goes.
Thanks Joel - good post - do you know how to _only_ install the MOSS binaries?
It seems when we run this Config.xml script, it installs MOSS and then continues to run PSCONFIG.exe and creates the Central Admin/SSP on random ports and a Collab Site on Port 80.
It seems the Global\Setup.xml file may hold the answer but we're not sure. Any ideas?
I recommend looking at the SetupFarmSilent config.xml file. It would do the farm mode which would not assume installing all components.
You say that "there are deployment things that you can't do via the web admin" - what in particular can't be done? I'm thinking creating additional AD connections, configuring outgoing email, alternate access mappings?
Examples of what you can't do via the central admin...
* change the frequency of immediate alerts
* force timer jobs to run
* add a solution
* add a feature
* schedule your backups
* change the maximum site template size
Thanks for the info Joel.
I have automated almost the entire deployment..
I am using extendvsinwebfarm to extend an extisting web app to the intranet zone.
I am able to get it all the work except it puts the extended web app in the "default website"......when I do it via the U.I it created a separate website....
The AAM gets created and I can use the addzoneurl operation for the rest.
Is extendvsinwebfarm the correct operation to extend an existing web app to a zone with a hostheader?
I am so close.... :)
@PeterB,
I am running a complete series and part 7 of the series answers your question :-)
@Dennis, I 'd look forward to sharing notes with you. I am running this scripted series and am sure we can share ...
Yes extendvs will get you host header. We have similiar requirements. Check it out in a lab environment if possible, lest scripted setup for host header breaks your installation :-)
Boy, I wish Connections had been setup as good as this one is... From the starting blocks, I have been
Unattended installation af WSS 3.0/MOSS 2007
Hi Joe,
Thank u so much! Really a great post!
Can you please also tell about silent installation of Sharepoint connector. I have done the silent installation of SharePoint Services but not sure how to do the silent installation of SharePoint Connector.
Any suggestion is welcome!
Thanks once again.