Showing posts with label Search Server. Show all posts
Showing posts with label Search Server. Show all posts

Wednesday, March 25, 2009

The Revenge of SharePoint

Remember my SharePoint article from 2 months ago ? Well, believe it or not, but I have crashed my SharePoint site beyond my repair skills capabilities. It happened after a domain migration and was due to some dark account permission problem on the SQL 2005 database.

After having wasted a few hours on the problem, I decided to re-install it from scratch on a new and better set up virtual machine. After all, it was only a prototype without too much production data in it.

The first thing I did was using my previous SharePoint installation article as guideline and i will say it was definitively worth writing it and I got my payback for it. While I was at it, I also wanted to bring in a couple of improvement to my initial setup.

As SQL Server 2005 was installed on the C:\ drive, I needed to move the SharePoint databases to the D:\ drive which was designed to contain the data. I proceeded as follow after having installed Sharepoint Services:

In order to move a Microsoft SQL Server 2005 SharePoint database, I needed to:
- Stop the IIS SharePoint site.
- Stop all Windows SharePoint Services: Administration, Timer & Tracing.
- Backup the SharePoint content and configuration database.
- Detach these databases using SQL Server Management Studio.
- Move the database files (.ldf & .mdf) to the new location.
- Attach these files back to SQL Server 2005 still using the SQL Server Management Studio.
- Restart the SQL server.
- Restart all SharePoint services.
- Restart the iis SharePoint site.
And it worked like a charm.

I decided to add some better web parts to the portal and as such downloaded and installed What's New, Chart, AutoComplete, and Copy Paste web parts from the SmartTools suite on CodePlex. The What's New web part is probably the best of them. All these parts are ridiculously easy to install and deploy.

I also wanted to change my security strategy and to really use two Web Applications: one for the Central Administration on some exotoc port and the SharePoint content sites on port 80. As I had already recreated my content sites under the Central Administration, I needed to move them all to a different application in order to better manage their security. Therefore I had to first move the Central Administration from port 80 to another port (see my article for instructions), then create a new web application on port 80, export all created sites and re-import them into the newly created Web Application on port 80. The export/import operation was made simple thanks to the stsadm command line tool. Afterwards I simply had to uninstall and re-install the CodePlex SmartTools to have them active under the new Web Application.

And that's it, my SharePoint site is now back and ready to be used.

Wednesday, January 14, 2009

Installing SharePoint Services 3.0 in a Snap

Whenever you have to implement an Intranet project, there is always a time when someone asks something like "Could you come with a very cheap solution for an small Intranet proof-of-concept in the coming days ?"

So last week I decided to create a small Intranet prototype with limited features for a limited audience and using Windows SharePoint Services 3.0. Why WSS ? Simply because we started implementing SharePoint Server 2007 (MOSS 2007) for another project and as such I tried to remain coherent in my implementation choices.

I started with a virtual machine running Windows Server 2003 R2 and checked it was fully patched before going further. I then installed the .Net Framework 3.0 on it.

The second step was to enable the Internet Information Services (IIS) role on that server. Once enabled I needed to check if ASP.NET 2.0 was indeed used by IIS. For that, go to IIS manager -> Websites -> Properties and check that ASP.NET 2.0 is used. If an older version is used then under command prompt type:

%windir%\Microsoft.NET\Framework\[version]\aspnet_regiis.exe" -i

then

regsvr32 %windir%\Microsoft.NET\Framework\[version]\aspnet_isapi.dll

Don not forget to replace [version] by your ASP.NET version. In my cas, it was v2.0.50727.

The next step is about installing Windows SharePoint Services and I strongly advice to read beforehand this Microsoft document about how to create the right accounts. Even if you think that Microsoft recommendations are way too complex, the minimum is to use a different account to install WSS and SQL. Use an administrator or generic installer account but do not use your own domain account to perform the installation on the server.

Once you have created the (right) accounts (including your installer account), you can download WSS. Simply follow the instruction and use the same installer account to configure your database.

Once done, under command prompt, type stsadm. If that command is unknown then add this file to the PATH environment variable: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN.

I then decided to immediately Install most of the SharePoint Fantastic 40 Applications Templates, starting with the ApplicationTemplateCore.wsp. The installation is quite simple still using command prompt:

stsadm -o addsolution -filename [path to file]\ApplicationTemplateCore.wsp

stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment -immediate

stsadm -o copyappbincontent


The complete installation instructions for the templates installation are available from Microsoft. In short, you only need to pull the solution file, template_name.wsp, from the extracted distribution. To add the solution file to the solution store, type the following commands:

stsadm -o addsolution -filename [file_path]\.wsp

stsadm -o deploysolution -name template_name.wsp -allowgacdeployment -immediate


To check the deployment status, browse to the WSS Central Administration site. Click the Operations tab, and then click Solution management under global configuration.
Once all solutions are marked as "Globally Deployed", run iisreset from the command line.

I then realized that IIS had a default website running on port 80 and the WSS Centra Administration site was running on some exotic port. As I did not need the default IIS site, i decided to disable it (from the IIS Manager console) and to switch the WSS site to the port 80. Happily I found an excellent article on TechNet explaining how to change the Central Administration Web site port number (Windows SharePoint Services).

At this point, I had a small SharePoint site up and running and started creating some sites in order to test the templates and get familiar with the permissions and other settings of SharePoint. I was slowly getting to where I wanted to be.

The next step involved the upgrade of the standard SharePoint search engine to Search Server 2008 Express and this TechNet article about Search Server 2008 installation was of great help.

I got a small frustration when noticing that SharePoint and Search Server did not support PDF documents. After googling a bit, I found a solution for the missing PDF icon display and even a simple way to have Search Server crawling through and indexing PDF documents. The solution involves installing Adobe Reader 8.x or 9.x on your SharePoint server. While the above article was written for Adobe Reader 8, it worked just fine with Adobe Reader 9. While testing the search server, I noticed that no Adobe PDF documents were returned in the search results but i could quickly fix it thanks to a KB article. (Microsoft KB 927675)

As I felt confident now that everything worked as expected, I even spent some time to add a company theme which is a simple operation perfectly described this article about custom site theme for SharePoint 2007. Well to be honest, I merely threw out the foundation of the theme and still have to update the CSS file.

Finally I even cared about online presence using MSN accounts. Once you fill in the SIP address of your user account personal settings with your MSN or Windows Live email address then you have a cheap way to see if some of your colleagues are online, providing your company does not block all MSN traffics. The trick here is to have a recent Windows Live messenger client on your PC (and not an old v4.x like I still had) and to add your colleagues on your contact list.

For those wishing to consult their WSS / MOSS log files through the Central Administration, there is a cool Log Viewer project on CodePlex allowing so. Simply download the WPS file and install it like any other solution using your installer account. Then do not forget to perform an iisreset to be able to see the link in your Operations tab under Logging and Reporting.

And that's it.
Within 3 to 4 days you have (at least I have now) a very cheap and decent Intranet perfectly suited for small department or projects management. By cheap I mean it only costs one Windows 2003 R2 license and a few days of work. For that price you get an Intranet platform with simple workflows, pre-defined themes and templates, some simple document management features including approvals and versioning, a decent search engine crawling Office documents and PDFs, and even a simple online presence add-on. On top of that, you got familiar with the basics of that monster which is SharePoint. Those days were quite well spent if you ask me.