Jump to content

Ubuntu/webserver/apache

From MattWiki
noteThis Page was written with Ubuntu 12.04 LTS in mind, and may not work correctly with other versions or distributions.

Installing Apache on Ubuntu[edit | edit source]

apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && reboot
apt-get -y install git subversion vim multitail htop apache2 mysql-client \
php5 php5-mysql php5-gd openssl
git config --global user.name "Matt Rude"
git config --global user.email "[email protected]"
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
service apache2 restart

Installing WordPress from Subversion under Apache[edit | edit source]

rm -rf /var/www/* /etc/apache2/sites-enabled/*
svn co http://core.svn.wordpress.org/trunk/ /var/www/wordpress
chown -R www-data:www-data /var/www/wordpress
echo "<VirtualHost *:80>
    ServerAdmin [email protected]
    
    DocumentRoot /var/www/wordpress
    <Directory />
         Options FollowSymLinks
         AllowOverride all
    </Directory>
    
    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
</VirtualHost>" > /etc/apache2/sites-enabled/wordpress
service apache2 restart