Last active
January 30, 2016 08:08
-
-
Save shobhitsinghal624/79c7b5d7566a27ab5d27 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env bash | |
cd ~ | |
# Install LAMP | |
sudo apt-get install --assume-yes apache2 mysql-server php5 php5-mysql | |
# Install other needed stuff | |
sudo apt-get install --assume-yes wget | |
# Install these php5 modules | |
# php5-gd : for image thumbnailing | |
# php5-intl : for internationalization support | |
# texlive : for in-line display of mathematical formulae | |
# php5-xcache : XCache for added performance | |
sudo apt-get install --assume-yes php5-gd php5-intl texlive php5-xcache | |
sudo service apache2 restart | |
# Download the latest wordpress setup | |
cd /var/www | |
sudo wget https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz | |
sudo tar xzvf mediawiki-1.26.2.tar.gz | |
sudo mv mediawiki-1.26.2 mediawiki | |
sudo rm mediawiki-1.26.2.tar.gz | |
sudo chown -R www-data:www-data /var/www/mediawiki | |
# Change Apache Config | |
cd /etc/apache2/sites-available/ | |
sudo wget https://gist.githubusercontent.com/shobhitsinghal624/79c7b5d7566a27ab5d27/raw/mediawiki.conf | |
cd /etc/apache2/sites-enabled/ | |
sudo ln -s ../sites-available/mediawiki.conf | |
sudo rm 000-default.conf | |
sudo service apache2 restart |
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
<VirtualHost *:80> | |
#ServerAdmin webmaster@localhost | |
#ServerName domain.tld | |
#ServerAlias www.domain.tld | |
DocumentRoot /var/www/mediawiki | |
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | |
# error, crit, alert, emerg. | |
# It is also possible to configure the loglevel for particular | |
# modules, e.g. | |
#LogLevel info ssl:warn | |
ErrorLog ${APACHE_LOG_DIR}/error-mediawiki.log | |
CustomLog ${APACHE_LOG_DIR}/access-mediawiki.log combined | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All | |
</Directory> | |
<Directory /var/www/mediawiki> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> | |
php_value date.timezone "Asia/Kolkata" | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment