Benutzer-Werkzeuge

Webseiten-Werkzeuge


howto:openwrt-vm

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
howto:openwrt-vm [2010/12/04 00:18] – [How do I install volkszaehler in a VMware running OpenWRT] justinotherguyhowto:openwrt-vm [2019/11/04 11:24] (aktuell) – Warnung Version jau
Zeile 1: Zeile 1:
-<note important>This page is still under contruction!</note>+===== Volkszaehler in einer VMware mit OpenWRT installieren =====
  
-<note important>This howto is under construction!</note> +<note warning>Diese Anleitung ist lange nicht mehr aktualisiert worden und weicht in wichtigen Punkten von der aktuellen Version ab.\\ 
- +This description is out of date, it differs in important steps from the actual version.</note>
- +
-===== How do I install volkszaehler in a VMware running OpenWRT =====+
  
 keeping to [[http://wiki.openwrt.org/oldwiki/RunningKamikazeOnVMwareHowTo|this howto]] do this: keeping to [[http://wiki.openwrt.org/oldwiki/RunningKamikazeOnVMwareHowTo|this howto]] do this:
Zeile 12: Zeile 10:
   * download [[http://volkszaehler.org/sparedisk-1G.vmdk.gz|the g'zipped prebuilt 1 GB spare disk image in vmware disk image format]] and gunzip it or roll your own:   * download [[http://volkszaehler.org/sparedisk-1G.vmdk.gz|the g'zipped prebuilt 1 GB spare disk image in vmware disk image format]] and gunzip it or roll your own:
     * create a new file system for the db in an appropiate size - you might want to start with 1 GB:     * create a new file system for the db in an appropiate size - you might want to start with 1 GB:
-      * dd if=/dev/zero of=disk.img bs=100M count=10+<code>dd if=/dev/zero of=disk.img bs=1024M count=10</code>
     * create an ext2 file system in that image     * create an ext2 file system in that image
-      * mkfs.ext2 sparedisk-1G.img+<code>mkfs.ext2 sparedisk-1G.img</code>
     * convert the image using qemu-img from the package „qemu“ (Ubuntu/Debian):     * convert the image using qemu-img from the package „qemu“ (Ubuntu/Debian):
-      * qemu-img convert -f raw sparedisk-1G.img -O vmdk sparedisk-1G.vmdk+<code>qemu-img convert -f raw sparedisk-1G.img -O vmdk sparedisk-1G.vmdk</code>
   * get the [[http://volkszaehler.org/backfire-10.03.1-openwrt-x86-2.6-ext2.vmx|VMware configuration file]]   * get the [[http://volkszaehler.org/backfire-10.03.1-openwrt-x86-2.6-ext2.vmx|VMware configuration file]]
   * open the vmx file with VMWare Player   * open the vmx file with VMWare Player
Zeile 27: Zeile 25:
 </code> </code>
   * restart your network using the new settings:   * restart your network using the new settings:
-    * /etc/init.d/network restart+<code>/etc/init.d/network restart</code>
   * set a new root password:    * set a new root password: 
-    * passwd +<code>passwd</code> 
-  * update package list: +  * retrieve current package list: 
-    opkg update+<code>opkg update</code>
   * mount overlay file system:   * mount overlay file system:
-    * mount /dev/sdb1 /overlay+<code>mount /dev/sdb1 /overlay</code>
   * move dirs with high disk space requirements to overlay file system:   * move dirs with high disk space requirements to overlay file system:
-    * mv /mnt/data/mysql /overlay +<code> 
-    ln -s /overlay/mysql/ /mnt/data/ +mkdir /overlay/mysql 
-    * mv /usr/libexec /overlay +mkdir /mnt/data 
-    ln -s /overlay/libexec/ /usr/ +ln -s /overlay/mysql/ /mnt/data/ 
-  * retrieve current package list: +mkdir /overlay/libexec 
-    * opkg update+ln -s /overlay/libexec/ /usr/ 
 +</code>
   * install required packages:   * install required packages:
-    * opkg install mysql-server php5-mod-mysql lighttpd coreutils-su php5-mod-pdo-mysql php5-mod-json git bash php5-cgi php5-cli libsqlite3 lighttpd-mod-fastcgi php5-mod-session lighttpd-mod-cgi+<code>opkg install mysql-server php5-mod-mysql lighttpd coreutils-su php5-mod-pdo-mysql php5-mod-json php5-mod-sockets git bash php5-cgi libsqlite3 lighttpd-mod-fastcgi php5-mod-session lighttpd-mod-cgi php5-mod-ctype</code>
       * remarks: bash for install script (temporary) (php -> php-cli)       * remarks: bash for install script (temporary) (php -> php-cli)
 +<code>
 mkdir -p /mnt/data/mysql mkdir -p /mnt/data/mysql
 ln -s /usr/bin/hostname /bin/ ln -s /usr/bin/hostname /bin/
 mysql_install_db --force (weil: /usr/bin/resolveip ist nicht da) mysql_install_db --force (weil: /usr/bin/resolveip ist nicht da)
-  * clone volkszaehler.org: +</code> 
-    cd /overlay +     * clone volkszaehler.org: 
-    git clone git://github.com/volkszaehler/volkszaehler.org.git +<code> 
-  run installer+cd /overlay 
-    * bash /overlay/volkszaehler.org/share/tools/install.sh +git clone git:\/\/github.com/volkszaehler/volkszaehler.org.git 
-    * set doctrine path to "/overlay/lib/doctrine" +cd /overlay/volkszaehler.org/volkszaehler.org/middleware/ 
-    * set volkszaehler path to "/overlay/www/vz" +</code> 
-    * opkg remove luci-core luci-uci luci-theme-openwrt luci-web luci-sgi-cgi luci-http luci-app-firewall luci-admin-core  +    copy the config template and modify it to your needs: 
-luci-sys luci-uvl luci-lmo luci-app-initmgr luci-ipkg luci-cbi luci-admin-mini luci-admin-full luci-ipkg luci-admin-core  luci-web luci-cbi  luci-uvl luci-i18n-english luci-lmo luci-uci uhttpd +<code> 
 +cp volkszaehler.conf.template.php volkszaehler.conf.php 
 +volkszaehler.conf.php: 
 +$config['db']['user'                          = '<db-user>'; 
 +$config['db']['password'                      = 'demo'; 
 +</code> 
 +    * run installer: 
 +<code>bash /overlay/volkszaehler.org/share/tools/install.sh</code> 
 +      * set doctrine path to "/overlay/lib/doctrine" 
 +      * set volkszaehler path to "/overlay/www/vz" 
 +    * stop uhttpd before removing it 
 +<code>/etc/init.d/uhttpd stop</code> 
 +    * now remove uhttpd and all packages that depend on uhttpd: 
 +<code>opkg remove luci-core luci-uci luci-theme-openwrt luci-web luci-sgi-cgi luci-http luci-app-firewall luci-admin-core luci-sys luci-uvl luci-lmo luci-app-initmgr luci-ipkg luci-cbi luci-admin-mini luci-admin-full luci-ipkg luci-admin-core luci-cbi luci-uvl luci-i18n-english luci-uci uhttpd</code> 
 +   * modify /etc/lighttpd/lighttpd.conf:
 <code> <code>
-  "To start mysqld at boot time you have to copy support-files/mysql.server 
-to the right place for your system" 
-cd /usr ; /usr/bin/mysqld & (ohne _safe, weil nicht da!) 
-/usr/bin/mysqladmin -u root password 'new-password' 
-/usr/bin/mysqladmin -u root -h backfire password 'new-password' 
-(benchmark: cd sql-bench ; perl run-all-tests) 
- 
- 
-/etc/lighttpd/lighttpd.conf: 
 server.document-root = "/overlay/www/" server.document-root = "/overlay/www/"
 +index-file.names = ( "index.html", "index.php", "default.html", "index.htm", "default.htm" )
 +</code>
 +   * modify /etc/php.ini:
 +<code>
 +doc_root = "/overlay/www"
 +; Dynamic Extensions               
 +extension=ctype.so
 +extension=json.so       
 +extension=pdo.so 
 +extension=pdo-mysql.so
 +extension=session.so               
 +extension=sockets.so        
 +</code>
 +
 +  * enable (normal) cgi modify /etc/lighttpd/lighttpd.conf:
 +<code>
 +cgi.assign = ( ".php" => "/usr/bin/php-cgi" )    
 +</code>
 +  * or else enable fastcgi modify /etc/lighttpd/lighttpd.conf:
 +<code>
 fastcgi.server = (                              fastcgi.server = (                             
         ".php" => (                     ".php" => (            
Zeile 79: Zeile 102:
 server.modules = ( server.modules = (
         "mod_fastcgi",         "mod_fastcgi",
-                   +     
-cgi.assign = ( ".php" => "/usr/bin/php-cgi" )    +
 </code> </code>
 +
 +todos:
 +  * mount /overlay at boot time
 +  * start mysqld at boot time ("To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system"
 +    * cd /usr ; /usr/bin/mysqld & (ohne _safe, weil nicht da!)
 +    * /usr/bin/mysqladmin -u root password 'new-password'
 +    * /usr/bin/mysqladmin -u root -h backfire password 'new-password'
 +  * start lighttpd at boot time
howto/openwrt-vm.1291418280.txt.gz · Zuletzt geändert: 2011/05/29 13:09 (Externe Bearbeitung)