Home

drupal.ls.net

Navigation

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

Core security advisories

  • SA-CORE-2009-009 - Drupal Core - Cross site scripting
more

Contrib security advisories

  • SA-CONTRIB-2010-015 - Signwriter - Arbitrary code execution
  • SA-CONTRIB-2010-014 - Node Export - Arbitrary code execution
  • SA-CONTRIB-2010-013 - Menu Breadcrumb - Cross site scripting
  • SA-CONTRIB-2010-012 - ODF Import - Access Bypass (possible Cross Site Scripting)
  • SA-CONTRIB-2010-011 - Feedback - Cross Site Scripting
more

Jobs

  • Drupal Application Developer | DPG Associates Web Design (DPG)
  • Drupal Themer / Graphic Artist | Startup
  • Web Support | KCGP.ORG
  • Freelance Drupal Web Developer | Baraka Financial Group
  • Senior Drupal Develper | InCom
more

Domains

  • http://bridle-creek.com
  • http://demo.mydllurth.com
  • http://downtowngalax.com
  • http://drupal.ls.net
  • http://crossleft.org/
  • http://cuttingedgelaw.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

« February 2010
SunMonTueWedThuFriSat
123456
78910111213
14151617181920
21222324252627
28

install script for ubuntu and debian

Submitted by webmaster on Sat, 09/13/2008 - 11: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