search
HomePHP FrameworkWorkermanGraphical tutorial on deploying workerman to windows server

The following column workerman php tutorial will introduce you to the method of deploying workerman to the windows server. I hope it will be helpful to friends in need!

Graphical tutorial on deploying workerman to windows server

Both swoole and workerman can realize the function of instant messaging. Swoole is a PHP extension written in C language. It is more troublesome to configure, but the performance is still very powerful. These can Go to the official website and search it yourself. Another one is the Workerman framework! (Recommended: workerman tutorial)

It is indeed a framework written in PHP and uses things in PHP socket. If you are deploying the project to a Linux server, I think both are fine, but if you are using a Windows server, you will face a difficulty - swoole does not support the Windows environment.

Of course, if you have to arrange it, you can use docker, but it always feels a bit nondescript (not that docker is nondescript, docker is indeed powerful), so what should we do? ? At this time, the advantages of Workerman are highlighted! It can run on windows system.

Download this chat room project

workerman chat room: http://www.workerman.net/workerman-chat

Click start_for_win.bat and a black window will appear. Browse http://127.0.0.1:55151 in the browser and you can see the chat room page! But when we close the black window, we will find that there is nothing when browsing port 55151! When the project is actually deployed, I think this is very unsafe, so we need to find a way to implement the daemon process and run this bat file as a windows service. Next, I found nssm and used nssm to convert the bat into a service.

Download the nssm software first, just search for it on Baidu! After downloading, unzip a compressed package and find the 32/64-bit nssm corresponding to your own system (find the nssm under the path in the cmd window) and execute nssm install For example: nssm install workerman

Graphical tutorial on deploying workerman to windows server

Then press Enter to display the nssm configuration interface. Fill in the bat file address in your project in the interface, for example

Graphical tutorial on deploying workerman to windows server

Click install service , as shown in the figure

Graphical tutorial on deploying workerman to windows server

#When successful is displayed, it means that the service has been installed successfully! We can click My Computer->Management->Services to see if this service exists. As shown in the picture, I can already see the service named workerman!

Graphical tutorial on deploying workerman to windows server

But at this time, browsing http://127.0.0.1:55151 still cannot be browsed normally, because we have not turned on the service yet. Next, click the start button in the upper left corner. After the service is started, you can browse http://127.0.0.1:55151 normally!

The above is the detailed content of Graphical tutorial on deploying workerman to windows server. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:博客园. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.