SCLとは?

SCLのインストール

# yum install centos-release-scl

Python2.7 のインストール

# yum install python27 python27-python-tools

Python2.7 を使う

# python -V
Python 2.6.6

# scl enable python27 bash
# python -V
Python 2.7.8
# exit

# python -V
Python 2.6.6

Shell Script の中で SCL を使う

#!/bin/bash

scl enable python27 - << \EOF

echo "---------- ---------- ---------- ----------" >> /var/log/certbot.log
/bin/date >> /var/log/certbot.log

pip install --upgrade pip
pip install --upgrade setuptools
easy_install -U setuptools
/usr/bin/yum -y update

/opt/certbot/certbot-auto renew >> /var/log/certbot.log 2>&1

EOF

CentOS 6 on さくらVPS


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2017-02-15 (水) 00:16:16 (2620d)
Short-URL: https://at-sushi.com:443/pukiwiki/index.php?cmd=s&k=75bbf66c61
ISBN10
ISBN13
9784061426061