Created
October 20, 2012 05:50
-
-
Save psahalot/3922203 to your computer and use it in GitHub Desktop.
Installing and running WordPress on Amazon EC2
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
// switch to root user | |
sudo su | |
// install Apache | |
apt-get install apache2 | |
// install PHP and related modules | |
apt-get install php5 | |
apt-get install libapache2-mod-php5 | |
// if PHP install fails then use apt-get update and repeat the installation process | |
// restart Apache to pick up the changes | |
/etc/init.d/apache2 restart | |
// create a test PHP file to check PHP config | |
cd /var/www/ | |
vi mytest.php | |
// install MySQL | |
apt-get install mysql-server | |
// install related PHP - MySQL modules | |
apt-get install php5-mysql | |
apt-get install libapache2-mod-auth-mysql | |
// install PHP MyAdmin | |
apt-get install phpmyadmin | |
// configure Apache to access PHP MyAdmin | |
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf | |
/etc/init.d/apache2 reload | |
// download and extract WP in the directory | |
cd | |
wget http://wordpress.org/latest.tar.gz | |
tar -xzvf latest.tar.gz -C /var/www | |
// move files from "wordpress" directory to root | |
cp -avr /var/www/wordpress/* /var/www | |
// remove the empty directory | |
rm -rf /var/www/wordpress | |
// read - write access to Apache user | |
sudo chown -R www-data /var/www | |
sudo chmod -R 755 www-data /var/www | |
// enable htaccess and rewrite rules | |
sudo vim /etc/apache2/sites-available/default | |
// replace "AllowOverride None" with "AllowOverride All" | |
// restart Apache | |
sudo /etc/init.d/apache2 restart | |
// continue with WP installation. :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment