In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to deploy and run workerman on docker. It is very detailed and has a certain reference value. Friends who are interested must read it!
Deploy the gatawayWorker project on docker, using mysql,redis in the project.
Install mysql
Pull the image
Docker pull mysql:5.7
Run the container
Docker run-d-p 3306 name m_mysql mysql:5.7 3306-e MYSQL_ROOT_PASSWORD=root
-d running in the background
-p port mapping, the front is the host port, and the back is the container port to be mapped
-e sets the environment variable, and MYSQL_ROOT_PASSWORD is the initial password of the root user of mysql
-the name of the name container is unique
Enter the container
Abbreviated description of the docker exec-it m_mysql / bin/bash option-detach-d runs the container in the background and prints the container id. -interactive-i keeps the standard input open even if it is not connected, usually used with-t. -tty-t assigns a pseudo tty, which is usually used with-I.
Mysql remote connection Settings
Mysql-uroot-prootuse mysqlGRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' root' WITH GRANT OPTION;FLUSH PRIVILEGES
So that you can connect through the public network.
Install php
Pull the image
Docker pull php:7.3-cli
Running
Docker run-- name myphp-p 8282 php:7.3-fpm 8282-v / home/wwwroot:/www-d php:7.3-fpm
-p add host-to-container port mapping to map out the 8282 needed, and multiple ports can be used multiple times-p
-v add directory mapping to put the project under / home/wwwroot, which will automatically appear in the container
The environment required to install workerman
Apt-get install libevent-devapt-get install libevent-devdocker-php-ext-install pcntl socketsdocker-php-ext-install eventdocker-php-ext-install pdo_mysqldocker-php-ext-install redis
Start workerman
Php start.php start-d
These are all the contents of the article "how to deploy and run workerman on docker". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.