{"id":917,"date":"2014-09-08T00:49:16","date_gmt":"2014-09-07T15:49:16","guid":{"rendered":"http:\/\/tech.akat.info\/?p=917"},"modified":"2014-09-25T02:40:19","modified_gmt":"2014-09-24T17:40:19","slug":"%e3%80%90%e4%bd%9c%e6%88%90%e4%b8%ad%e3%80%91debian-composer","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=917","title":{"rendered":"debian + Composer"},"content":{"rendered":"<p><a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/09\/Screenshot-2014-09-25-at-02.12.20.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/09\/Screenshot-2014-09-25-at-02.12.20.png\" alt=\"Screenshot 2014-09-25 at 02.12.20\" width=\"720\" height=\"155\" class=\"alignnone size-full wp-image-1059\" \/><\/a><\/p>\n<h1>Composer\u3068\u306f<\/h1>\n<p>PHP\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb<br \/>\nPHP\u3067\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPEAR\u304c\u3088\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u305f<br \/>\n\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u306b\u3088\u3063\u3066\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u7ba1\u7406\u3057\u3084\u3059\u304f\u306a\u308a\u3001\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3082\u7c21\u5358\u306b\u306a\u308b<\/p>\n<h2>\u30e1\u30ea\u30c3\u30c8<\/h2>\n<ul>\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8(\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\u3054\u3068\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u3001\u305d\u306e\u305f\u3081\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3054\u3068\u306b\u3042\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u308f\u3051\u308b\u3053\u3068\u304c\u53ef\u80fd\u3002(PEAR\u306fOS\u5168\u4f53\u306b\u5f71\u97ff\u3059\u308b)<\/li>\n<li>\u30af\u30e9\u30b9\u30aa\u30fc\u30c8\u30ed\u30fc\u30c7\u30a3\u30f3\u30b0(\u30af\u30e9\u30b9\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u3068\u305d\u308c\u306b\u5fdc\u3058\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u7684\u306b\u8aad\u307f\u3053\u3080)\u6a5f\u80fd\u304c\u5229\u7528\u53ef\u80fd\u3002require\u3084include\u306a\u3069\u3092\u8a18\u8ff0\u3057\u306a\u304f\u3066\u3088\u304f\u306a\u308b<\/li>\n<\/ul>\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/usr\/local\/sbin# curl -sS https:\/\/getcomposer.org\/installer | php\r\nbash: php: \u30b3\u30de\u30f3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\r\nbash: curl: \u30b3\u30de\u30f3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\r\nroot@hostname:\/usr\/local\/sbin# aptitude install  curl php5-cli\r\n\u4ee5\u4e0b\u306e\u65b0\u898f\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059:\r\n  curl php5-cli\r\n...\r\nroot@hostname:\/usr\/local\/sbin# curl -sS https:\/\/getcomposer.org\/installer | php # -s:\u4e0d\u8981\u306a\u30d7\u30ed\u30b0\u30ec\u30b9\u30e1\u30fc\u30bf\u3092\u51fa\u529b\u3057\u306a\u3044\r\n#!\/usr\/bin\/env php\r\nAll settings correct for using Composer\r\nDownloading...\r\n\r\nComposer successfully installed to: \/usr\/local\/sbin\/composer.phar\r\nUse it: php composer.phar\r\nroot@hostname:\/usr\/local\/sbin# ls | grep composer\r\ncomposer.phar\r\nroot@hostname:\/usr\/local\/sbin# cd \/var\/www\/akat.info\/test\/composer\r\n### \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb(composer.json)\u3092\u4f5c\u6210 ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# vi composer.json\r\n=====\r\n{\r\n    &quot;require&quot;: {\r\n        &quot;monolog\/monolog&quot;: &quot;1.2.*&quot;\r\n    }\r\n}\r\n=====\r\n### composer.json\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u3001\u4f9d\u5b58\u30d1\u30c3\u30b1\u30fc\u30b8\u306a\u3069\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b9f\u65bd\u3059\u308b ###\r\noot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar install\r\nLoading composer repositories with package information\r\nInstalling dependencies (including require-dev)\r\n  - Installing monolog\/monolog (1.2.1)\r\n    Downloading: 100%         \r\n\r\nmonolog\/monolog suggests installing mlehner\/gelf-php (Allow sending log messages to a GrayLog2 server)\r\nmonolog\/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))\r\nmonolog\/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)\r\nWriting lock file\r\nGenerating autoload files\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# tree -L 2\r\n.\r\n\u251c\u2500\u2500 composer.json\r\n\u251c\u2500\u2500 composer.lock # \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8a18\u9332\u3059\u308b\r\n\u2514\u2500\u2500 vendor # \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\r\n    \u251c\u2500\u2500 autoload.php\r\n    \u251c\u2500\u2500 composer\r\n    \u2514\u2500\u2500 monolog\r\n\r\n3 directories, 3 files\r\n<\/pre>\n<h1>\u30b3\u30de\u30f3\u30c9<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n### help\u306e\u8868\u793a ###\r\nroot@hostname:\/var\/www\/akat.info\/test# \/usr\/local\/sbin\/composer.phar -help\r\n   ______\r\n  \/ ____\/___  ____ ___  ____  ____  ________  _____\r\n \/ \/   \/ __ \\\/ __ `__ \\\/ __ \\\/ __ \\\/ ___\/ _ \\\/ ___\/\r\n\/ \/___\/ \/_\/ \/ \/ \/ \/ \/ \/ \/_\/ \/ \/_\/ (__  )  __\/ \/\r\n\\____\/\\____\/_\/ \/_\/ \/_\/ .___\/\\____\/____\/\\___\/_\/\r\n                    \/_\/\r\nComposer version eba04dc211f794d6f3a5500cfcfb9f9c0efcefbc 2014-09-24 13:38:16\r\n\r\nUsage:\r\n  &#x5B;options] command &#x5B;arguments]\r\n\r\nOptions:\r\n  --help           -h Display this help message.\r\n  --quiet          -q Do not output any message.\r\n  --verbose        -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\r\n  --version        -V Display this application version.\r\n  --ansi              Force ANSI output.\r\n  --no-ansi           Disable ANSI output.\r\n  --no-interaction -n Do not ask any interactive question.\r\n  --profile           Display timing and memory usage information\r\n  --working-dir    -d If specified, use the given directory as working directory.\r\n\r\nAvailable commands:\r\n  about            Short information about Composer\r\n  archive          Create an archive of this composer package\r\n  browse           Opens the package's repository URL or homepage in your browser.\r\n  clear-cache      Clears composer's internal package cache.\r\n  clearcache       Clears composer's internal package cache.\r\n  config           Set config options\r\n  create-project   Create new project from a package into given directory.\r\n  depends          Shows which packages depend on the given package\r\n  diagnose         Diagnoses the system to identify common errors.\r\n  dump-autoload    Dumps the autoloader\r\n  dumpautoload     Dumps the autoloader\r\n  global           Allows running commands in the global composer dir ($COMPOSER_HOME).\r\n  help             Displays help for a command\r\n  home             Opens the package's repository URL or homepage in your browser.\r\n  init             Creates a basic composer.json file in current directory.\r\n  install          Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.\r\n  licenses         Show information about licenses of dependencies\r\n  list             Lists commands\r\n  remove           Removes a package from the require or require-dev\r\n  require          Adds required packages to your composer.json and installs them\r\n  run-script       Run the scripts defined in composer.json.\r\n  search           Search for packages\r\n  self-update      Updates composer.phar to the latest version.\r\n  selfupdate       Updates composer.phar to the latest version.\r\n  show             Show information about packages\r\n  status           Show a list of locally modified packages\r\n  update           Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.\r\n  validate         Validates a composer.json\r\n\r\n### composer\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar -V\r\nComposer version eba04dc211f794d6f3a5500cfcfb9f9c0efcefbc 2014-09-24 13:38:16\r\n\r\n### composer\u304c\u6700\u65b0\u304b\u78ba\u8a8d\u3059\u308b ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar self-update\r\nYou are already using composer version eba04dc211f794d6f3a5500cfcfb9f9c0efcefbc.\r\n\r\n### \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u4e00\u89a7\u3092\u53c2\u7167\u3059\u308b ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar show -i\r\nmonolog\/monolog 1.2.1 Logging for PHP 5.3\r\n\r\n### \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u3066\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3059\u308b ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar update monolog\/monolog\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\nNothing to install or update\r\nGenerating autoload files\r\n\r\n### \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u3001composer.lock\u3092\u66f4\u65b0\u3059\u308b ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar update\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\nNothing to install or update\r\nGenerating autoload files\r\n\r\n### \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u691c\u7d22\u3059\u308b ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar search CakePHP\r\ncakephp\/cakephp The CakePHP framework\r\ncakephp\/cakephp-codesniffer CakePHP CodeSniffer Standards\r\ncakephp\/debug_kit CakePHP Debug Kit\r\ncakephp\/app CakePHP skeleton app\r\ncakephp\/localized CakePHP Localized Plugin\r\ncakephp\/migrations Database Migration plugin for CakePHP 3.0 based on Phinx\r\ncakephp\/datasources CakePHP Datasources Plugin\r\ncakephp\/monolog CakePHP Monolog Plugin\r\ncakephp\/collection Work easily with arrays and iterators by having a battery of utility traversal methods\r\ncakephp\/plugin-installer A composer installer for CakePHP 3.0+ plugins.\r\nfriendsofcake\/cakephp-test-utilities Package with support traits to ease unit testing.\r\ncakephp\/acl Acl Plugin for CakePHP 3.x framework\r\nimsamurai\/cakephp-advancedshell Advanced feutures for cakePHP shell\r\nimsamurai\/cakephp-environment Provides improovement for tests, packagist, etc\r\nrenan\/cakephp-xhprof Plugin that quickly enables XHProf profiling for your CakePHP application.\r\n\r\n### \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8a73\u7d30\u60c5\u5831\u3092\u8868\u793a\u3059\u308b ###\r\nroot@hostname:\/var\/www\/akat.info\/test\/composer# \/usr\/local\/sbin\/composer.phar show cakephp\/cakephp\r\nname     : cakephp\/cakephp\r\ndescrip. : The CakePHP framework\r\nkeywords : framework\r\nversions : dev-master, 3.0.x-dev, 3.0.0-beta1, 3.0.0-alpha2, 3.0.0-alpha1, 2.6.x-dev, 2.5.4, 2.5.3, 2.5.2, 2.5.1, 2.5.0, 2.5.0-RC2, 2.5.0-RC1, 2.5.0-beta, 2.4.x-dev, 2.4.10, 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, dev-3.0-psr-3, dev-3.0-buffered-iterator, dev-3.0-asset-filter, dev-3.0-sumby, dev-3.0-inflector, dev-3.0-use, dev-3.0-debug, dev-3.0-casing, dev-3.0-inflect-bug, dev-3.0-new-bake-templates, dev-3.0-translate-behavior-fix, dev-3.0-hhvm-take2, dev-3.0-method-rename, dev-3.0-windows-tests, dev-3.0-nest-label, dev-issue-4671, dev-issue-4664-webroot, dev-issue-4641, dev-issue-4616, dev-issue-3600, dev-master-email, dev-table-find-or-create\r\ntype     : library\r\nlicense  : MIT\r\nsource   : &#x5B;git] https:\/\/github.com\/cakephp\/cakephp.git eac4e3d6eeb6d90dfc237e745ba7298271280346\r\ndist     : &#x5B;zip] https:\/\/api.github.com\/repos\/cakephp\/cakephp\/zipball\/eac4e3d6eeb6d90dfc237e745ba7298271280346 eac4e3d6eeb6d90dfc237e745ba7298271280346\r\nnames    : cakephp\/cakephp\r\n\r\nrequires\r\nphp &gt;=5.2.8\r\next-mcrypt *\r\n\r\nrequires (dev)\r\nphpunit\/phpunit 3.7.*\r\ncakephp\/debug_kit 2.2.*\r\n<\/pre>\n<p>\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u691c\u7d22\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd<br \/>\nhttps:\/\/packagist.org\/<br \/>\n<a href=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/09\/Screenshot-2014-09-25-at-01.59.53.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tech.akat.info\/wp-content\/uploads\/2014\/09\/Screenshot-2014-09-25-at-01.59.53.png\" alt=\"Screenshot 2014-09-25 at 01.59.53\" width=\"1099\" height=\"367\" class=\"alignnone size-full wp-image-1057\" \/><\/a><\/p>\n<h1>\u53c2\u8003URL<\/h1>\n<p>\u516c\u5f0f\u30b5\u30a4\u30c8<br \/>\nhttps:\/\/getcomposer.org\/<br \/>\n\u30b3\u30de\u30f3\u30c9<br \/>\nhttps:\/\/getcomposer.org\/doc\/03-cli.md<br \/>\n\u6982\u8981\u3084\u30b3\u30de\u30f3\u30c9<br \/>\nhttp:\/\/codezine.jp\/article\/detail\/7827<br \/>\ncomposer.json\u306e\u6982\u8981<br \/>\nhttp:\/\/codezine.jp\/article\/detail\/7887<br \/>\nComposer\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\nhttp:\/\/scrtree.github.io\/blog\/2013\/11\/17\/howto-composer\/<\/p>\n<div class=\"oceanwp-oembed-wrap clr\"><iframe loading=\"lazy\" src=\"https:\/\/www.slideshare.net\/slideshow\/embed_code\/key\/4kuyhywSLnpRvd\" width=\"427\" height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;\" allowfullscreen> <\/iframe> <\/p>\n<div style=\"margin-bottom:5px\"> <strong> <a href=\"https:\/\/www.slideshare.net\/shin1x1\/composer-28109311\" title=\"Composer \u518d\u5165\u9580\" target=\"_blank\">Composer \u518d\u5165\u9580<\/a> <\/strong> from <strong><a href=\"http:\/\/www.slideshare.net\/shin1x1\" target=\"_blank\">Masashi Shinbara<\/a><\/strong> <\/div>\n<\/div>\n<p>NetBeans\u3068\u3082\u9023\u643a\u53ef\u80fd<br \/>\nhttp:\/\/www.d-wood.com\/blog\/2013\/06\/20_4090.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Composer\u3068\u306f PHP\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb PHP\u3067\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPEAR\u304c\u3088\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u305f \u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u306b\u3088\u3063\u3066\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u7ba1\u7406\u3057\u3084\u3059\u304f\u306a\u308a\u3001\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[34,9],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/917"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=917"}],"version-history":[{"count":4,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/917\/revisions"}],"predecessor-version":[{"id":1061,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/917\/revisions\/1061"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}