9/19
朝目標、todoリストつくったか no
事業アイディア思いついたか no
ダイエットキュレーション × 何か
考える時間は取れたか yes
事業リサーチしたか no
今日新たに10個海外サービス知れたか
今日のよかったこと
中目のスタバに仮想通貨の本があったから読んでみようと思う
embulk 環境設定
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.rpm
yum localinstall jdk-8u40-linux-x64.rpm
curl --create-dirs -o ~/bin/embulk -L http://dl.embulk.org/embulk-latest.jar
chmod +x ~/bin/embulk
embulk gem install embulk-output-elasticsearch_using_url
embulk gem install embulk-input-mysql
/embulkで環境変数を設定
export EMBULK_ENV=production
export EMBULK_ENV=staging
export EMBULK_ENV=dev
php 静的解析
phpdcd インストール
wget https://phar.phpunit.de/phpdcd.phar
chmod +x phpdcd.phar
mv phpdcd.phar /usr/local/bin/phpdcd
https://github.com/sebastianbergmann/phpdcd
phpmd インストール
https://matome.naver.jp/odai/2134971273831838401
install
https://blog.shimabox.net/2016/09/15/phpunit-php-support-version/
SSL作成方法
- 一般的なSSLの作成方法を記載します。
- SHA-2の発行方法です。
OpenSSLのバージョン確認
- ターミナルで下記コマンドを実行します。
# openssl version OpenSSL 1.0.1e-fips 11 Feb 2013
秘密鍵の作成
# mkdir /etc/httpd/ssl/ # cd /etc/httpd/ssl/ # openssl genrsa -des3 -out コモンネーム.key 2048
CSR発行
CSR発行コマンド
# openssl req -new -sha256 -key コモンネーム.key -out コモンネーム.csr
証明書のインストール
証明書
- 発行された証明書をコピーして、vimで設置する
# vim /etc/httpd/ssl/コモンネーム.crt 証明書貼り付け
中間証明書
- 発行された証明書をコピーして、vimで設置する
# vim /etc/httpd/ssl/コモンネーム.cer 証明書貼り付け
mod_sslのインストール
# yum install mod_ssl
VirtualHost設定
# vim /etc/httpd/conf.d/ssl.confLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" ErrorLog logs/ssl_error_log TransferLog logs/ssl_access_log LogLevel warn SSLEngine on SSLProtocol All -SSLv2 -SSLv3 SSLCipherSuite AES128+EECDH:AES128+EDH SSLHonorCipherOrder on Header add Strict-Transport-Security "max-age=15768000" BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog logs/ssl_admin_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" SSLCertificateChainFile /etc/httpd/ssl/コモンネーム.cer SSLCertificateFile /etc/httpd/ssl/コモンネーム.crt SSLCertificateKeyFile /etc/httpd/ssl/コモンネーム.key ServerName ドメイン:443 DocumentRoot "/var/www/html" # Virtual Host外に下記を記述 SSLCompression offOptions All AllowOverride All Require all granted
秘密鍵パスフレーズの解除
- 必ず最初に作成した秘密鍵はコピーしてバックアップしておいてください。
# cp コモンネーム.key コモンネーム.key.org # openssl rsa -in コモンネーム.key -out コモンネーム.key
# openssl rsa -text -noout -in /etc/httpd/ssl/コモンネーム.key
Apache再起動
- ※設定ファイルの確認は必ずおこなってください。
# apachectl configtest # apachectl reload
証明書確認ツール
SSL作成方法
SSL作成方法(Apache2)
Introduction
- 一般的なSSLの作成方法を記載します。
- SHA-2の発行方法です。
OpenSSLのバージョン確認
- ターミナルで下記コマンドを実行します。
# openssl version OpenSSL 1.0.1e-fips 11 Feb 2013
秘密鍵の作成
# mkdir /etc/httpd/ssl/ # cd /etc/httpd/ssl/ # openssl genrsa -des3 -out コモンネーム.key 2048
CSR発行
CSR発行コマンド
# openssl req -new -sha256 -key コモンネーム.key -out コモンネーム.csr
証明書のインストール
証明書
- 発行された証明書をコピーして、vimで設置する
# vim /etc/httpd/ssl/コモンネーム.crt 証明書貼り付け
中間証明書
- 発行された証明書をコピーして、vimで設置する
# vim /etc/httpd/ssl/コモンネーム.cer 証明書貼り付け
mod_sslのインストール
# yum install mod_ssl
VirtualHost設定
# vim /etc/httpd/conf.d/ssl.confLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" ErrorLog logs/ssl_error_log TransferLog logs/ssl_access_log LogLevel warn SSLEngine on SSLProtocol All -SSLv2 -SSLv3 SSLCipherSuite AES128+EECDH:AES128+EDH SSLHonorCipherOrder on Header add Strict-Transport-Security "max-age=15768000" BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog logs/ssl_admin_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" SSLCertificateChainFile /etc/httpd/ssl/コモンネーム.cer SSLCertificateFile /etc/httpd/ssl/コモンネーム.crt SSLCertificateKeyFile /etc/httpd/ssl/コモンネーム.key ServerName ドメイン:443 DocumentRoot "/var/www/html" # Virtual Host外に下記を記述 SSLCompression offOptions All AllowOverride All Require all granted
秘密鍵パスフレーズの解除
- 必ず最初に作成した秘密鍵はコピーしてバックアップしておいてください。
# cp コモンネーム.key コモンネーム.key.org # openssl rsa -in コモンネーム.key -out コモンネーム.key
# openssl rsa -text -noout -in /etc/httpd/ssl/コモンネーム.key
Apache再起動
- ※設定ファイルの確認は必ずおこなってください。
# apachectl configtest # apachectl reload