Installing Redis on Windows Server
Install Redis & Configure it with WinSW
1. Install PHP 8.2 Redis Extension
Click Here to download PHP 8.2 NTS x64 zip file.
- Unzip the php-redis zip file, a folder will be created, go inside the folder, copy the php_redis.dll file and paste it in C:\php8.2\ext. (C:\php\ext incase of Apache WebServer).
- Now enable php redis extension in php.ini configuration located in C:\php8.2. (C:\php incase of Apache WebServer).
extension=php_redis.dll
- Now go to Server Manager, open IIS Server and restart it. (or restart Apache incase of Apache WebServer)
2. Install Redis
Click Here to download last recent release of Redis.
Execute the installer to perform the required installation steps
- Accept the terms in the License agreement.
- Add the Redis installation folder to the PATH environment variable.
- Set the Max Memory Limit from 300-500 MB.
The Redis installation is finished.
- Now go to windows menu > Run > Services, This can be done by following shortcut win+R, type services.msc & click OK, it will open a new Services tab.
- Find Redis right click on it & go to Properties > Recovery a new tab will open.
- Change first failure, second failure & subsequent failure from Take No Action to Restart the Service & click OK.
Redis has been successfully installed, this can be confirmed in Command Prompt by typing redis-cli, a loopback address will be shown in the Command Prompt.
Install WinSW Service
Download WinSW Config File.
Unzip the WinSW-{version}.zip
file.
Go inside the folder & copy the WinSW folder & paste it in C:\ .
4. General Instructions to Create WinSW Services
NOTE: These are the General Instructions to create WinSW Services for Faveo. The actual ones are listed below as Faveo-Mail-Worker, Faveo-Recurring, Faveo-Reports, Faveo-Notifications & Faveo Deactivation.
Go to Command Prompt and configure WinSW-SERVICE by typing the following commands. (Faveo-Mail-Worker, Faveo-Recurring, Faveo-Reports, Faveo-Notifications & Faveo-Deactivation are to be configured in actual).
- Install your application as a service using the following command:
winsw install
This will register your application as a Windows service.
Verifying the Installation
After installing the service, you can use standard service management commands to control it. For example:
- Start the service:
winsw start
- Checks the status of the service.
winsw status
- Stop the service:
winsw stop
- Restart the service:
winsw restart
Uninstalling a Service
If you need to remove the service:
Uninstall the service using the following command:
winsw uninstall
Follow the below steps to create WinSW Services for Faveo-Mail-Worker, Faveo-Recurring, Faveo-Reports, Faveo-Notifications & Faveo Deactivation.
- FAVEO WORKER
Open a Command Prompt window with administrator privileges.
Navigate to the directory containing the WinSW executable and your application files using the cd command.
cd C:\WinSW\Faveo-Mail-Worker
Install your application as a service using the following command:
winsw install
Start the service:
winsw start
- FAVEO RECURRING
Open a Command Prompt window with administrator privileges.
Navigate to the directory containing the WinSW executable and your application files using the cd command.
cd C:\WinSW\Faveo-Recurring
Install your application as a service using the following command:
winsw install
Start the service:
winsw start
- FAVEO REPORTS
Open a Command Prompt window with administrator privileges.
Navigate to the directory containing the WinSW executable and your application files using the cd command.
cd C:\WinSW\Faveo-Reports
Install your application as a service using the following command:
winsw install
Start the service:
winsw start
- FAVEO NOTIFICATIONS
Open a Command Prompt window with administrator privileges.
Navigate to the directory containing the WinSW executable and your application files using the cd command.
cd C:\WinSW\Faveo-Notifications
Install your application as a service using the following command:
winsw install
Start the service:
winsw start
- FAVEO DEACTIVATYE AGENTS
Open a Command Prompt window with administrator privileges.
Navigate to the directory containing the WinSW executable and your application files using the cd command.
cd C:\WinSW\Faveo-Deactivation
Install your application as a service using the following command:
winsw install
Start the service:
winsw start
Open service manager and check status of all the services configured by WinSW.