Skip to content

Instantly share code, notes, and snippets.

@fuzzy31u
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fuzzy31u/117a6e00f93423aeca10 to your computer and use it in GitHub Desktop.
Save fuzzy31u/117a6e00f93423aeca10 to your computer and use it in GitHub Desktop.
Shell script for provisioning. #TODOを自動化するために他のprovisioning toolを試してみる.
## Update all packages
sudo yum update -y
## Install
sudo yum -y install emacs
sudo yum -y install httpd
sudo yum -y install wget
## Change network config
# Stop a firewall
sudo service iptables stop
# To be off on iptables when the VM starts up
sudo chkconfig iptables off
## Configurate httpd server
# Make httpd server start when VM starts up
sudo service httpd start
sudo chkconfig httpd on
## Symbolic link to access from HostOS
sudo ln -fs /vagrant /var/www/html
## Downloads and install epel, remi
# epel
wget https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm
# TODO manually!
#sudo emacs /etc/yum.repos.d/epel.repo
# remi
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6.rpm
## Install and config MySQL5.5
sudo yum install -y --enablerepo=remi mysql-server
# TODO manually!
# /etc/my.cnfに下記の設定 -->
#character_set_server=utf8
#default-storage-engine=InnoDB
#innodb_file_per_table
#[mysql]
#default-character-set=utf8
#[mysqldump]
#default-character-set=utf
# <--
# Start mysqld
sudo service mysqld start
sudo chkconfig mysqld on
# TODO manually!
#/usr/bin/mysql_secure_installation
## Install and config Python3.4 from source
wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz
tar xzvf Python-3.4.0.tgz
# TODO manually! -->
#cd Python-3.4.0
#./configure --enable-shared --with-threads
#make
#sudo make install
# <-- TODO
sudo cp libpython3.4.so libpython3.4.so.1.0 /usr/lib
sudo /sbin/ldconfig
source ~/.bash_profile
python3 --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment