Last active
August 29, 2015 14:20
-
-
Save nanzono/e5a66c99525e42be9704 to your computer and use it in GitHub Desktop.
Python 3.4系をCentOS 6.5系にインストールする
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "chef/centos-6.5" | |
config.vm.network :private_network, ip: "192.168.33.31" | |
config.vm.provision "shell", inline: <<-EOT | |
# timezone | |
cp -p /usr/share/zoneinfo/Japan /etc/localtime | |
# iptables off | |
/sbin/iptatbles -F | |
/sbin/service iptables stop | |
/sbin/chkconfig iptables off | |
# Apache | |
# yum -y install httpd | |
# cp -a /vagrant/httpd.conf /etc/httpd/conf/ | |
# /sbin/service httpd restart | |
# /sbin/chkconfig httpd on | |
# Python | |
sudo yum -y groupinstall "Development tools" | |
sudo yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel | |
cd ~ | |
wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz --no-check-certificate | |
tar xf Python-3.4.3.tar.xz | |
cd Python-3.4.3 | |
./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" | |
make && sudo make altinstall | |
cd .. | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | |
sudo /usr/local/bin/python3.4 ez_setup.py | |
sudo /usr/local/bin/easy_install-3.4 pip | |
sudo /usr/local/bin/pip3.4 install virtualenv | |
echo "CONFIGURATION FINISHED." | |
EOT | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment