Last active
June 28, 2016 08:15
-
-
Save takumiio/dc5d89346c10a42d80b692b31cdbe245 to your computer and use it in GitHub Desktop.
WordPressをワンライナーでインストールするためのシェル。まだまだ改良できそうなので、そのうちやる。
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
#!/bin/bash | |
# Get WordPress | |
curl -LO https://ja.wordpress.org/wordpress-4.5.2-ja.tar.gz | |
tar xzf wordpress-4.5.2-ja.tar.gz | |
mv wordpress html | |
# Install to need packages | |
sudo yum install -y httpd mysql-server php php-mysql | |
# Move public directory in wordpress | |
sudo rm -rf /var/www/html | |
sudo mv html /var/www/html | |
# Change permission for apache reading | |
sudo chown apache /var/www/html | |
# Lunch MySQL and Apache | |
sudo service mysqld start | |
sudo service httpd start | |
# Initial Secure MySQL | |
mysql_secure_installation | |
# Initial Database | |
mysql -uroot -p -e 'CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8' | |
mysql -uroot -p -e "GRANT ALL ON wordpress.* TO 'dev'@'localhost' IDENTIFIED BY 'devdevdev'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment