Home

drupal.ls.net

Navigation

  • About
  • Blogs
  • Contact
  • Forums
  • Image galleries
  • Log in
  • Feed aggregator
Home Blogs webmaster's blog
    • Drupal
    • LSNet

Core security advisories

  • SA-CORE-2010-001 - Drupal core - Multiple vulnerabilities
  • SA-CORE-2009-009 - Drupal Core - Cross site scripting
more

Contrib security advisories

  • SA-CONTRIB-2010-026 - Monthly Archive by Node Type - Access Bypass
  • SA-CONTRIB-2010-025 - TinyMCE - Cross Site Scripting (XSS)
  • SA-CONTRIB-2010-024 - eTracker - Cross Site Scripting
  • SA-CONTRIB-2010-023 - Workflow - Cross Site Scripting
  • SA-CONTRIB-2010-022 - Internationalization - Arbitrary code execution
more

Drupal.org jobs feed

  • Expert Drupal consultant/developer | EquiSoft
  • Drupal ninja | Early stage social media start-up
  • Freelance Drupal developer | Echoleaf
  • Webbutvecklare | Two
  • Developer/Themer/All Rounder | Interactive Africa
more

Visit our client's websites

  • http://bridle-creek.com
  • http://demo.mydllurth.com
  • http://downtowngalax.com
  • http://drupal.ls.net
  • http://crossleft.org/
  • http://cuttingedgelaw.com/
  • http://new-river.dixongarner.com/
  • http://import.mydllurth.com
  • http://lyceum.mydllurth.com
  • http://mtvaleumc.org
  • http://news.mydllurth.com
  • http://oldcranks.com
  • http://psychguides.com
  • http://starbuck.net
  • http://stewartfurniture.com
  • http://tarvid.org
  • http://ubercart.ls.net
  • http://wolfeservices.net

Events

« March 2010 »
SunMonTueWedThuFriSat
123456
78910111213
14151617181920
21222324252627
28293031

install script for ubuntu and debian

Submitted by webmaster on Sat, 09/13/2008 - 12:16

usage: install_drupal user pass domain dbpass pdname

This script will create a user, apache2 configuration, dns configuration and a user file system read to invoke the Drupal install script;

#!/bin/bash
echo user=$1
echo password=$2
echo domain=$3
echo dbpass=$4
echo dbname=$5
useradd $1 -p `mkpasswd $2` 
mkdir /home/$1
mkdir /home/$1/public_html
cd /home/$1/public_html
wget http://ftp.drupal.org/files/projects/drupal-6.6.tar.gz
tar xzvf drupal-6.6.tar.gz
mv drupal-6.6 $3
mkdir /home/$1/public_html/$3/sites/all/modules
mkdir /home/$1/public_html/$3/sites/all/themes
mkdir /home/$1/public_html/$3/sites/default/files
chmod -R 777 /home/$1/public_html/$3/sites/default/files
cp /home/$1/public_html/$3/sites/default/default.settings.php /home/$1/public_html/$3/sites/default/settings.php
chmod 777 /home/$1/public_html/$3/sites/default/settings.php
chown -R $1.$1 /home/$1
mysql -uroot -p$4 -e "DROP USER '$1'@'localhost';"
mysql -uroot -p$4 -e "DROP DATABASE IF EXISTS $5;"
mysql -uroot -p$4 -e "CREATE USER '$1'@'localhost' IDENTIFIED BY '$2';"
mysql -uroot -p$4 -e "CREATE DATABASE IF NOT EXISTS $5;"
mysql -uroot -p$4 -e "GRANT USAGE ON $5.* TO '$1'@'localhost' IDENTIFIED BY '$2';"
mysql -uroot -p$4 -e "GRANT ALL PRIVILEGES ON $5.* TO '$1'@'localhost';"
mysql -uroot -p$4 -e "flush privileges;"
echo "<VirtualHost *>" >/etc/apache2/sites-available/$3
echo "  DocumentRoot /home/$1/public_html/$3" >>/etc/apache2/sites-available/$3
echo "  ServerName $3" >>/etc/apache2/sites-available/$3
echo "  <Directory /home/$1/public_html/$3>" >>/etc/apache2/sites-available/$3
echo "    allow from all" >>/etc/apache2/sites-available/$3
echo "    AllowOverride AuthConfig FileInfo Indexes Limit Options" >>/etc/apache2/sites-available/$3
echo "    Options FollowSymLinks SymLinksIfOwnerMatch +Indexes" >>/etc/apache2/sites-available/$3
echo "  </Directory>" >>/etc/apache2/sites-available/$3
echo "  ServerAlias www.$3" >>/etc/apache2/sites-available/$3
echo "</VirtualHost>" >>/etc/apache2/sites-available/$3
a2ensite $3
echo "\$TTL 86400" >/etc/bind/$3
echo "$3.	IN	SOA	www.$3. root.$3. (" >>/etc/bind/$3
echo "    `date +%Y%m%d`00" >>/etc/bind/$3
echo "    8H" >>/etc/bind/$3
echo "    2H" >>/etc/bind/$3
echo "    4W" >>/etc/bind/$3
echo "    1D)" >>/etc/bind/$3
echo "    IN NS `hostname`"  >>/etc/bind/$3
echo "$3 A `ifconfig|awk '/Bcast:/ {print $2}'|cut -d":" -f2`" >>/etc/bind/$3
echo "www.$3 A `ifconfig|awk '/Bcast:/ {print $2}'|cut -d":" -f2`" >>/etc/bind/$3
echo "zone \"$3\" {" >>/etc/bind/named.conf.local
echo "  type master;" >>/etc/bind/named.conf.local
echo "  file \"/etc/bind/$3\";" >>/etc/bind/named.conf.local
echo "  };" >>/etc/bind/named.conf.local
echo "127.0.0.1 $3" >>/etc/hosts
/etc/init.d/bind9 reload
/etc/init.d/apache2 force-reload

 

  • webmaster's blog
  • Login or register to post comments
  • Delicious
  • Digg
  • StumbleUpon
  • Facebook
  • Google
  • Technorati

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Powered by Drupal, an open source content management system
RoopleTheme