Create webserver info page
- Read more about Create webserver info page
- Log in to post comments
#!/bin/bash
cat < "$(grep DocumentRoot /etc/apache2/sites-available/default | cut -d " " -f2)/phpinfo.php"
<?php
phpinfo();
?>
EOF
#!/bin/bash
cat < "$(grep DocumentRoot /etc/apache2/sites-available/default | cut -d " " -f2)/phpinfo.php"
<?php
phpinfo();
?>
EOF
#!/bin/bash
mysqldump --host=${DB_FROM_HOST} --user=${DB_FROM_USER} --password=${DB_FROM_PASS} ${DB_FROM_NAME} | \
mysql --host=${DB_TO_HOST} --user=${DB_TO_USER} --password=${DB_TO_PASS} ${DB_TO_NAME}
<?php
if($_SERVER['PHP_SELF'] != "/index.php") {
echo '
';
}
?>
# set domU parameter
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=webmail
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:11:22:7d:7e:7f
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=256Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=2Gb
# create domU
http://www.panticz.de/Xen-domU-ubuntu-jaunty
# add to autostart (optional)
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto
# start domU
xm create -c ${DOMAIN_NAME}
# install webmail
http://www.panticz.de/install_roundcube
#!/bin/bash
LINK="http://weather.ou.edu/%7Eapw/projects/stress/stress-1.0.0.tar.gz"
# download and extract
wget $LINK -P /tmp
cd /tmp/
tar xzf stress-1.0.0.tar.gz
cd stress-1.0.0/
# compile
./configure && make
# optionaly you can install it or use the executable in src folder
make install
#!/bin/bash
sudo apt-get -y install build-essential
# create database
mysql -u root -p
create database drupal;
CREATE USER drupalo IDENTIFIED BY 'drupalp';
grant all on drupal.* to 'drupalo'@'%' identified by "drupalp";
commit;
quit;
# create installation file on your webserver
cat < /var/www/drupal-install.php
<?php
# dowload
system("/usr/local/bin/wget http://ftp.drupal.org/files/projects/drupal-6.19.tar.gz");
# extract
system("/usr/bin/tar xzf ./drupal-*.tar.gz");
# move drupal files to current dir
system("/bin/mv drupal-*/* .");
system("/bin/mv drupal-*/.* .");
# configure
system("/bin/cp ./sites/default/defa
DB_HOST=localhost
DB_NAME=db1
DB_USER=root
DB_PASS=pass1234
TARGET=/tmp
# export DB
mysqldump --host=${DB_HOST} --password=${DB_PASS} --user=${DB_USER} ${DB_NAME} | bzip2 --best > ${TARGET}/$(hostname -f)_${DB_NAME}_$(date -I).sql.bz2
# import DB
bzcat /tmp/db_dump_${DB_NAME}.sql.bz2 | mysql --host=localhost --user=${DB_USER} --password=${DB_PASS} ${DB_NAME}
mysql --host=localhost --user=${DB_USER} --password=${DB_PASS} ${DB_NAME} < dump.sql
# import bzip2 compressed file
bzip2 -dc dump.sql.bz2 | mysql --user=${DB_USER} --password=${DB_PASS} ${DB_NAME}
# get settings
gsettings list-recursively | grep -i gedit
gsettings list-recursively org.gnome.settings-daemon.plugins.power
dconf read /org/gnome/settings-daemon/plugins/media-keys/calculator
# unity
setsid unity
dconf dump /org/compiz/
# http://askubuntu.com/questions/67355/how-do-i-completely-turn-off-screensaver-and-power-management
# /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.preferences.gschema.xml
dconf watch /
http://askubuntu.com/questions/359593/is-it-possible-to-monitor-dconf-for-changes
# reset pannel settings
gconftool-2 --recursive-unset /apps/panel
d
#!/bin/bash
if [ $# -eq 0 ]; then
echo "USAGE $0 XEN_NAME DISK_SIZE RAM_SIZE DIST_NAME"
echo "Example: $0 srv1 4096 256 edgy"
exit
fi
XEN_NAME=$1
DISK_SIZE=$2
RAM_SIZE=$3
DIST_NAME=$4
# prepare directories
if [ ! -d /home/xen ]; then
mkdir /home/xen
fi
if [ ! -d /home/xen/domains ]; then
mkdir /home/xen/domains
fi
if [ !