Skip to content

Instantly share code, notes, and snippets.

@kazuph kazuph/file0.txt
Last active Aug 29, 2015

What would you like to do?
Wordpressの初回設定をサクッと済ませるスクリプト ref:
# pwd
# ls
# sh
yum update -y
yum groupinstall -y "Development Tools"
yum -y install gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel readline-devel sqlite-devel perl wget
yum -y install curl bind-utils file git mailx man ntp openssh-clients patch rsync screen sysstat dstat htop iotop traceroute vim-enhanced
yum -y install httpd mysql-server php php-mysql php-mbstring
cd /var/www/html
curl -LO
tar xvzf latest-ja.tar.gz
#!/bin/bash -eu
## 以下の設定情報を編集して使ってください。
## ここより下は編集しなくていいです(バグってなければ)
cd wordpress
cp wp-config-sample.php wp-config.php
echo 変更前
cat wp-config.php | grep -E "DB_NAME|DB_USER|DB_PASSWORD"
perl -p -e "s/database_name_here/${DATABASE_NAME_HERE}/" wp-config.php
perl -p -e "s/username_here/${USERNAME_HERE}/" wp-config.php
perl -p -e "s/password_here/${PASSWORD_HERE}/" wp-config.php
echo 変更後
cat wp-config.php | grep -E "DB_NAME|DB_USER|DB_PASSWORD"
chown -R apache:apache ../wordpress
ls -l ../
mysql -uroot -e "create database ${DATABASE_NAME_HERE};"
mysql -uroot -e "grant all privileges on ${DATABASE_NAME_HERE}.* to ${USERNAME_HERE}@localhost identified by "\""${PASSWORD_HERE}"\"";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.