[pve-devel] r5913 - in dab-pve-appliances/trunk: . debian-6.0-wordpress
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri May 6 08:22:24 CEST 2011
Author: dietmar
Date: 2011-05-06 08:22:24 +0200 (Fri, 06 May 2011)
New Revision: 5913
Added:
dab-pve-appliances/trunk/debian-6.0-wordpress/
dab-pve-appliances/trunk/debian-6.0-wordpress/Makefile
dab-pve-appliances/trunk/debian-6.0-wordpress/dab.conf
dab-pve-appliances/trunk/debian-6.0-wordpress/latest.tar.gz
dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress.conf
dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress_setup
Log:
iinitial import
Added: dab-pve-appliances/trunk/debian-6.0-wordpress/Makefile
===================================================================
--- dab-pve-appliances/trunk/debian-6.0-wordpress/Makefile (rev 0)
+++ dab-pve-appliances/trunk/debian-6.0-wordpress/Makefile 2011-05-06 06:22:24 UTC (rev 5913)
@@ -0,0 +1,35 @@
+
+
+BASEDIR:=$(shell dab basedir)
+
+all: info/init_ok
+ dab bootstrap
+ dab task mysql --password random
+ dab install apache2-mpm-prefork
+ dab task php
+ sed -e 's/^\s*display_errors\s*=\s*On/display_errors = Off/' -i ${BASEDIR}/etc/php5/apache2/php.ini
+ dab install php5-mysql
+ tar xzf latest.tar.gz -C ${BASEDIR}/var/www/
+ # change owner, in order to enable web based updates
+ dab exec chown -R www-data.www-data /var/www/wordpress
+ install -m 0644 wordpress.conf ${BASEDIR}/etc/apache2/sites-available/wordpress
+ install -m 0755 wordpress_setup ${BASEDIR}/etc/init.d/
+ dab exec insserv wordpress_setup
+ dab exec a2enmod rewrite
+ dab exec a2dissite default
+ dab exec a2ensite wordpress
+ dab finalize
+
+info/init_ok: dab.conf
+ dab init
+ touch $@
+
+.PHONY: clean
+clean:
+ dab clean
+ rm -f *~
+
+.PHONY: dist-clean
+dist-clean:
+ dab dist-clean
+ rm -f *~
\ No newline at end of file
Added: dab-pve-appliances/trunk/debian-6.0-wordpress/dab.conf
===================================================================
--- dab-pve-appliances/trunk/debian-6.0-wordpress/dab.conf (rev 0)
+++ dab-pve-appliances/trunk/debian-6.0-wordpress/dab.conf 2011-05-06 06:22:24 UTC (rev 5913)
@@ -0,0 +1,18 @@
+Suite: squeeze
+CacheDir: ../cache
+Source: http://ftp.debian.org/debian SUITE main contrib
+Source: http://ftp.debian.org/debian SUITE-updates main contrib
+Source: http://security.debian.org SUITE/updates main contrib
+Mirror: http://ftp.debian.org/debian => http://mirror.maurer-it.com/debian
+Mirror: http://security.debian.org => http://mirror.maurer-it.com/debian-security
+Architecture: i386
+Name: wordpress
+Version: 3.1.2-1
+Section: www
+Maintainer: Proxmox Support Team <support at proxmox.com>
+Infopage: http://pve.proxmox.com/wiki/Wordpress
+ManageUrl: http://__IPADDRESS__/
+Description: Wordpress
+ WordPress is a state-of-the-art publishing platform with a
+ focus on aesthetics, web standards, and usability.
+ WordPress is both free and priceless at the same time.
Added: dab-pve-appliances/trunk/debian-6.0-wordpress/latest.tar.gz
===================================================================
(Binary files differ)
Property changes on: dab-pve-appliances/trunk/debian-6.0-wordpress/latest.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress.conf
===================================================================
--- dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress.conf (rev 0)
+++ dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress.conf 2011-05-06 06:22:24 UTC (rev 5913)
@@ -0,0 +1,38 @@
+ServerAdmin webmaster at loalhost
+ServerSignature Off
+ServerTokens Prod
+
+<IfModule mpm_prefork_module>
+ StartServers 2
+ MinSpareServers 1
+ MaxSpareServers 2
+ MaxClients 50
+ MaxRequestsPerChild 100
+</IfModule>
+
+
+<VirtualHost *:80>
+
+DocumentRoot /var/www/wordpress
+
+<Directory />
+ Options FollowSymLinks
+ AllowOverride None
+</Directory>
+
+<Directory /var/www/wordpress>
+ Options FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ allow from all
+</Directory>
+
+ErrorLog /var/log/apache2/error.log
+
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+LogLevel warn
+
+CustomLog /var/log/apache2/access.log combined
+
+</VirtualHost>
Added: dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress_setup
===================================================================
--- dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress_setup (rev 0)
+++ dab-pve-appliances/trunk/debian-6.0-wordpress/wordpress_setup 2011-05-06 06:22:24 UTC (rev 5913)
@@ -0,0 +1,110 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: wordpress_siteconfig
+# Required-Start: $remote_fs mysql +mysql_randompw
+# Required-Stop:
+# X-Start-Before: apache2
+# Default-Start: 2
+# Default-Stop:
+# Short-Description: Generate Wordpress Siteconfig
+# Description: Generate Wordpress
+### END INIT INFO
+
+set -e
+
+DOMAIN=`grep '^search' /etc/resolv.conf|awk '{ print $2; }'`
+HNAME=`head -n 1 /etc/hostname|awk '{ print $1; }'`
+
+if [ "X${HNAME}" = "Xlocalhost" ] ; then
+ exit 0;
+fi
+
+echo "Generate Wordpress Siteconfig"
+
+# set HOME dir (for .my.cfg)
+export HOME=/root
+export USER=root
+
+PASSWD=`openssl rand -base64 9`
+
+mysql <<EOF
+# create the wordpress database user
+CREATE DATABASE wordpress;
+CREATE USER wordpress IDENTIFIED BY '${PASSWD}';
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY '${PASSWD}';
+FLUSH PRIVILEGES;
+QUIT
+EOF
+
+SKEY1=`openssl rand -base64 42`
+SKEY2=`openssl rand -base64 42`
+SKEY3=`openssl rand -base64 42`
+SKEY4=`openssl rand -base64 42`
+
+cat <<EOF > /var/www/wordpress/wp-config.php
+<?php
+// ** MySQL settings - You can get this info from your web host ** //
+/** The name of the database for WordPress */
+define('DB_NAME', 'wordpress');
+
+/** MySQL database username */
+define('DB_USER', 'wordpress');
+
+/** MySQL database password */
+define('DB_PASSWORD', '${PASSWD}');
+
+/** MySQL hostname */
+define('DB_HOST', 'localhost');
+
+/** Database Charset to use in creating database tables. */
+define('DB_CHARSET', 'utf8');
+
+/** The Database Collate type. Don't change this if in doubt. */
+define('DB_COLLATE', '');
+
+/**#@+
+ * Authentication Unique Keys.
+ *
+ * Change these to different unique phrases!
+ * You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
+ *
+ * @since 2.6.0
+ */
+define('AUTH_KEY', '${SKEY1}');
+define('SECURE_AUTH_KEY', '${SKEY2}');
+define('LOGGED_IN_KEY', '${SKEY3}');
+define('NONCE_KEY', '${SKEY4}');
+/**#@-*/
+
+/**
+ * WordPress Database Table prefix.
+ *
+ * You can have multiple installations in one database if you give each a unique
+ * prefix. Only numbers, letters, and underscores please!
+ */
+\$table_prefix = 'wp_';
+
+/**
+ * WordPress Localized Language, defaults to English.
+ *
+ * Change this to localize WordPress. A corresponding MO file for the chosen
+ * language must be installed to wp-content/languages. For example, install
+ * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
+ * language support.
+ */
+define ('WPLANG', '');
+
+/* That's all, stop editing! Happy blogging. */
+
+/** WordPress absolute path to the Wordpress directory. */
+if ( !defined('ABSPATH') )
+ define('ABSPATH', dirname(__FILE__) . '/');
+
+/** Sets up WordPress vars and included files. */
+require_once(ABSPATH . 'wp-settings.php');
+?>
+EOF
+
+insserv -r wordpress_setup
+rm -f /etc/init.d/wordpress_setup
+
More information about the pve-devel
mailing list