Eamon Barker's eb.NET

Not quite vb.NET, but getting close!

Filter by APML
RSS Feed

Search

Profiles/Groups

Google Ads

Top Posts

Tags

Categories

Archive

Calendar

<<  September 2010  >>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Blogroll

Disclaimer

All postings are provided AS IS with no warranties, and confer no rights.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright Eamon Barker 2010

CC License

Visitor Map

Locations of visitors to this page
Welcome to eb.NET... a place that I can keep the things that help me in my day, that might help you in your's!

SharePoint Tip: Silent/Unattended Install and Configuration of Office SharePoint Server (MOSS 2007) and Windows SharePoint Server (WSS 3.0)

Look mum, NO HANDS! Unattended installation of SharePoint.

As mentioned in a previous post, we have a few staging environments for SharePoint that come and go with the various projects. To make the process of installing these environments a lot easier (and so I can spend more time cutting code), I wrote a batch file that, well, installs SharePoint and configured it for me!

I did some hunting and found Joel Oleson's Blog about silent installs, added that information with the MSDN article on the config.xml and away I went! But, that was only half of the battle, the next part came curtsy of Keith Richie and his post on Psconfig.exe, explaining how to use the Psconfig.exe command-line tool to perform the configuration of SharePoint. There is also a great amount of information on MSDN about Psconfig. Finally, using some of the STSADM functions the base site was created.

First off, I think some background is needed now about the environment this is all going on. I am using Windows Server 2008 and I have installed IIS already.

Installing SharePoint 

Alright, first part of this process. I have the install binaries in a network shared folder with service pack 1 extracted to the updates folder (see Martin Kearn's blog about how to create a ‘Slipstream’ installation for MOSS with SP1, the same process will work for WSS 3.0 OR you can get all ready done, have a look at this blog on the WSS and MOSS with SP1 release).

Next I created my config.xml following Joel's post. Below is the contents of that file:

   1: <Configuration>
   2:     <Package Id="sts">
   3:         <Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes" /> 
   4:         <Setting Id="REBOOT" Value="ReallySuppress" />
   5:         <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" /> 
   6:     </Package>
   7:     <Package Id="spswfe">
   8:         <Setting Id="SETUPCALLED" Value="1" /> 
   9:         <Setting Id="REBOOT" Value="ReallySuppress" /> 
  10:         <Setting Id="OFFICESERVERPREMIUM" Value="1" /> 
  11:     </Package>
  12:     <INSTALLLOCATION Value="%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\12\Data" /> 
  13:     <Logging Type="verbose" Path="%temp%" Template="Office Server Setup(*).log" /> 
  14:     <Display Level="basic" CompletionNotice="no" SuppressModal="No" NoCancel="Yes" AcceptEula="Yes"  /> 
  15:     <PIDKEY Value="xxxxxxxxxxxxxxxxxxxxxxxx" /> 
  16:     <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" />
  17:     <Setting Id="SERVERROLE" Value="SINGLESERVER" /> 
  18:     <Setting Id="USINGUIINSTALLMODE" Value="1" /> 
  19:     <Setting Id="SETUP_REBOOT" Value="Never" />
  20: </Configuration>

The above config.xml file is called along with setup.exe to install SharePoint without interaction! 

Command that is called:

\\server\Sharepoint\MOSS2007wSP1\x64\setup.exe /config file://server/Sharepoint/MOSS2007wSP1/config.xml

Configuring SharePoint/Creating Site Collection

Next we need to run the Psconfig and STSADM commands. I followed the instructions on Keith's blog and added my own STSADM command to create the default site and came up with this:

cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin
psconfig -cmd configdb -create -database SP_Config -admincontentdatabase SPT_Content -cmd adminvs -provision -port 30000 -windowsauthprovider onlyusentlm -cmd quiet
stsadm -o extendvs -url http://YourSite -ownerlogin Domain\User -owneremail you@yourcompany.com -sitetemplate STS#0 -description "Site Description"

Then, all you need to do is put it all together and pop it in a .bat file, here is what I came up with:

   1: ::Install SharePoint
   2: REM --Connecting to SharePoint Install Files and Starting the SharePoint Install--
   3: \\server\Sharepoint\MOSS2007wSP1\x64\setup.exe /config \\server\Sharepoint\MOSS2007wSP1\config.xml
   4: REM --Configuring SharePoint--
   5: cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin
   6: psconfig -cmd configdb -create -database SP_Config -admincontentdatabase SPT_Content -cmd adminvs -provision -port 30000 -windowsauthprovider onlyusentlm -cmd quiet
   7: REM --Create a site with a default site template--
   8: stsadm -o extendvs -url http://YourSite -ownerlogin Domain\User -owneremail you@yourcompany.com -sitetemplate STS#0 -description "Site Description"

Running the above batch file will install and configure SharePoint, giving you a default instance to start you off with!

Currently rated 4.8 by 4 people

  • Currently 4.75/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SharePoint Tip: Tidying up SQL Files in SharePoint

A post explaining how to save space by cleaning up log files for SharePoint SQL Databases

We have several staging SharePoint environments running on MSFT Hyper-V servers, this gives our BA's the environment to build up PoC sites for clients. I was doing the usual maintenance round and found that space was becoming an issue on one of the staging environments.

So... time to truncate and shrink some SQL Log files I think, and I was correct! A couple of the .LDF files has swelled to in excess of 500MB. First of all, back up the database, fully... I wouldn't be too popular if I lost all that work! Next I ran the the code below on the database (highlight one row at a time and run it):

   1: BACKUP LOG <Database Name> WITH TRUNCATE_ONLY 
   2: DBCC SHRINKDATABASE (<Database Name>)

After running the code, the LOG file went from >500MB to around 500KB!

Finally, I would suggest changing the autogrowth settings for the log file. To do this:

  1. Open MSFT SQL Server Manager
  2. Log into the SharePoint SQL server
  3. Right-click the database and select Properties
  4. In the Database Properties window, select Files from the left-hand pane
  5. In the Database Files box (on the right-hand side), click the "..." button in the Autogrowth column for the LOG file row (see the image below)

    image
  6. In the File Growth area, enter either the percentage or megabytes you want to limit the file growth to (I have set the one above to 2 percent)
  7. In the Maximum File Size area enter the max size you want from the file OR leave it Unrestricted (I have restricted the one above to 200MB)

Alternativly, if you don;t care about keeping your log files (if you have a sandbox or something?) you can change the Recovery Model of the database to simple... Follow steps 1, 2, 3 above and then select Options from the left-hand pane, in the Recovery Model drop-down list, select "Simple".

And that should be that!

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5