Last active
August 29, 2015 13:57
-
-
Save bastosmichael/9544473 to your computer and use it in GitHub Desktop.
Basic Redis WordPress Installer
This file contains hidden or 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 | |
if [ $# -eq 0 ] | |
then | |
echo "wordpress-redis.sh [options] install|mysql | |
install - Automatically installs wordpress without database | |
database - Automatically installs wordpress with mysql" | |
elif [ $1 == 'install' ]; then | |
echo "Updating Operating System..." | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
echo "Switching to VIM..." | |
sudo apt-get install -y vim | |
sudo update-alternatives --set editor /usr/bin/vim.basic | |
echo "Installing Dependencies..." | |
sudo apt-get remove -y git-core | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt-get update -y | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password ' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password ' | |
sudo apt-get install -y build-essential git redis-server mysql-server mysql-client nginx php5-fpm php-apc php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl | |
echo "Installing Pear modules and postfix" | |
pear install mail | |
pear install Net_SMTP | |
pear install Auth_SASL | |
pear install mail_mime | |
sudo apt-get install -y postfix | |
echo "Restarting Php5-fpm" | |
sudo /etc/init.d/php5-fpm restart | |
echo "Creating git user..." | |
sudo adduser --disabled-login --gecos 'WordPress' wordpress | |
echo "Installing WordPress" | |
cd /home/wordpress | |
sudo -u wordpress -H git clone https://github.com/WordPress/WordPress.git wordpress | |
sudo chown -R www-data:www-data wordpress | |
cd wordpress | |
sudo find . -type d -exec chmod 755 {} \; | |
sudo find . -type f -exec chmod 644 {} \; | |
sudo wget https://gist.github.com/bastosmichael/6481545/download | |
sudo tar tvzf download | |
sudo rm download | |
cd gist* | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment