Last active
August 29, 2015 14:22
-
-
Save saxenap/4ab30aa020fa240de3a1 to your computer and use it in GitHub Desktop.
Wordpress Install
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 | |
# | |
# Copyright (c) 2014-2017 Praveen Saxena <> | |
# License: BSD-3-Clause | |
# | |
# To get: | |
# 1. rm -rf wordpress-install https://gist.githubusercontent.com/saxenap/4ab30aa020fa240de3a1/raw | |
# 2. wget -O wordpress-install https://gist.githubusercontent.com/saxenap/4ab30aa020fa240de3a1/raw | |
# 3. chmod 777 wordpress-install | |
# 4. ./wordpress-install | |
sudo yum -y install mysql55-server | |
sudo service mysqld start | |
sudo chkconfig mysqld on | |
mysql -u root -e "CREATE USER 'wordpress-user'@'localhost' IDENTIFIED BY 'wordpress-password';" | |
mysql -u root -e "CREATE DATABASE `wordpress-db`;" | |
mysql -u root -e "GRANT ALL PRIVILEGES ON `wordpress-db`.* TO "wordpress-user"@"localhost";" | |
mysql -u root -e "FLUSH PRIVILEGES;" | |
wget https://wordpress.org/latest.tar.gz | |
tar -xzf latest.tar.gz | |
sudo mv wordpress/* /var/www/html/ | |
usermod -a -G www apache | |
sudo service httpd restart | |
sudo chkconfig httpd on | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod 755 wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
sudo ln -s /usr/local/bin/wp /usr/bin/wp | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment