[langhuaili@localhost hyperf]$ sudo yum install docker [sudo] password for langhuaili: Sorry, try again. [sudo] password for langhuaili: Fedora Modular 31 - x86_64 3.7 kB/s | 6.0 kB 00:01 Fedora Modular 31 - x86_64 - Updates 1.2 kB/s | 5.8 kB 00:04 Fedora 31 - x86_64 - Updates 2.4 kB/s | 3.8 kB 00:01 Fedora 31 - x86_64 1.3 kB/s | 6.1 kB 00:04 Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: moby-engine x86_64 19.03.11-1.ce.git42e35e6.fc31 updates 40 M Installing dependencies: containerd x86_64 1.3.3-1.fc31 updates 33 M 安装出现尚需两个文件 分别是引擎和依赖 [langhuaili@localhost hyperf]$ docker run -v /tmp/skeleton:/hyperf-skeleton -p 9501:9501 -it --entrypoint /bin/sh hyperf/hyperf:latest docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. See 'docker run --help'. 无法连接上docker 经过查找 发现是docker服务未启动 于是输入命令 [langhuaili@localhost hyperf]$ service docker start Redirecting to /bin/systemctl start docker.service 重新运行hyperf安装命令 [langhuaili@localhost hyperf]$ docker run -v /tmp/skeleton:/hyperf-skeleton -p 9501:9501 -it --entrypoint /bin/sh hyperf/hyperf:latest docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'. 显示权限不足 无法连接 于是给cocker用户重新授权 使用sudo再做一次 [langhuaili@localhost hyperf]$ sudo docker run -v /tmp/skeleton:/hyperf-skeleton -p 9501:9501 -it --entrypoint /bin/sh hyperf/hyperf:latest Unable to find image 'hyperf/hyperf:latest' locally latest: Pulling from hyperf/hyperf 31603596830f: Pull complete 697a7996d26d: Pull complete fadbd2e99347: Pull complete Digest: sha256:133662bcd066f1826d44a971d876d3ca65910f0fbc881212526a5ef1c08c2502 Status: Downloaded newer image for hyperf/hyperf:latest docker: Error response from daemon: OCI runtime create failed: this version of runc doesn't work on cgroups v2: unknown. ERRO[0041] error waiting for container: context canceled 发现新的问题 OCI环境创建出错 经过查找 是系统的版本跟跟docker无法对上 更新下系统内核或者需要对docker降版本 但是docker的 y依赖性很强 所以最好不要降版本 直接更新内核吧 sudo yum update 文件更新较多 有多大1.2G 使用composer需要在非root用户下 然后创建用户langhuai 执行composer发现无权限 然后将composer在root用户下授权给langhuai composer安装 [UnexpectedValueException] RecursiveDirectoryIterator::__construct(//hyperf-skeleton): failed to open dir: Permission denied 发现 现有目录无权限 创建新的目录 并授权 切换到普通用户 在新的目录中安装 dev_code $ composer create-project hyperf/hyperf-skeleton Installing hyperf/hyperf-skeleton (v2.0.0) - Installing hyperf/hyperf-skeleton (v2.0.0): Downloading (100%) Created project in /dev_code/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): n 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): 1 - Adding package hyperf/json-rpc (~2.0.0) - Adding package hyperf/rpc (~2.0.0) - Adding package hyperf/rpc-client (~2.0.0) - Adding package hyperf/rpc-server (~2.0.0) - Adding package hyperf/service-governance (~2.0.0) Which config center do you want to use ? [1] Apollo [2] Aliyun ACM [n] None of the above Make your selection or type a composer package name and version (n): 1 - Adding package hyperf/config-apollo (~2.0.0) - Copying config/autoload/apollo.php Do you want to use hyperf/constants component ? [1] yes [n] None of the above Make your selection (n): 1 - Adding package hyperf/constants (~2.0.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) [1] yes [n] None of the above Make your selection or type a composer package name and version (n): 1 - Adding package hyperf/async-queue (~2.0.0) - Copying config/autoload/async_queue.php - Copying app/Process/AsyncQueueConsumer.php - Copying app/Listener/QueueHandleListener.php Do you want to use hyperf/amqp component ? [1] yes [n] None of the above Make your selection or type a composer package name and version (n): 1 - Adding package hyperf/amqp (~2.0.0) - Copying config/autoload/amqp.php Do you want to use hyperf/model-cache component ? [1] yes [n] None of the above Make your selection or type a composer package name and version (n): 1 - Adding package hyperf/model-cache (~2.0.0) - Copying app/Model/Model.php - Copying config/autoload/databases.php Do you want to use hyperf/elasticsearch component ? [1] yes [n] None of the above Make your selection or type a composer package name and version (n): 1 - Adding package hyperf/elasticsearch (~2.0.0) Do you want to use hyperf/tracer component ? (A open tracing protocol component, adapte with Zipkin etc.) [1] yes [n] None of the above Make your selection or type a composer package name and version (n): 1 - Adding package hyperf/tracer (~2.0.0) - Copying config/autoload/opentracing.php Remove installer Removing composer.lock from .gitignore Removing Expressive installer classes, configuration, tests and docs Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 145 installs, 0 updates, 0 removals - Installing hyperf/contract (v2.0.0): Downloading (100%) - Installing doctrine/inflector (1.4.3): Downloading (100%) - Installing hyperf/utils (v2.0.0): Downloading (100%) - Installing psr/simple-cache (1.0.1): Downloading (100%) - Installing psr/container (1.0.0): Downloading (100%) - Installing hyperf/cache (v2.0.0): Downloading (100%) - Installing symfony/finder (v5.1.2): Downloading (100%) - Installing symfony/polyfill-ctype (v1.17.1): Downloading (100%) - Installing phpoption/phpoption (1.7.4): Downloading (100%) - Installing vlucas/phpdotenv (v4.1.7): Downloading (100%) - Installing hyperf/config (v2.0.0): Downloading (100%) - Installing psr/log (1.1.3): Downloading (100%) - Installing psr/event-dispatcher (1.0.0): Downloading (100%) - Installing fig/http-message-util (1.1.4): Downloading (100%) - Installing psr/http-message (1.0.1): Downloading (100%) - Installing hyperf/framework (v2.0.0): Downloading (100%) - Installing monolog/monolog (2.1.0): Downloading (100%) - Installing hyperf/logger (v2.0.0): Downloading (100%) - Installing hyperf/memory (v2.0.0): Downloading (100%) - Installing hyperf/pool (v2.0.0): Downloading (100%) - Installing hyperf/redis (v2.0.0): Downloading (100%) - Installing hyperf/rpc (v2.0.0): Downloading (100%) - Installing laminas/laminas-zendframework-bridge (1.0.4): Downloading (connecDownloading (100%) - Installing laminas/laminas-stdlib (3.2.1): Downloading (100%) - Installing laminas/laminas-mime (2.7.4): Downloading (100%) - Installing hyperf/http-message (v2.0.0): Downloading (100%) - Installing markrogoyski/math-php (v0.49.0): Downloading (100%) - Installing hyperf/load-balancer (v2.0.0): Downloading (100%) - Installing hyperf/json-rpc (v2.0.0): Downloading (100%) - Installing nikic/php-parser (v4.5.0): Downloading (100%) - Installing phpdocumentor/reflection-common (2.2.0): Downloading (connecting.Downloading (100%) - Installing phpdocumentor/type-resolver (1.3.0): Downloading (100%) - Installing webmozart/assert (1.9.0): Downloading (100%) - Installing phpdocumentor/reflection-docblock (5.1.0): Downloading (connectinDownloading (100%) - Installing jetbrains/phpstorm-stubs (v2019.3): Downloading (100%) - Installing roave/signature (1.0.0): Downloading (100%) - Installing roave/better-reflection (4.3.0): Downloading (100%) - Installing hyperf/rpc-client (v2.0.0): Downloading (100%) - Installing symfony/polyfill-php80 (v1.17.1): Downloading (100%) - Installing symfony/polyfill-mbstring (v1.17.1): Downloading (100%) - Installing symfony/polyfill-intl-normalizer (v1.17.1): Downloading (connectiDownloading (100%) - Installing symfony/polyfill-intl-grapheme (v1.17.1): Downloading (connectingDownloading (100%) - Installing symfony/string (v5.1.2): Downloading (100%) - Installing symfony/service-contracts (v2.1.2): Downloading (100%) - Installing symfony/polyfill-php73 (v1.17.1): Downloading (100%) - Installing symfony/console (v5.1.2): Downloading (100%) - Installing hyperf/server (v2.0.0): Downloading (100%) - Installing psr/http-server-handler (1.0.1): Downloading (100%) - Installing psr/http-server-middleware (1.0.1): Downloading (100%) - Installing hyperf/dispatcher (v2.0.0): Downloading (100%) - Installing hyperf/exception-handler (v2.0.0): Downloading (100%) - Installing hyperf/event (v2.0.0): Downloading (100%) - Installing nikic/fast-route (v1.3.0): Downloading (100%) - Installing hyperf/http-server (v2.0.0): Downloading (100%) - Installing hyperf/rpc-server (v2.0.0): Downloading (100%) - Installing symfony/polyfill-php72 (v1.17.0): Downloading (100%) - Installing symfony/polyfill-intl-idn (v1.17.1): Downloading (100%) - Installing ralouphie/getallheaders (3.0.3): Downloading (100%) - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%) - Installing guzzlehttp/promises (v1.3.1): Downloading (100%) - Installing guzzlehttp/guzzle (6.5.5): Downloading (100%) - Installing hyperf/guzzle (v2.0.0): Downloading (100%) - Installing hyperf/consul (v2.0.0): Downloading (100%) - Installing hyperf/service-governance (v2.0.0): Downloading (100%) - Installing hyperf/config-apollo (v2.0.0): Downloading (100%) - Installing doctrine/instantiator (1.3.1): Downloading (100%) - Installing php-di/phpdoc-reader (2.1.1): Downloading (100%) - Installing doctrine/lexer (1.2.1): Downloading (100%) - Installing doctrine/annotations (1.10.3): Downloading (100%) - Installing hyperf/di (v2.0.0): Downloading (100%) - Installing hyperf/constants (v2.0.0): Downloading (100%) - Installing hyperf/command (v2.0.0): Downloading (100%) - Installing hyperf/async-queue (v2.0.0): Downloading (100%) - Installing phpseclib/phpseclib (2.0.27): Downloading (100%) - Installing php-amqplib/php-amqplib (v2.11.3): Downloading (100%) - Installing hyperf/process (v2.0.0): Downloading (100%) - Installing hyperf/amqp (v2.0.0): Downloading (100%) - Installing symfony/translation-contracts (v2.1.2): Downloading (connecting..Downloading (100%) - Installing symfony/translation (v5.1.2): Downloading (100%) - Installing nesbot/carbon (2.35.0): Downloading (100%) - Installing hyperf/paginator (v2.0.0): Downloading (100%) - Installing hyperf/database (v2.0.0): Downloading (100%) - Installing hyperf/model-listener (v2.0.0): Downloading (100%) - Installing hyperf/db-connection (v2.0.0): Downloading (100%) - Installing hyperf/model-cache (v2.0.0): Downloading (100%) - Installing ezimuel/guzzlestreams (3.0.1): Downloading (100%) - Installing react/promise (v2.8.0): Downloading (100%) - Installing ezimuel/ringphp (1.1.2): Downloading (100%) - Installing elasticsearch/elasticsearch (v7.8.0):Downloading (100%) ) - Installing hyperf/elasticsearch (v2.0.0): Downloading (100%) - Installing opentracing/opentracing (1.0.0-beta5): Downloading (connecting...Downloading (100%) - Installing openzipkin/zipkin (1.3.6): Downloading (100%) - Installing jcchavezs/zipkin-opentracing (0.1.5):Downloading (100%) ) - Installing hyperf/tracer (v2.0.0): Downloading (100%) - Installing swoole/ide-helper (4.5.2): Downloading (100%) - Installing composer/xdebug-handler (1.4.2): Downloading (100%) - Installing symfony/filesystem (v5.1.2): Downloading (100%) - Installing symfony/deprecation-contracts (v2.1.2): Downloading (connecting..Downloading (100%) - Installing symfony/config (v5.1.2): Downloading (100%) - Installing symfony/dependency-injection (v5.1.2): Downloading (connecting...Downloading (100%) - Installing pdepend/pdepend (2.8.0): Downloading (100%) - Installing phpmd/phpmd (2.8.2): Downloading (100%) - Installing symfony/stopwatch (v5.1.2): Downloading (100%) - Installing symfony/process (v5.1.2): Downloading (100%) - Installing paragonie/random_compat (v9.99.99): Downloading (100%) - Installing symfony/polyfill-php70 (v1.17.1): Downloading (100%) - Installing symfony/options-resolver (v5.1.2): Downloading (100%) - Installing symfony/event-dispatcher-contracts (v2.1.2): Downloading (connectDownloading (100%) - Installing symfony/event-dispatcher (v5.1.2): Downloading (100%) - Installing php-cs-fixer/diff (v1.3.0): Downloading (100%) - Installing composer/semver (1.5.1): Downloading (100%) - Installing friendsofphp/php-cs-fixer (v2.16.4): Downloading (100%) - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%) - Installing mockery/mockery (1.3.1): Downloading (100%) - Installing doctrine/reflection (1.2.1): Downloading (100%) - Installing doctrine/event-manager (1.1.0): Downloading (100%) - Installing doctrine/collections (1.6.5): Downloading (100%) - Installing doctrine/cache (1.10.1): Downloading (100%) - Installing doctrine/persistence (1.3.7): Downloading (100%) - Installing doctrine/common (2.13.3): Downloading (100%) - Installing phpstan/phpstan (0.12.31): Downloading (100%) - Installing hyperf/devtool (v2.0.0): Downloading (100%) - Installing sebastian/version (2.0.1): Downloading (100%) - Installing sebastian/resource-operations (2.0.1): Downloading (connecting...Downloading (100%) - Installing sebastian/recursion-context (3.0.0): Downloading (100%) - Installing sebastian/object-reflector (1.1.1): Downloading (100%) - Installing sebastian/object-enumerator (3.0.3): Downloading (100%) - Installing sebastian/global-state (2.0.0): Downloading (100%) - Installing sebastian/exporter (3.1.2): Downloading (100%) - Installing sebastian/environment (4.2.3): Downloading (100%) - Installing sebastian/diff (3.0.2): Downloading (100%) - Installing sebastian/comparator (3.0.2): Downloading (100%) - Installing phpunit/php-timer (2.1.2): Downloading (100%) - Installing phpunit/php-text-template (1.2.1): Downloading (100%) - Installing phpunit/php-file-iterator (2.0.2): Downloading (100%) - Installing theseer/tokenizer (1.1.3): Downloading (100%) - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (connectiDownloading (100%) - Installing phpunit/php-token-stream (3.1.1): Downloading (100%) - Installing phpunit/php-code-coverage (6.1.4): Downloading (100%) - Installing phpspec/prophecy (v1.10.3): Downloading (100%) - Installing phar-io/version (2.0.1): Downloading (100%) - Installing phar-io/manifest (1.0.3): Downloading (100%) - Installing myclabs/deep-copy (1.10.1): Downloading (100%) - Installing phpunit/phpunit (7.5.20): Downloading (100%) - Installing hyperf/testing (v2.0.0): Downloading (100%) hyperf/utils suggests installing symfony/var-dumper (Required to use the dd function (^5.0).) hyperf/utils suggests installing symfony/serializer (Required to use SymfonyNormalizer (^5.0)) hyperf/utils suggests installing symfony/property-access (Required to use SymfonyNormalizer (^5.0)) monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required)) monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver)) monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library)) monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) 成功进入安装程序