hyperf: 安装

一,官网:

https://www.hyperf.io/

 

二,安装:

composer create-project hyperf/hyperf-skeleton

问到的一些问题和我的设置:

Creating a "hyperf/hyperf-skeleton" project at "./hyperf-skeleton"
Installing hyperf/hyperf-skeleton (v3.1.2)
  - Downloading hyperf/hyperf-skeleton (v3.1.2)
  - Installing hyperf/hyperf-skeleton (v3.1.2): Extracting archive
Created project in /data/hyperf/hyperf-skeleton
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
> Installer\Script::install
Setting up optional packages
Setup data and cache dir
Removing installer development dependencies

  What time zone do you want to setup ?
  [n] Default time zone for php.ini
Make your selection or type a time zone name, like Asia/Shanghai (n):
Asia/Shanghai

  Do you want to use Database (MySQL Client) ?
  [y] yes
  [n] None of the above
  Make your selection or type a composer package name and version (yes): y
  - Adding package hyperf/database (~3.1.0)
  - Adding package hyperf/db-connection (~3.1.0)

  Do you want to use Redis Client ?
  [y] yes
  [n] None of the above
  Make your selection or type a composer package name and version (yes): y
  - Adding package hyperf/redis (~3.1.0)
  - Copying config/autoload/redis.php

  Which RPC protocol do you want to use ?
  [1] JSON RPC with Service Governance
  [2] JSON RPC
  [3] gRPC
  [n] None of the above
  Make your selection or type a composer package name and version (n): n

  Which config center do you want to use ?
  [1] Apollo
  [2] Aliyun ACM
  [3] ETCD
  [4] Nacos
  [n] None of the above
  Make your selection or type a composer package name and version (n): n

  Do you want to use hyperf/constants component ?
  [y] yes
  [n] None of the above
  Make your selection (n): y
  - Adding package hyperf/constants (~3.1.0)
  - Copying app/Constants/ErrorCode.php
  - Copying app/Exception/BusinessException.php

  Do you want to use hyperf/async-queue component ? (A simple redis queue component)
  [y] yes
  [n] None of the above
  Make your selection or type a composer package name and version (n): n

  Do you want to use hyperf/amqp component ?
  [y] yes
  [n] None of the above
  Make your selection or type a composer package name and version (n): n

  Do you want to use hyperf/model-cache component ?
  [y] yes
  [n] None of the above
  Make your selection or type a composer package name and version (n): n

  Do you want to use hyperf/elasticsearch component ?
  [y] yes
  [n] None of the above
  Make your selection or type a composer package name and version (n): y
  - Adding package hyperf/elasticsearch (~3.1.0)

  Do you want to use hyperf/tracer component ? (An open tracing protocol component, adapte with Zipkin etc.)
  [y] yes
  [n] None of the above
  Make your selection or type a composer package name and version (n): n

启动项目:

$ cd hyperf-skeleton/
$ php bin/hyperf.php start

查看效果:

访问9501端口:

例如:

http://192.168.219.6:9501/

返回:

 

posted @   刘宏缔的架构森林  阅读(24)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
点击右上角即可分享
微信分享提示