DokuWiki

It's better when it's simple

User Tools

Site Tools


install:opensuse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
install:opensuse [2013-10-21 23:27] Klap-ininstall:opensuse [2015-08-10 13:16] (current) – replaced username with $HOME 2001:4dd0:ff00:9581:552f:20cd:616c:16b3
Line 10: Line 10:
  
 On **2012-11-16** I edited the script so that the config files are now in ''/etc/DokuWiki'', and the ''conf'' directory inside the DokuWiki source tree is a symbolic link to the new location. On **2012-11-16** I edited the script so that the config files are now in ''/etc/DokuWiki'', and the ''conf'' directory inside the DokuWiki source tree is a symbolic link to the new location.
 +
 +On **2015-07-02** I edited the script again so that the scripts now stay with "/usr/bin/php" instead of my modification "/usr/bin/php5". Plus the generated Apache config file contains code for Apache 2.2 and 2.4 now.
  
 <code bash prepdw.sh> <code bash prepdw.sh>
Line 18: Line 20:
 set -x set -x
  
-RELEASE='2012-10-13' +RELEASE='2015-08-10'      # hey, that's my birthday :)
-NEWNAME=$(echo "$RELEASE" | tr '-' '.') +
-WORKDIR='/home/werner/openSUSE/home:werfl/dw-temp'+
 NO_OF_COMP=5 NO_OF_COMP=5
 +NEWNAME=$(echo "$RELEASE" | tr '-' '.')
 +WORKDIR="$HOME/openSUSE/home:werfl/dw-temp"
 WWWDIR="$WORKDIR/DokuWiki/srv/www" WWWDIR="$WORKDIR/DokuWiki/srv/www"
 NEWCONFDIR='/etc/DokuWiki' NEWCONFDIR='/etc/DokuWiki'
Line 30: Line 32:
  
 # assume the standard download location # assume the standard download location
-DLFROM='http://www.splitbrain.org/_media/projects/dokuwiki' +DLFROM='http://download.dokuwiki.org/src/dokuwiki' 
-DLFILE="dokuwiki-${RELEASE}.tgz" +DLFILE="dokuwiki-stable.tgz"
-# http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2009-12-25.tgz+
 # and get the file # and get the file
 wget -O "${WWWDIR}/DokuWiki.tgz" "${DLFROM}/${DLFILE}" wget -O "${WWWDIR}/DokuWiki.tgz" "${DLFROM}/${DLFILE}"
