Skip to content

Instantly share code, notes, and snippets.

@nerdsrescueme
Created November 30, 2011 16:04
Show Gist options
  • Save nerdsrescueme/1409612 to your computer and use it in GitHub Desktop.
Save nerdsrescueme/1409612 to your computer and use it in GitHub Desktop.
Nerd Server
Timeout 25
KeepAlive On
MaxKeepAliveRequests 250
KeepAliveTimeout 8
HostnameLookups Off
ServerName nerdcms.nerdsrescue.me
ServerTokens Prod
ServerSignature Off
aptitude update && aptitude dist-upgrade
aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server memcached php5-memcached php-apc shorewall git
adduser nerd
usermod -g www-data nerd
chown -R www-data:www-data /var/www
chmod -R 775 /var/www
nano /etc/sudoers
nerd ALL=(ALL) ALL
cd /var/www
git clone http://github.com/nerdsrescueme/nerd.git {SITE}
# CHMOD FILES
cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak
cp /var/www/{SITE}/var/httpd.conf /etc/apache2/sites-available/{SITE}
cp /var/www/{SITE}/var/php.ini /etc/php5/apache2/php.ini
cp /usr/share/doc/shorewall/examples/one-interface/* /etc/shorewall/
mkdir /var/www/{SITE}-logs
touch /var/www/{SITE}-logs/access.log
touch /var/www/{SITE}-logs/error.log
mysql -u root -p
CREATE DATABASE nerd;
GRANT ALL PRIVILEGES ON nerd.* TO nerd@127.0.0.1 IDENTIFIED BY 'nrmc1ph3r$' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON nerd.* TO nerd@localhost IDENTIFIED BY 'nrmc1ph3r$' WITH GRANT OPTION;
FLUSH PRIVILEGES;
QUIT
mysql -u nerd -p nerd < /var/www/{SITE}/var/schema_01.sql
nano /etc/apache2/sites-available/{SITE}
# CHANGE {SITE} TO SITE NAME (FIRST FEW LINES)
nano /etc/shorewall/rules
HTTP/ACCEPT net $FW
SSH/ACCEPT net $FW
#EOF
nano /etc/default/shorewall
startup=1
a2enmod vhost_alias
a2enmod expires
a2enmod headers
a2enmod rewrite
a2enmod ssl
a2enmod filter
a2dismod status
a2dissite default
a2ensite {SITE}
service shorewall start
service apache2 restart
# EDIT /etc/apache2/apache2.conf
# EDIT FILES IN /etc/apache2/conf.d
# EDIT FILES IN /etc/php5/apache2/conf.d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment