一、lumen 项目安装测试

1.使用composer创建laravel项目

composer create-project --prefer-dist laravel/lumen yaomianweiblog 

执行次命令行之后会根据你当前的环境下载最为合适的项目结构 OK 将会看到下面的景象

Installing laravel/lumen (v5.2.1)
  - Installing laravel/lumen (v5.2.1): Downloading (100%)         
Created project in yaomianweiblog
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 64 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-util (v1.3.0): Downloading (100%)         
  - Installing symfony/polyfill-php56 (v1.3.0): Downloading (100%)         
  - Installing psr/log (1.0.2): Downloading (100%)         
  - Installing symfony/debug (v3.0.9): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.3.0): Downloading (100%)         
  - Installing symfony/http-foundation (v3.0.9): Downloading (100%)         
  - Installing symfony/event-dispatcher (v3.2.8): Downloading (100%)         
  - Installing symfony/http-kernel (v3.0.9): Downloading (100%)         
  - Installing paragonie/random_compat (v1.4.2): Downloading (100%)         
  - Installing nikic/fast-route (v0.7.0): Downloading (100%)         
  - Installing mtdowling/cron-expression (v1.2.0): Downloading (100%)         
  - Installing monolog/monolog (1.22.1): Downloading (100%)         
  - Installing doctrine/inflector (v1.1.0): Downloading (100%)         
  - Installing illuminate/contracts (v5.2.45): Downloading (100%)         
  - Installing illuminate/support (v5.2.45): Downloading (100%)         
  - Installing symfony/finder (v3.0.9): Downloading (100%)         
  - Installing illuminate/filesystem (v5.2.45): Downloading (100%)         
  - Installing illuminate/container (v5.2.45): Downloading (100%)         
  - Installing illuminate/events (v5.2.45): Downloading (100%)         
  - Installing illuminate/view (v5.2.45): Downloading (100%)         
  - Installing symfony/translation (v3.0.9): Downloading (100%)         
  - Installing illuminate/validation (v5.2.45): Downloading (100%)         
  - Installing illuminate/translation (v5.2.45): Downloading (100%)         
  - Installing nesbot/carbon (1.22.1): Downloading (100%)         
  - Installing symfony/process (v3.0.9): Downloading (100%)         
  - Installing symfony/console (v3.0.9): Downloading (100%)         
  - Installing illuminate/console (v5.2.45): Downloading (100%)         
  - Installing illuminate/queue (v5.2.45): Downloading (100%)         
  - Installing illuminate/pipeline (v5.2.45): Downloading (100%)         
  - Installing illuminate/pagination (v5.2.45): Downloading (100%)         
  - Installing illuminate/session (v5.2.45): Downloading (100%)         
  - Installing illuminate/http (v5.2.45): Downloading (100%)         
  - Installing illuminate/hashing (v5.2.45): Downloading (100%)         
  - Installing illuminate/encryption (v5.2.45): Downloading (100%)         
  - Installing illuminate/database (v5.2.45): Downloading (100%)         
  - Installing illuminate/config (v5.2.45): Downloading (100%)         
  - Installing illuminate/cache (v5.2.45): Downloading (100%)         
  - Installing illuminate/bus (v5.2.45): Downloading (100%)         
  - Installing illuminate/broadcasting (v5.2.45): Downloading (100%)         
  - Installing illuminate/auth (v5.2.45): Downloading (100%)         
  - Installing laravel/lumen-framework (v5.2.9): Downloading (100%)         
  - Installing vlucas/phpdotenv (v2.4.0): Downloading (100%)         
  - Installing fzaninotto/faker (v1.6.0): Downloading (100%)         
  - Installing symfony/yaml (v3.2.8): Downloading (100%)         
  - Installing sebastian/version (1.0.6): Downloading (100%)         
  - Installing sebastian/global-state (1.1.1): Downloading (100%)         
  - Installing sebastian/recursion-context (1.0.5): Downloading (100%)         
  - Installing sebastian/exporter (1.2.2): Downloading (100%)         
  - Installing sebastian/environment (1.3.8): Downloading (100%)         
  - Installing sebastian/diff (1.4.1): Downloading (100%)         
  - Installing sebastian/comparator (1.2.4): Downloading (100%)         
  - Installing doctrine/instantiator (1.0.5): Downloading (100%)         
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)         
  - Installing phpunit/phpunit-mock-objects (2.3.8): Downloading (100%)         
  - Installing phpunit/php-timer (1.0.9): Downloading (100%)         
  - Installing phpunit/php-file-iterator (1.4.2): Downloading (100%)         
  - Installing phpunit/php-token-stream (1.4.11): Downloading (100%)         
  - Installing phpunit/php-code-coverage (2.2.4): Downloading (100%)         
  - Installing webmozart/assert (1.2.0): Downloading (100%)         
  - Installing phpdocumentor/reflection-common (1.0): Downloading (100%)         
  - Installing phpdocumentor/type-resolver (0.2.1): Downloading (100%)         
  - Installing phpdocumentor/reflection-docblock (3.1.1): Downloading (100%)         
  - Installing phpspec/prophecy (v1.7.0): Downloading (100%)         
  - Installing phpunit/phpunit (4.8.35): Downloading (100%)         
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/browser-kit ()
symfony/http-kernel suggests installing symfony/class-loader ()
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/var-dumper ()
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
illuminate/support suggests installing jeremeamia/superclosure (Required to be able to serialize closures (~2.2).)
illuminate/support suggests installing symfony/var-dumper (Improves the dd function (2.8.*|3.0.*).)
illuminate/filesystem suggests installing league/flysystem (Required to use the Flysystem local and FTP drivers (~1.0).)
illuminate/filesystem suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (~1.0).)
illuminate/filesystem suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).)
symfony/translation suggests installing symfony/config ()
illuminate/console suggests installing guzzlehttp/guzzle (Required to use the ping methods on schedules (~5.3|~6.0).)
illuminate/queue suggests installing aws/aws-sdk-php (Required to use the SQS queue driver (~3.0).)
illuminate/queue suggests installing illuminate/redis (Required to use the Redis queue driver (5.2.*).)
illuminate/queue suggests installing pda/pheanstalk (Required to use the Beanstalk queue driver (~3.0).)
illuminate/database suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (~2.4).)
illuminate/cache suggests installing illuminate/redis (Required to use the redis cache driver (5.2.*).)
illuminate/broadcasting suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (~2.0).)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files

到这里就是下载完毕了(这里不得不提composer确实是很好用,但是装composer的过程确实非常蛋疼的!现在都觉得疼!)

2.测试项目运行 在测试之前有两件事很重要

1)修改项目的读写权限

sudo chmod -R 777  yaomianweiblog 

2 ) 在public目录中将$app->run() 修改为$app->run($app->request) (目前不知道原因有知道的朋友可以告诉我,感谢!)

做完这两件事之后,在web环境下你就可以访问当前项目首页了 http://localhost/project/yaomianweiblog/public/index.php如果出现 Lumen (5.2.9) (Laravel Components 5.2.*)这句话便说明已经成功了。至此项目初始工作完成第一步!

转载于:https://my.oschina.net/yaomianwei/blog/903980

你可能感兴趣的:(一、lumen 项目安装测试)