Bläddra i källkod

improve installation

Ralf S. Engelschall 18 år sedan
förälder
incheckning
67c95f251b
3 ändrade filer med 26 tillägg och 8 borttagningar
  1. 11 5
      joomla/joomla-apache.conf
  2. 2 2
      joomla/joomla-setup.sh
  3. 13 1
      joomla/joomla.spec

+ 11 - 5
joomla/joomla-apache.conf

@@ -87,18 +87,24 @@ php_admin_value   max_execution_time    60
 php_admin_value   max_input_time        60
 php_admin_value   memory_limit          8M
 php_admin_value   post_max_size         8M
-php_admin_value   include_path          .:@l_prefix@/lib/joomla
+php_admin_value   include_path          .:@l_prefix@/lib/joomla/runtime
 
 #   configure Joomla!
 RewriteEngine     on
 RewriteRule       ^/$ /joomla/ [R,L]
-Alias             /joomla @l_prefix@/lib/joomla
-DocumentRoot      @l_prefix@/lib/joomla
+Alias             /joomla @l_prefix@/lib/joomla/runtime
+DocumentRoot      @l_prefix@/lib/joomla/runtime
 DirectoryIndex    index.php
-<Directory        "@l_prefix@/lib/joomla">
-    Options       Indexes ExecCGI
+<Directory        "@l_prefix@/lib/joomla/runtime">
+    Options       Indexes ExecCGI FollowSymLinks
     AllowOverride None
     Order         allow,deny
     Allow         from all
+    RewriteEngine On
+    RewriteCond   %{REQUEST_URI} ^(/component/option,com)        [NC,OR]
+    RewriteCond   %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
+    RewriteCond   %{REQUEST_FILENAME} !-f
+    RewriteCond   %{REQUEST_FILENAME} !-d
+    RewriteRule   (.*) index.php
 </Directory>
 

+ 2 - 2
joomla/joomla-setup.sh

@@ -26,8 +26,8 @@ case "$cmd" in
 
         #   activate installer
         rm -f @l_prefix@/lib/joomla/runtime/configuration.php
-        rm -f @l_prefix@/lib/joomla/runtime/installation >/dev/null 2>&1 || true
-        ln -s ../installation @l_prefix@/lib/joomla/runtime/installation
+        rm -rf @l_prefix@/lib/joomla/runtime/installation >/dev/null 2>&1 || true
+        cp -rp @l_prefix@/lib/joomla/installation @l_prefix@/lib/joomla/runtime/
         ;;
     cleanup )
         #   deactivate installer

+ 13 - 1
joomla/joomla.spec

@@ -58,6 +58,7 @@ PreReq:       apache-php::with_pcre = yes
 PreReq:       apache-php::with_xml = yes
 PreReq:       apache-php::with_gd = yes
 PreReq:       apache-php::with_mm = yes
+PreReq:       MTA
 AutoReq:      no
 AutoReqProv:  no
 
@@ -92,11 +93,17 @@ AutoReqProv:  no
     mv  "libraries/simplepie/compatibility_test/COMPATIBILITY README.txt" \
         "libraries/simplepie/compatibility_test/COMPATIBILITY-README.txt"
 
+    #   adjust default configuration
+    %{l_shtool} subst \
+        -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;' \
+        installation/template/tmpl/configuration.html
+
     #   install main program files
     find . -name ".#*" -print | xargs rm -f
     find . -name "*.orig" -print | xargs rm -f
     cp -rp * $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/
     rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/configuration.php-dist
+    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/htaccess.txt
 
     #   post-adjustment: move risky installation area out of runtime area
     #   (will be dynmically linked in again later)
@@ -148,8 +155,13 @@ AutoReqProv:  no
           echo "   \$ $RPM_INSTALL_PREFIX/sbin/joomla-setup install"
           echo "3. start the Joomla! Apache webserver:"
           echo "   \$ $RPM_INSTALL_PREFIX/bin/openpkg rc joomla start"
-          echo "4. setup Joomla! through the Web installer:"
+          echo "4. setup Joomla! through the Web installer..."
           echo "   http://localhost:8080/joomla/"
+          echo "   ..and on page \"4: Database\" use:"
+          echo "   - Host Name:     \"localhost\""
+          echo "   - User Name:     \"joomla\""
+          echo "   - Password:      \"joomla\""
+          echo "   - Database Name: \"joomla\""
           echo "5. fixup installation afterwards:"
           echo "   \$ $RPM_INSTALL_PREFIX/sbin/joomla-setup cleanup"
           echo "6. access Joomla! via:"