Created
November 30, 2011 16:04
-
-
Save nerdsrescueme/1409612 to your computer and use it in GitHub Desktop.
Nerd Server
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
Timeout 25 | |
KeepAlive On | |
MaxKeepAliveRequests 250 | |
KeepAliveTimeout 8 | |
HostnameLookups Off | |
ServerName nerdcms.nerdsrescue.me | |
ServerTokens Prod | |
ServerSignature Off |
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
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 [email protected] 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