Installing IIS 6 and Exchange on Server 2003
This is a LAMP-style installation with PHP and MySQL. All of the necessary components are included in this package. I’m going to include some tips on installing WordPress, as well.
Download this to eliminate to stop getting a message that one service did not start: download
- Install from the disc
- Uninstall the Internet Explorer enhanced security feature – ack!
- Do updates – one will fail (see next point)
- Security Update KB2686509 will fail, repeatedly. In my case, the fix was to
copy two files (kbdusl.dll and kbdusr.dll) to system32 and/or C:\WINDOWS. After these files are copied, the update will work.
- RECOMMENDED: I would suggest installing VirtualCloneDrive so as to
make installing components faster and easier…..
- Registry edit to curb service failed to start notice: I will actually add this information later – but you need to add a new DWORD value called “Headless”, and, with a value of “1”.
- I’ve written pages which give details for configuring PHP, etc. Everything is ready to go with the files on this disk – so I’m not going to copy any of that, here….
- WARNING: regarding permissions – Do not fiddle, extensively, with permissions on your default web site. You need to tweak them minorly, as described below. If you jerk around with permissions, allowing them to propagate to your Exchange folders, OWA will not work. Although it is covered below, I will mention it now: grant full control on the wwwroot folder to the IUSR – that’s it. Do not allow permissions to propagate to sub-folders, etc.
- Install Domain Controller/Active Directory (needed for Exchange)
- Go to Manage Server > Add A Role. Depending upon your internet connection you may see an option that says
“Typical setup for a first server”. Choose this and a wizard appears which sets your computer up, if I recall correctly,
as a domain controller, etc. The default values are generally fine and it’s all very self-explanatory. If you don’t see this wizard
(which happened to me recently, for the first time) choose the following option.
Note: regarding the aforementioned wizard, it will not run if these conditions are not met.
ALSO: I just use a domain name like “guysjoint.com”. And there are only two screens that are not ver self explanatory. Below are pics which show what you should choose for the two screens in question:
- Having nothing to do with servers, unzip kbdusrl.zip and copy the enclosed files to the system32 and Windows directories. If you don’t, there’s one Windows security update which will keep attempting to install and keep failing. I actually can’t recall if has to be copied to both of the aforementioned directories. Anyway, copy them to both and it works….
- Uninstall “Interent Explorer Enhanced Security Configuration” through the “Add/Remove Programs > Add/Remove Windows Components” GUI. This isn’t mandatory and has virtually nothing to do with IIS, but, it’s a worthless component that will drive you insane….. Just a little reminder to myself.
- Set a static IP.
- Go to Manage Server > Add A Role. Choose to add the Application server role (see graphic, below). This adds IIS 6 and allows you to include things like asp.net and Frontpage extensions. I simply say “yes” to everything and the entire thing is brain dead. You’ll need your Server 2003 CD in your drive to perform this installation (and others). When the installation is done you can open “localhost” in your browser to see the defult “Under Contruction” page.
- You’ll want to open the IIS Server Manager and change the name of the default website to an actual domain name. Just right-click on the site, in the server manager, and choose the “Web Site” tab, then the Advanced option (see below)
Now, after using the “ADD” button and doing some editing, you should have something like this:
- At some point, you need to go to the C:\Inetpub\wwwroot folder and grant loose permissions to the
IUSR_DELL user and, possibly, the IWAM_DELL user. However, I used to
go to the advanced security settings and allow the permissions to propogate to all child objects. I found that
this wreaked havoc on Exchange files and folders (breaking OWA). You actually should only need to make certain
that the IUSR has full control of the wwwroot folder (based on my latest tests).Also, the suffix on the usernames will obviously vary depending
on your installation media and/or hardware. In other words, IUSR and IWAM will end with something other than “Dell”.
You’ll also probably want to grant these same users read/write
permissions on C:WINDOWS\Temp – this is
mandatory for WordPress installations.
- Install PHP and Mysql
This is all very, very simple as I’ve included the packages with many things pre-configured (for instance, php.ini). Of course, something like the php.ini file has a lot of options which you may wish to tweak. The php files are all ready to simply copied into the correct places (to work in conjunction with MySQL).
- MySQL is a simple binary which installs just like any other Windows application. I’m not going to get into the various options – it’s extremely straightforward. Just choose a “Standard” installation as opposed to the default “detailed installation” and follow the prompts. That’s it.
- PHP is, again, ridiculously simple. Just go to the PHP folder in this package and copy the directories and files as indicated.
The flowplayer failed to find curl, recently, and I found the following fix. This seems a bit extreme, but it works and it breaks nothing.
I copied virtually all of the files in the primary PHP folder and the C:\php\ext folder to C:\WINDOWS and C:\WINDOWS\system32. Obviously, this is overkill (and a little crazy) but it breaks nothing. A lot of php files need to be copied to these two places and I finally got tired of jerking around with this installation. I would recommend doing this simply (1) to make certain that everything works, and, (2) to get things done quickly. If you want to fiddle around, you can test things to see what works with a minimum of files copied to these two locations…….
- An older version of Phpmyadmin is included with these files. You can copy the folder to IIS, not do any fiddling (permissions, etc.), and it works.
You can configure it to your liking.RANDOM NOTE: I recently set my upload limit(s) in php.ini to 3000M, just screwing around. This breaks phpmyadmin – just a little heads up (as if anyone
would actually set them that high!).
- Configure IIS 6 to load PHP
This involves a number of steps, none of which are difficult.
- First, open the Server Manager and right-click on “Web Server Extensions”. Add an extension called “PHP” and, then, click “Add”. Having
clicked “Add” you will be able to browse for a file to load. Choose php5isapi.dll located at C:\php\php5isapi.dll.
- Now, in the IIS Server Manager right-click on your web site and choose Properties.
Open the following: Home Directory (tab) > Configuration > Add and do as illustrated below:
- Still in the IIS Server Manager, right-click on your web site and – again – choose Properties. Choose the “Documents” tab and “Add”. This is very self-explanatory. Just add “index.php” as a default content page. You may wish to move index.php to the top of the default document hierarchy (you’ll see the button).
- You’re done. Now, if you restart IIS you should be able to load php pages. A good way to test everything is to create a php.info page with the following syntax, calling it in your browser (you can save the file with any name):
- WordPress Notes – Important
Installing WordPress can something of a headache, particularly when installing it on the default domain with Exchange – you have to be very careful about
how this is done. I just spent about four days trying to get this to work, and these are the things I recall:
- Add the PHP extension, of course….
- On the default domain, having already changed the header name(s), add PHP and the PHP document. IMPORTANT: If I recall correctly, when making these
changes various dialog boxes will appear that allow you to make certain changes to the Exchange files. Do not highlight any Exchange files nor
folders whenever you see these options – simply hit “Okay” (or something like that). I actually do not understand what selecting these
changes does – but I know OWA will not work if these are changed.
- Extract WordPress to the wwwroot folder. When I just did this, the IUSR already had the required permissions on the folders. I did not have to jerk with the permissions on
the individual files and folders.
- Give the IUSR complete control of the wwwroot folder. Don’t fiddle with advanced permissions (don’t allow this change to be inherited
by child nodes, or, whatever the hell it’s called).
- Give the IUSR and IWAM users complete control of C:\WINDOWS\temp (otherwise, you can’t update nor install anything).
NOTE: I am going to include a theme and a database for use with WordPress. You can install the these to find further notes and videos on Server 2003 and Exchange.
- Premliminary Note On Exchange
- The first thing you need to do, before installing, is go to Add/Remove Programs > Windows Components and addSMTP
and NNTP to IIS. Double-click
Application Server, then double-click Internet Information Services (IIS) to get to the correct menu,
- Also, when you’re done, you’ll need to go to Windows Services and set IMAP4 and POP3 to start automatically. They’re disabled by default.
- Passwords: passwords acted funny. I’d swear that my password was happyMAN1023141. I’d typed the numbers with the cap lock off, but
I couldn’t log in unless it was on….
- Logins seem to work with either just a username (eg. “guy”) but sometimes require a complete email address.
- There are numerous warnings about Exchange having compatability issues with this (Server 2003 Enterprise) version of Windows when
the installation begins. They don’t seem to mean anything – it works fine.
- For mail to work add an A Record called “mail” for your domain. Then, create an MX Record with a name like “mail.webputzer.com”.
My mail server’s name was actually “dell.webputzer.com” – here’s a failure notice from 10 Minute Mail:
“The following recipient(s) could not be reached:
firstname.lastname@example.org on 7/30/2013 7:30 AM
The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient
directly to find out the correct address.
<dell.webputzer.com #5.1.1 smtp;550 5.1.1 <email@example.com>: Recipient address rejected: User unknown in
virtual alias table.
- Once Exchange is set up, you can install Service Pack Two and the included Hotfix.
- OLD NOTES
Various Quirks & Things
UPDATE: To add a mime-type, server-wide, right-click on the server in the IIS Manager and go to Properties > Mime Types
(a button). If you add them on a per-site basis you right-click on the site,
choose Properties > HTTP Headers (a tab) and you’ll see the MIME TYPES button.
The point is: they can be added server-wide, or, on individual sites. A bit weird: I think that I had to
add a mime type for .png images (it did not exist by default) – and I added one for mp4 video that worked…like so:
And, for one reason or another I keep forgetting where the hell this GUI/button thing resides…. I’m still fumbling – oddly, I suppose – with the simplistic, point-and-click nature of a Windows server! By the way, here’s the code which worked for me to get .flv files to play:
And here’s the damned thing I can never recall…. Open the IIS Manager and right click on your web site. Choose Properties > HTTP Headers (the tab) > MIME TYPES (a box near the bottom). A box will pop up and you enter the extension (eg. flv) and the sort of code I’ve mentioned above. Here’s a pic:
REALLY RANDOM NOTES…
This is a jumble, at the moment – just some random observations from a rank beginner…..I’ll clean it up later.
Windows Server 2003 and IIS 6 Basics
NOTE ABOUT THIS PAGE: This page could stand to be organized a bit better, but, it contains some useful information for getting IIS 6 running with PHP and MySQl – and, some other wildly general tips for getting WordPress permissions set up, etc. It has two sections which deal with installing PHP an MySQL. The first section is fairly general, the second is more detailed. In fact, at the bottom, some notes on MS Exchange have gotten mixed in! Anyway – this should be cleaned up – but it’s still useful…
Basic install + Active Directory
- Perform the OS installation, get drivers loaded etc.
- Set a static IP address manually.
- You’ll need the Server 2003 CD in the optical drive, or mounted, to proceed. Go to Server Manager and choose to add the Active Directory role. The routine will offer to set up your first active directory using various default values – at this embryonic point (for me), this option is fine. Choose a domain name which you own, and, which makes sense as a name for your local host. As I recall the computer reboots to finish this up.
NOTE ON ALLOWING AN XP-STYLE SHARED FOLDER: This isn’t something a lot of sysadmins wish to do, but for tinkering, I want to be able to copy files to Server 2003 from other computers. You need to go to “Manage > Users and Groups” and untick the box that says “Disable this account”. There will be a red check on the Guest account and it will be disabled, by default. Then, just create a shared folder and grant liberal permissions to the “Guest” user – you can always change this, of course…..
This presumes you’ve just installed Windows Server 2003 on your computer…
- Set a static IP manually – if you don’t, when you add the Active Directory role your box will be assigned a static IP on a weird subnet.
- Go to Server Manager and choose to add a role. By the way, you’ll need the installation CD in your disc drive for things like this…. Anyway, it will ask you if you want to add a “typical” first server role – the Active Directory. Say yes and just follow the prompts.
- This install will ask you for a domain name and, obviously, you need to pick something which makes sense…..(eg. “smallbusiness.local”, “netkwik.com” – whatever).
- When you’ve done the above, go to Server Manager and choose to add the Application Server role which, basically, is IIS and some associated things (ASP net, etc.).
- Now – to prepare for installing Exchange – go to Add/Remove Programs and go to the Windows Components area. Find Application Server and expand it; go to IIS and expand that; now enable SMTP and NNTP.
- I tinker a lot and I have been running the IIS default website on port 81. DO NOT put the default website on port 81 while installing Exchange. It may not hurt anything but I think it’s best left on port 8o until Exchange is installed.
- I would add a user if, for no other reason, to see what optins are available. Users are managed via the Active Directory Users and Groups menu (assuming you’ve installed the Active Directory).NOTE: Windows servers have requirements for user passwords which are different than Unix (which allows for any password you choose – for example, “pass”). You can’t do that on Windows. A password must contain a combination of upper and lower case characters and – I think – one or more numerals (I’ll check and update this thing). For instance, you need to use something like: headWAY721. Don’t worry, if you enter a password that doesn’t meet the requirements – of course – it will tell you…..
Be aware that you have to give the following two users significantly loose permissions in order to install things like Joomla, Drupal, WordPress, etc.:
As far as letting people just see these things, after they’re installed, I will need to tinker some more.
To start, stop, or restart the entire server, from a command prompt do the following:
Changing ports – as simple as point and click…
One pretty cool feature of IIS 6 is that you can run the damned thing and have sites on all sorts of ports… For instance – if I left this thing running: