Install Cerb on Microsoft Windows Server 2022
Introduction
This guide will walk you through preparing a Microsoft Windows Server 2022 server for installing Cerb, including IIS, PHP, and MySQL.
- Provision a Microsoft Windows Server 2022 server
- Connect to your server
- Install IIS
- Install PHP with Web Platform Installer
- Install the PHP mailparse extension
- Install the YAML extension
- Install MySQL
- Configure PHP
- Download Cerb from Git Shell
- Permissions
- Run the Cerb installer
- Next Steps
Provision a Microsoft Windows Server 2022 server
If you don’t already have a server, you can create an EC2 instance in Amazon Web Services.
This guide uses the following Amazon Machine Image (AMI):
Windows_Server-2022-English-Full-Base-2022.07.13 (ami-0648d932874575779
)
Connect to your server
Connect to your server using Remote Desktop Protocol (RDP).
If you’re using AWS, go to the EC2 console, Instances, select your instance, and choose Security » Get Windows Password from the instances menu.
Install IIS
-
Start » Server Manager
-
Add roles and features
-
Role-based or feature-based installation
-
Web Server (IIS)
-
Include Application Development » CGI
Install PHP with Web Platform Installer
-
Navigate to: https://docs.microsoft.com/en-us/iis/install/web-platform-installer/web-platform-installer-direct-downloads
-
Download and install WebPI 5.1 x64
Install PHP
-
Start » Microsoft Web Platform Installer
-
Search » PHP 8.0.0 (x64) » Add
-
Click the Install button.
Install Git
-
Start » Microsoft Web Platform Installer
-
Search » Git for Windows
-
Click the Install button.
Install the PHP mailparse extension
Copy php_mailparse.dll
to C:\Program Files\PHP\v8.0\ext\
Install the YAML extension
https://windows.php.net/downloads/pecl/releases/yaml/2.2.2/php_yaml-2.2.2-8.0-nts-vs16-x64.zip
Copy php_yaml.dll
to C:\Program Files\PHP\v8.0\ext\
Install MySQL
(Windows Platform Installer / Server Manager)
https://dev.mysql.com/downloads/installer/
Download MySQL 8.0.29+.
Install MySQL Server.
Server Configuration: Server Computer
Use Legacy Authentication Method (MySQL 5.x compatible)
Set a MySQL root password.
Create a database and user
Start » MySQL 8.0 Command Line Client
Enter your root password.
CREATE DATABASE cerb CHARACTER SET utf8;
CREATE USER cerb@localhost IDENTIFIED BY 's3cr3t';
GRANT ALL PRIVILEGES ON cerb.* TO cerb@localhost;
QUIT;
Replace s3cr3t above with your own secret password. If you're using a remote database server, replace @localhost with a subnet used by your web servers, like: @'10.0.0.%'
Configure PHP
Edit C:\Program Files\PHP\v8.0\php.ini
extension=php_curl.dll
extension=php_gd.dll
extension=php_mbstring.dll
extension=php_mysqli.dll
extension=php_openssl.dll
extension=php_mailparse.dll
extension=php_tidy.dll
extension=php_yaml.dll
Start » Command Prompt
iisreset /restart
exit
Download Cerb from Git Shell
Start » Git Bash
cd /c/inetpub/wwwroot/
git clone https://github.com/cerb/cerb-release.git cerb
cd cerb
Permissions
Start » File Explorer
Navigate to C:\inetpub\www\root\cerb\storage\
Properties » Security
IUSR » Full Control » Recursively
Run the Cerb installer
Type the hostname of your server (e.g. http://localhost/cerb/
) into a browser and follow the guided installer.
Next Steps
Set up Friendly URLs.
Read the Security Best Practices.