Hyperf official website 1. Docker usage
$ docker search hyperf $ docker pull hyperf/hyperf $ docker run -v $PWD/:/hyperf-skeleton -p 9501:9501 -it --entrypoint /bin/sh hyperf/hyperf $ cd hyperf-skeleton 2. After the image container is running, install Composer in the container First download Composer into the docker container $ wget https://mirrors.aliyun.com/composer/composer.phar 3. Modify execution permissions This operation is to solve the limitation that Composer does not allow root permissions to execute At the same time, when switching users, you can directly operate 777 authorization is not recommended in production environments $ chmod -R 777 ./composer.phar 4. Move composer to the bin directory and rename it to composer 777 authorization is not recommended in production environments $ mv composer.phar /usr/local/bin/composer 5. Change the root password At the same time, because we don't know the root password, we need to enter it twice to change the password, and it will not be displayed. Please note $ passwd root 6. You can check the Linux distribution version (the command will be different) The official image is Linux alpine $ cat /etc/os-release 7. Create a group with a specified GID The official image is Linux alpine. The commands are different from the Centos commands used by many friends. If you have created your own image, just follow the distribution version command. $ addgroup -g 10001 -S www 8. Create a user with a specified UID Specify the shell so that it belongs to the specified user group. $ adduser www -u 20001 -D -S -s /bin/bash -G www 9. Allow the newly created user to use su - to the root user, $ chmod 4755 /bin/busybox 10. Switch to www user and execute composer su www switch user $ su www $ whoami 11. Set the Composer image to Alibaba Cloud image to speed up domestic downloads Of course, whether to use Alibaba Cloud images depends on personal needs (no advertising suspicion) $ composer config -g repo.packagist composer https://mirrors.aliyun.com/composer 12. Install the hyperf skeleton via Composer When installing, choose according to your personal needs! $ composer create-project hyperf/hyperf-skeleton 13. Check the configuration and other information In general, the official source images of hyperf are configured. The following is just a command to view swoole $ php --ri swoole $ php -i | grep ini 14. Write the following information in php.ini Pay special attention to the capital O in Off. extension="grpc.so" extension="redis.so" extension="swoole.so" swoole.use_shortname = 'Off' 15. Extensions with compatibility issues
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of how to monitor MySQL statements
>>: Implementation of Portals and Error Boundary Handling in React
I encountered a problem today: Can I use the as a...
HTML form tag tutorial, this section mainly expla...
Table of contents 1. Baidu Encyclopedia 1. MySQL ...
Congratulations on finally convincing your bosses...
6 solutions for network failure in Docker contain...
1. Introduction to VMware vSphere VMware vSphere ...
1. First, you need to use the target selector of ...
1. Service method Check the firewall status: [roo...
This article example shares the specific code of ...
Dimensionality reduction of two-dimensional array...
Preface When a 403 cross-origin error occurs No &...
First, let me explain that what we want to do is ...
1. An error (1064) is reported when using mysqldu...
Using flex layout, if it is a nine-square grid, i...
Copy code The code is as follows: <HTML> &l...