Line 51: Line 52:
 find "$WWWDIR/DokuWiki" -type f -executable | xargs chmod -x find "$WWWDIR/DokuWiki" -type f -executable | xargs chmod -x
 chmod +x $WWWDIR/DokuWiki/bin/*php chmod +x $WWWDIR/DokuWiki/bin/*php
-for DAT in $WWWDIR/DokuWiki/bin/*php; do 
-    sed -i 's|/usr/bin/php|/usr/bin/php5|' $DAT 
-done 
  
-# write config for Apache+# write config for Apache 2.2 and 2.4
 # delete .htaccess, move it into Apache's conf # delete .htaccess, move it into Apache's conf
 cd "$WORKDIR/DokuWiki/etc" || exit 15 cd "$WORKDIR/DokuWiki/etc" || exit 15
Line 63: Line 61:
 <Directory "/srv/www/DokuWiki/"> <Directory "/srv/www/DokuWiki/">
     Options None     Options None
 +    AllowOverride All
     <IfModule mod_dir.c>     <IfModule mod_dir.c>
         DirectoryIndex doku.php index.html index.htm         DirectoryIndex doku.php index.html index.htm
     </IfModule>     </IfModule>
-    AllowOverride All +    <IfModule mod_authz_core.c> 
-    Order allow,deny +      # Apache 2.4 
-    Allow from all+      Require all granted 
 +    </IfModule> 
 +    <IfModule !mod_authz_core.c> 
 +      # Apache 2.2 
 +      Order allow,deny 
 +      Allow from all 
 +    </IfModule>
 </Directory> </Directory>
  
 EOT EOT
 +
 for SUBDIR in $HTACCESSLIST; do for SUBDIR in $HTACCESSLIST; do
-        RELDIR=${SUBDIR#${WORKDIR}/DokuWiki} +    RELDIR=${SUBDIR#${WORKDIR}/DokuWiki} 
-        RELDIR=${RELDIR%/.htacc*} +    RELDIR=${RELDIR%/.htacc*} 
-        echo "<Directory \"$RELDIR\">" >> 'apache2/conf.d/DokuWiki.conf' +    echo "<Directory \"$RELDIR\">" >> "apache2/conf.d/DokuWiki.conf" 
-        cat "$SUBDIR"                  >> 'apache2/conf.d/DokuWiki.conf' +    cat "$SUBDIR"                  >> "apache2/conf.d/DokuWiki.conf" 
-        echo "</Directory>"            >> 'apache2/conf.d/DokuWiki.conf' +    echo "</Directory>"            >> "apache2/conf.d/DokuWiki.conf" 
-        echo " "                       >> 'apache2/conf.d/DokuWiki.conf' +    echo " "                       >> "apache2/conf.d/DokuWiki.conf" 
-        rm "$SUBDIR"+    rm "$SUBDIR"
 done done
-dos2unix -o 'apache2/conf.d/DokuWiki.conf'+dos2unix -o 'apache2/conf.d/DokuWiki.conf.*'
  
 cd "$WORKDIR" || exit 19 cd "$WORKDIR" || exit 19
Line 96: Line 102:
 # Spec File for Package DokuWiki # Spec File for Package DokuWiki
 # #
-Summary:        DokuWiki, a Wiki written in PHP to work without a database +Summary:        Wiki written in PHP to work without a database 
-Summary(de):    DokuWiki, ein in PHP geschriebenes Wiki, das keine Datenbank benutzt+Summary(de):    Ein in PHP geschriebenes Wiki, das keine Datenbank benutzt
 Name:           DokuWiki Name:           DokuWiki
-Version:        2012.10.13+Version:        2015.08.10
 Release:        1%{?dist} Release:        1%{?dist}
-License:        GPL v2+License:        GPL-2.0
 Group:          Productivity/Publishing/Other Group:          Productivity/Publishing/Other
 Distribution:   openSUSE Linux Distribution:   openSUSE Linux
Line 107: Line 113:
 URL:            http://www.dokuwiki.org/ URL:            http://www.dokuwiki.org/
 Requires:       apache2-mod_php5 Requires:       apache2-mod_php5
-Requires:       php5 >= 5.1.2+Requires:       php5 >= 5.3
 PreReq:         coreutils PreReq:         coreutils
 PreReq:         apache2 PreReq:         apache2
Line 167: Line 173:
 %attr (754, wwwrun, www) /srv/www/DokuWiki/bin/indexer.php %attr (754, wwwrun, www) /srv/www/DokuWiki/bin/indexer.php
 %attr (754, wwwrun, www) /srv/www/DokuWiki/bin/wantedpages.php %attr (754, wwwrun, www) /srv/www/DokuWiki/bin/wantedpages.php
 +%attr (754, wwwrun, www) /srv/www/DokuWiki/inc/phpseclib/update.sh
 +%attr (754, wwwrun, www) /srv/www/DokuWiki/lib/scripts/jquery/update.sh
  
 %post %post
 +
 </code> </code>
  
 You can use the ''spec'' file and the tarball that is produced by the shell script to build DokuWiki locally. Just save the ''spec'' file as ''/usr/src/packages/SPECS/DokuWiki.spec'', put the tarball into ''/usr/src/packages/SOURCES/'' and start ''rpmbuild -ba /usr/src/packages/SPECS/DokuWiki.spec''. The resulting rpm will appear in ''/usr/src/packages/RPMS/noarch/'' (plus a source rpm in ''/usr/src/packages/SRPMS/''). You can use the ''spec'' file and the tarball that is produced by the shell script to build DokuWiki locally. Just save the ''spec'' file as ''/usr/src/packages/SPECS/DokuWiki.spec'', put the tarball into ''/usr/src/packages/SOURCES/'' and start ''rpmbuild -ba /usr/src/packages/SPECS/DokuWiki.spec''. The resulting rpm will appear in ''/usr/src/packages/RPMS/noarch/'' (plus a source rpm in ''/usr/src/packages/SRPMS/'').
install/opensuse.1382390855.txt.gz · Last modified: 2013-10-21 23:27 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki