質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Laravel

LaravelとはTaylor Otwellによって開発された、オープンソースなPHPフレームワークです。Laravelはシンプルで表現的なシンタックスを持ち合わせており、ウェブアプリケーション開発の手助けをしてくれます。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

composer

Composerとは、PHP5.3.2以上で使用可能なパッケージ管理ツールです。指定ディレクトリ内だけでパッケージ管理します。

Q&A

解決済

2回答

7167閲覧

CentOS6.8(64bit)にPHP5.4以上をインストールしLaravel環境を構築したい(3)

kanrin0

総合スコア34

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Laravel

LaravelとはTaylor Otwellによって開発された、オープンソースなPHPフレームワークです。Laravelはシンプルで表現的なシンタックスを持ち合わせており、ウェブアプリケーション開発の手助けをしてくれます。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

composer

Composerとは、PHP5.3.2以上で使用可能なパッケージ管理ツールです。指定ディレクトリ内だけでパッケージ管理します。

0グッド

2クリップ

投稿2016/12/09 09:32

CentOS6.8(64bit)にPHP5.6をインストールした後、Laravel環境を構築しようと、Composerを
インストールしました。

[]# curl -sS https://getcomposer.org/installer | php
・・・・・
Composer successfully installed to: /root/composer.phar

[]# ls
anaconda-ks.cfg composer.phar install.log install.log.syslog
[]# mv composer.phar /usr/local/bin/composer
の後、手順通りにLaravelを下記のようにインストールしました。
が、失敗し先に進めません。(参考サイト:http://qiita.com/IKEA_dless/items/8f02b3ea35c83c265307)

[]# composer global require "laravel/installer=~1.1"

Changed current directory to /root/.composer
./composer.json has been created
Loading composer repositories with package information

Installation failed, deleting ./composer.json.

[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed w
ith code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]

ダイアグを調べましたがなんのことやらほにゃららべる。
[]# composer diag
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: WARNING
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: WARNING
Unable to assess the situation, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipball/1.0.0" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed)
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version:

[Composer\Downloader\TransportException]
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed w
ith code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed

diagnose

どなたか親切な方、教えてくださいませ。よろしゅうお頼み申します。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

remi レポジトリから yum でインストール可能です。もっとも簡単なはず。

bash

1yum --enablerepo=remi install composer

投稿2016/12/09 13:13

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

yunano

2016/12/09 15:31

それはcurl -sS https://getcomposer.org/installer | phpおよびmv composer.phar /usr/local/bin/composerまで成功しているようなので、同等のことはできているように思えます。
guest

0

ベストアンサー

「"SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol" Laravel」でgoogle検索すると以下のようなページが出てきました。
https://github.com/composer/composer/issues/3611

これによるとOSはわかりませんが/usr/local/lib/php.iniにopenssl.cafile=/usr/local/share/perl5/Mozilla/CA/cacert.pemという行を追加したら上手くいったと書いています。
CentOS 6だとたぶん同等のものは/etc/php.iniにopenssl.cafile=/etc/pki/tls/certs/ca-bundle.crtを追加になるのではないかと思います。

投稿2016/12/09 12:53

yunano

総合スコア841

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kanrin0

2016/12/11 01:20

yunanoさま 毎度お世話になり有難う御座います。 下記のようにし再起動しましたが、エラーメッセージ変わらず、同じ結果で御座いました。 /etc/php.ini [openssl] ; The location of a Certificate Authority (CA) file on the local filesystem ; to use when verifying the identity of SSL/TLS peers. Most users should ; not specify a value for this directive as PHP will attempt to use the ; OS-managed cert stores in its absence. If specified, this value may still ; be overridden on a per-stream basis via the "cafile" SSL stream context ; option. openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt
kanrin0

2016/12/12 10:02

natadyさま できました! .bashrcを編集して下記4行を加え、 HTTP_PROXY=http://***.***.***.***:8080 HTTP_PROXY_REQUEST_FULLURI=1 HTTPS_PROXY=http://***.***.***.***:8080 HTTPS_PROXY_REQUEST_FULLURI=0 再起動し、[]# composer global require "laravel/installer=~1.1" を実行しみごとに通りました! -------------以下、diagで確認。 []# composer diag Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking HTTP proxy: OK Checking HTTP proxy support for request_fulluri: OK Checking HTTPS proxy support for request_fulluri: OK Checking github.com rate limit: OK Checking disk free space: OK :   : :   : Checking composer version: OK 本当にありがとうございました!感謝申し上げます。 なお、業務中回答できず遅くなりましてすみませんでした。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問