Last active
August 29, 2015 14:20
-
-
Save goocey/61f495ebfeaf16c99ba6 to your computer and use it in GitHub Desktop.
perl php httpd install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldd /usr/lib64/httpd/modules/mod_ssl.so | |
linux-vdso.so.1 => (0x00007fff1a5ec000) | |
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f6332e36000) | |
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f6332a53000) | |
libc.so.6 => /lib64/libc.so.6 (0x00007f63326be000) | |
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f633247a000) | |
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f6332194000) | |
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f6331f8f000) | |
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f6331d63000) | |
libdl.so.2 => /lib64/libdl.so.2 (0x00007f6331b5f000) | |
libz.so.1 => /lib64/libz.so.1 (0x00007f6331948000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f63332d7000) | |
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f633173d000) | |
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f633153a000) | |
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f633131f000) | |
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6331102000) | |
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f6330ee2000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldd perl5/lib/perl5/x86_64-linux-thread-multi/auto/Net/SSLeay/SSLeay.so | |
linux-vdso.so.1 => (0x00007fffd8dff000) | |
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f92b9d90000) | |
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f92b99ac000) | |
libz.so.1 => /lib64/libz.so.1 (0x00007f92b9796000) | |
libc.so.6 => /lib64/libc.so.6 (0x00007f92b9402000) | |
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f92b91be000) | |
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f92b8ed7000) | |
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f92b8cd3000) | |
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f92b8aa7000) | |
libdl.so.2 => /lib64/libdl.so.2 (0x00007f92b88a2000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f92ba293000) | |
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f92b8697000) | |
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f92b8494000) | |
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f92b8279000) | |
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f92b805c000) | |
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f92b7e3c000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldd /usr/lib64/php/modules/curl.so | |
linux-vdso.so.1 => (0x00007fffa0fff000) | |
libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f3f075c5000) | |
libc.so.6 => /lib64/libc.so.6 (0x00007f3f07231000) | |
libidn.so.11 => /lib64/libidn.so.11 (0x00007f3f06ffe000) | |
libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007f3f06dae000) | |
librt.so.1 => /lib64/librt.so.1 (0x00007f3f06ba6000) | |
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f3f06961000) | |
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f3f0667b000) | |
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f3f0644f000) | |
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f3f0624a000) | |
libz.so.1 => /lib64/libz.so.1 (0x00007f3f06034000) | |
libssl3.so => /usr/lib64/libssl3.so (0x00007f3f05df5000) | |
libsmime3.so => /usr/lib64/libsmime3.so (0x00007f3f05bc8000) | |
libnss3.so => /usr/lib64/libnss3.so (0x00007f3f05889000) | |
libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f3f0565d000) | |
libplds4.so => /lib64/libplds4.so (0x00007f3f05458000) | |
libplc4.so => /lib64/libplc4.so (0x00007f3f05253000) | |
libnspr4.so => /lib64/libnspr4.so (0x00007f3f05015000) | |
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3f04df7000) | |
libdl.so.2 => /lib64/libdl.so.2 (0x00007f3f04bf3000) | |
libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007f3f049cb000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f3f07a2f000) | |
liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007f3f047bb000) | |
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f3f045a1000) | |
libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f3f04387000) | |
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f3f0417b000) | |
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f3f03f78000) | |
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f3f03d0b000) | |
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f3f03928000) | |
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f3f036f1000) | |
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f3f034d1000) | |
libfreebl3.so => /lib64/libfreebl3.so (0x00007f3f032ce000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "vendor/autoload.php"; | |
// HTTP_Request2 | |
require_once 'HTTP/Request2.php'; | |
$response = ''; | |
try { | |
// リクエスト作成 | |
$request = new HTTP_Request2(); | |
$request->setUrl('https://www.google.co.jp/?gfe_rd=cr&ei=YglIVb7LA-LM8geL84Bo'); | |
// verify_hostが有効だとダメだったので、しゃーなしで外した。 | |
$request->setConfig(array('ssl_verify_host' => false,'ssl_verify_peer' => true, 'ssl_cafile' => '/etc/ssl/certs/ca-bundle.trust.crt')); | |
$request->setMethod(HTTP_Request2::METHOD_GET); | |
$response = $request->send(); | |
} catch (HTTP_Request2_Exception $e) { | |
var_dump('error' . $e->getMessage()); | |
} catch (Exception $e) { | |
var_dump('error' . $e->getMessage()); | |
} | |
var_dump($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vagrant@localhost perl]$ php -m | |
[PHP Modules] | |
bz2 | |
calendar | |
Core | |
ctype | |
curl | |
date | |
ereg | |
exif | |
fileinfo | |
filter | |
ftp | |
gettext | |
gmp | |
hash | |
iconv | |
json | |
libxml | |
openssl | |
pcntl | |
pcre | |
Phar | |
readline | |
Reflection | |
session | |
shmop | |
SimpleXML | |
sockets | |
SPL | |
standard | |
tokenizer | |
xml | |
zip | |
zlib | |
/usr/lib64/php/modules/にopenssl.soはないので、組み込まれていますねぇ。。。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install httpd perl php mod_ssl perl-ExtUtils-MakeMaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldd /usr/sbin/sshd | |
linux-vdso.so.1 => (0x00007fffb66e1000) | |
libfipscheck.so.1 => /lib64/libfipscheck.so.1 (0x00007f4b58681000) | |
libwrap.so.0 => /lib64/libwrap.so.0 (0x00007f4b58476000) | |
libaudit.so.1 => /lib64/libaudit.so.1 (0x00007f4b58252000) | |
libpam.so.0 => /lib64/libpam.so.0 (0x00007f4b58044000) | |
libdl.so.2 => /lib64/libdl.so.2 (0x00007f4b57e40000) | |
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4b57c20000) | |
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f4b5783d000) | |
libutil.so.1 => /lib64/libutil.so.1 (0x00007f4b5763a000) | |
libz.so.1 => /lib64/libz.so.1 (0x00007f4b57423000) | |
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f4b5720a000) | |
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f4b56fd3000) | |
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f4b56db8000) | |
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f4b56b74000) | |
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f4b5688e000) | |
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f4b56661000) | |
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f4b5645d000) | |
libnss3.so => /usr/lib64/libnss3.so (0x00007f4b5611e000) | |
libc.so.6 => /lib64/libc.so.6 (0x00007f4b55d89000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f4b58b1d000) | |
libfreebl3.so => /lib64/libfreebl3.so (0x00007f4b55b86000) | |
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f4b5597a000) | |
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f4b55777000) | |
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4b5555a000) | |
libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f4b5532d000) | |
libplc4.so => /lib64/libplc4.so (0x00007f4b55128000) | |
libplds4.so => /lib64/libplds4.so (0x00007f4b54f24000) | |
libnspr4.so => /lib64/libnspr4.so (0x00007f4b54ce5000) | |
librt.so.1 => /lib64/librt.so.1 (0x00007f4b54add000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sS https://getcomposer.org/installer | php | |
vim composer.json | |
php ./composer.phar install | |
php request.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"repositories":[ | |
{ | |
"type":"pear", | |
"url":"http://pear.php.net" | |
} | |
], | |
"require":{ | |
"pear-pear.php.net/HTTP_Request2": "2.2.*" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldd /usr/lib/apache2/modules/mod_ssl.so | |
linux-vdso.so.1 => (0x00007fff05bff000) | |
libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fc6b9fde000) | |
libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fc6b9be6000) | |
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc6b99c9000) | |
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc6b963d000) | |
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc6b9439000) | |
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc6b9221000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007fc6ba474000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldd perl5/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/SSLeay.so | |
linux-vdso.so.1 => (0x00007ffff1dff000) | |
libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fcd5a71f000) | |
libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fcd5a327000) | |
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fcd5a10f000) | |
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcd59d83000) | |
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcd59b7f000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007fcd5abfe000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "vendor/autoload.php"; | |
// HTTP_Request2 | |
require_once 'HTTP/Request2.php'; | |
$response = ''; | |
try { | |
// リクエスト作成 | |
$request = new HTTP_Request2(); | |
$request->setUrl('https://www.google.co.jp/?gfe_rd=cr&ei=YglIVb7LA-LM8geL84Bo'); | |
$request->setConfig(array('ssl_verify_host' => true, | |
'ssl_verify_peer' => true, | |
'ssl_capath' => '/etc/ssl/certs')); | |
$request->setMethod(HTTP_Request2::METHOD_GET); | |
$response = $request->send(); | |
} catch (HTTP_Request2_Exception $e) { | |
var_dump('error' . $e->getMessage()); | |
} catch (Exception $e) { | |
var_dump('error' . $e->getMessage()); | |
} | |
var_dump($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -m | |
[PHP Modules] | |
bcmath | |
bz2 | |
calendar | |
Core | |
ctype | |
date | |
dba | |
dom | |
ereg | |
exif | |
fileinfo | |
filter | |
ftp | |
gettext | |
hash | |
iconv | |
json | |
libxml | |
mbstring | |
mhash | |
openssl | |
pcntl | |
pcre | |
PDO | |
Phar | |
posix | |
Reflection | |
session | |
shmop | |
SimpleXML | |
soap | |
sockets | |
SPL | |
standard | |
sysvmsg | |
sysvsem | |
sysvshm | |
tokenizer | |
wddx | |
xml | |
xmlreader | |
xmlwriter | |
zip | |
zlib | |
こちらも、/usr/lib/php/配下にopensslがいない。zlibも! 組み込みか! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install httpd perl php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldd /usr/sbin/sshd | |
linux-vdso.so.1 => (0x00007ffff8bff000) | |
libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f4167158000) | |
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007f4166f4a000) | |
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f4166d29000) | |
libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f4166931000) | |
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f416672e000) | |
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4166516000) | |
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f41662df000) | |
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f41660a0000) | |
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f4165dcb000) | |
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f4165bc7000) | |
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f416583b000) | |
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f4165622000) | |
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f416541e000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f41675f2000) | |
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f41651f4000) | |
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f4164feb000) | |
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f4164de7000) | |
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f4164bd1000) | |
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f41649b4000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./cpanm LWP | |
./cpanm LWP::Protocol::https | |
# 捨てる環境だからcartonはつかわんでもいいな。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# User specific aliases and functions | |
export PERL5LIB="$HOME/testcode/perl/perl5/lib/perl5:$PERL5LIB" | |
export PERL_CPANM_OPT="--local-lib=~/testcode/perl/perl5/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use IO::Socket::SSL; | |
#simple client | |
#my $cl = IO::Socket::SSL->new('www.google.co.jp:443/?gfe_rd=cr&ei=YglIVb7LA-LM8geL84Bo'); | |
my $cl = IO::Socket::SSL->new('www.google.co.jp:443'); | |
print $cl "GET / HTTP/1.0\r\n\r\n"; | |
print <$cl>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment