sedで#が入ってる行を削除、空白行も削除する
例はhttpd.conf 動作は未確認
cat httpd.conf | sed '/\#/d' | sed '/^$/d' > out_httpd.conf
cut,sedの使い方メモ
最初の11文字を除去
cut -c 11-
2文字目以降を取り出す
cut -c 2-
ダブルクォートを除去
sed -e "s/\"//g"
Ubuntu 14.04 apacheのLet'sEncryptをdisable
下記コマンドを実行
a2dissite 000-default-le-ssl.conf service apache2 reload
Ubuntu 14.04 apacheでcertbotを設定
インストール
sudo apt-get update sudo apt-get install software-properties-common sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install python-certbot-apache
実行
$ sudo certbot --apache
メールを聞かれるので入力してEnter
Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel):
Aを入力してEnter
------------------------------------------------------------------------------- Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree in order to register with the ACME server at https://acme-v01.api.letsencrypt.org/directory ------------------------------------------------------------------------------- (A)gree/(C)ancel: A
Yを入力してEnter
------------------------------------------------------------------------------- Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about EFF and our work to encrypt the web, protect its users and defend digital rights. ------------------------------------------------------------------------------- (Y)es/(N)o: Y
ドメイン名を聞かれるので入力する
※ポート443が開いてないとエラーになるので開けておく
No names were found in your configuration files. Please enter in your domain name(s) (comma and/or space separated) (Enter 'c' to cancel):
リクエストを全部httpsで処理したい場合は2を入力してEnter
Please choose whether HTTPS access is required or optional. ------------------------------------------------------------------------------- 1: Easy - Allow both HTTP and HTTPS access to these sites 2: Secure - Make all requests redirect to secure HTTPS access ------------------------------------------------------------------------------- Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
apt-getでIPV6アドレスに接続できない場合
IPV4使用のオプション -o Acquire::ForceIPv4=true をつける
apt-get -o Acquire::ForceIPv4=true update apt-get -o Acquire::ForceIPv4=true upgrade
installの場合も同じ
Fedora26にcakephp3を入れる
sudo dnf install php-cli sudo dnf install php-intl sudo dnf install php-mbstring sudo dnf install php-pdo sudo dnf install php-pdo_mysql curl -sS https://getcomposer.org/installer | php composer create-project --prefer-dist cakephp/app sampleapp