-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,162 additions
and
92 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.DS_Store | ||
.vagrant | ||
package.box | ||
Vagrantfile |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
echo ------------------------------------------------- | ||
echo | ||
echo Git2 | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
yum -y remove git | ||
yum -y install https://centos7.iuscommunity.org/ius-release.rpm | ||
yum -y install git2u | ||
|
||
yum -y install yum-utils | ||
yum-config-manager --disable ius | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo Git Version | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
git --version |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
echo ------------------------------------------------- | ||
echo | ||
echo heroku-cli | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
wget https://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli-linux-x64.tar.gz -O heroku.tar.gz | ||
mkdir -p /usr/local/lib/heroku | ||
tar --strip-components 1 -zxvf heroku.tar.gz -C /usr/local/lib/heroku 1>/dev/null | ||
ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku | ||
rm -f heroku.tar.gz |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash -eu | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo MySQL5.6 | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
yum -y install https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm | ||
yum -y install yum-utils | ||
yum-config-manager --disable mysql57-community | ||
yum-config-manager --enable mysql56-community | ||
yum -y install mysql-community-server mysql-community-devel | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo MySQL 設定 | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
mkdir -p /var/log/mysql | ||
chown -R mysql:mysql /var/log/mysql | ||
|
||
ln -sf $PROVISION/config/mysql56/my.cnf /etc/my.cnf -S .org | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo MySQL 起動、自動起動 | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
systemctl start mysqld | ||
systemctl enable mysqld | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo MySQL 初期設定 | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
# rootユーザーパスワード設定 | ||
NEW_PASSWORD=MySQL5.6 | ||
mysqladmin -u root password $NEW_PASSWORD | ||
# anonymasユーザー削除 | ||
mysql -u root -p$NEW_PASSWORD -e "DELETE FROM mysql.user WHERE User='';" | ||
mysql -u root -p$NEW_PASSWORD -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" | ||
# testデータベース削除 | ||
mysql -u root -p$NEW_PASSWORD -e "DROP DATABASE IF EXISTS test;" | ||
mysql -u root -p$NEW_PASSWORD -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';" | ||
# vagrantユーザー作成 | ||
mysql -u root -p$NEW_PASSWORD -e "GRANT ALL PRIVILEGES ON *.* TO 'vagrant'@'localhost' IDENTIFIED BY '$NEW_PASSWORD'" | ||
mysql -u root -p$NEW_PASSWORD -e "GRANT ALL PRIVILEGES ON *.* TO 'vagrant'@'127.0.0.1' IDENTIFIED BY '$NEW_PASSWORD'" | ||
mysql -u root -p$NEW_PASSWORD -e "GRANT ALL PRIVILEGES ON *.* TO 'vagrant'@'192.168.%' IDENTIFIED BY '$NEW_PASSWORD'" | ||
# 権限反映 | ||
mysql -u root -p$NEW_PASSWORD -e "FLUSH PRIVILEGES;" | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo MySQL ログイン設定 | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
cp $PROVISION/config/mysql56/.mylogin.root.cnf /root/.mylogin.cnf | ||
cp $PROVISION/config/mysql56/.mylogin.vagrant.cnf /home/vagrant/.mylogin.cnf | ||
chmod 600 /root/.mylogin.cnf | ||
chmod 600 /home/vagrant/.mylogin.cnf | ||
chown vagrant:vagrant /home/vagrant/.mylogin.cnf | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo MySQL Version | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
mysql --version |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
echo ------------------------------------------------- | ||
echo | ||
echo Nodejs8.x, yarn | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - | ||
yum -y install nodejs | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo Node Version | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
node --version | ||
|
||
echo ------------------------------------------------- | ||
echo | ||
echo npm Version | ||
echo | ||
echo ------------------------------------------------- | ||
|
||
npm --version |
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
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
Oops, something went wrong.