Changes between Version 4 and Version 5 of DebianLinux
- Timestamp:
- Jan 26, 2009, 12:14:35 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DebianLinux
v4 v5 51 51 === 0.3 Install useful packages === 52 52 53 {{{ 53 54 apt-get install sash # A statically link root shell for fixing fatal mistakes 54 55 apt-get install sshd # Secure shell because telnet is bad. 55 56 apt-get install dpkg-dev # Needed to use source packages 56 57 }}} 57 58 Stable version of tune2fs doesn't support ext3 journals, use testing version of the e2fsprogs package 58 59 60 {{{ 59 61 vi /etc/apt/sources.list; apt-get update # point apt at testing distro 60 62 apt-get install e2fsprogs 61 63 }}} 62 64 Since writing this, I have left apt pointing to testing (woody) since most of the libraries are closer to what !MapServer wants compared to stable (2.2r6). 63 65 … … 82 84 === 1.3 PHP === 83 85 I like DSOs for regular PHP work on the server, so let's compile a DSO for PHP and a CGI version that will only be used with PHPMapscript pages (.phtml) 84 86 {{{ 85 87 apt-get install flex # PHP needs lex to compile 86 88 apt-get install apache # else PHP and apache conflict on apache-common version … … 88 90 apt-get install php4 89 91 apt-get source php4 # Probably needed for PHPMapscript to compile against 90 92 }}} 91 93 We need to compile PHP since the Debian pacakge has --with-regex=PHP while the 3.6 configure.in says that --with-system-regex should be used. (and we want a CGI as well anyway) 92 94 93 95 === 1.3.1 libPDF === 94 96 I am currently compiling in libPDF into PHP, native Mapserver PDF may be a far neater solution, but this has been convenient and I can use PDF in other apps. PDFlib is not available as a package so we must compile it: 95 97 {{{ 96 98 cd /usr/src/pdflib-4.0.2 97 99 ./configure … … 99 101 make test 100 102 make install 101 103 }}} 102 104 === 1.3.2 !PosgreSQL === 103 105 … … 106 108 === 1.3.2 Compiling and installing PHP === 107 109 For PHP 4.1.2 source retrived by apt-source, I used: 108 110 {{{ 109 111 apt-get install libtiff3g # Required by PHP PDF functions 110 112 ./configure --with-mysql --with-apxs --with-regex=system --with-postgresql --with-pdflib=/usr/local --with-jpeg --with-tiff --with-zlib 111 113 make 112 114 }}} 113 115 Since we are not making major changes, let's just replace the PHP DSO rather than running make install: 114 116 {{{ 115 117 cd /usr/lib/apache/1.3 116 118 mv libphp4.so libphp4.so.debian412 … … 118 120 ln -s libphp4.so.mapserv libphp.so 119 121 /etc/init.d/apache restart 120 122 }}} 121 123 This creates an Apache DSO which Mapserver will refuse to use, but I want to keep the majority of my PHP running from the DSO. Therefore I will compile PHP a second time as a CGI and only associate PHP/Mapscript? with .phtml. To create a CGI php executable: 122 124 {{{ 123 125 ./configure --with-mysql --with-regex=system --with-postgresql --with-gd --with-jpeg --with-png --with-freetype --with-pdflib=/usr/local --with-zlib --enable-force-cgi-redirect 124 126 make 125 127 }}} 126 128 To install, follow the instructions in PHPMapScriptCGI (in my case to associate .phtml with the CGI version of PHP), do read these instructions as there are important security considerations to be made. 127 129 {{{ 128 130 cp php /usr/lib/cgi-bin/ 129 131 vi /etc/apache/srm.conf … … 132 134 vi /etc/apache/httpd.conf # uncommment mod_actions.so 133 135 /etc/init.d/apache restart 134 136 }}} 135 137 === 1.4 GDAL and OGR === 136 138 GDAL wants g++, g++ wants libraries from the testing distribution so on advice from a Debian expert, I will leave apt pointed at testing. 137 139 {{{ 138 140 cd /usr/src/gdal-1.1.7 139 141 apt-get install g++ … … 143 145 vi /etc/ld.so.conf # add /usr/local/lib to libs 144 146 ldconfig # updates changes to ld.so.conf 145 146 Mapserver 3.7 seems to require GDAL 1.1.8 for to get "CSLFetchBoolean?"147 }}} 148 !MapServer 3.7 seems to require GDAL 1.1.8 for to get "CSLFetchBoolean?" 147 149 148 150 === 2.0 Compile !MapServer === 149 151 Remember to remove ./config.cache if you change anything! I re-installed GD three times before I noticed this. 150 152 {{{ 151 153 apt-get install libwww0 # Needed by --with-wmsclient 152 154 apt-get install libwww-dev # Also needed by --with-wmsclient … … 159 161 160 162 make 161 163 }}} 162 164 These notes were written for v 3.6.0, but I have recompiled using 3.6.3 and 3.7 with only minor differences (the replacement of libwww with libcurl and the addition of PDFlib and Ming). 163 165 164 166 === 3.0 Install !MapServer === 165 167 {{ 166 168 cp ./.libs/php_mapscript.so /usr/lib/php/20010901/ 167 169 # This next bit is an ugly hack until I set up PHP to look at … … 171 173 172 174 cp mapserv /usr/lib/cgi-bin # Only needed for our older CGI based apps 173 175 }}} 174 176 === 4.0 Testing === 175 177 176 Install MapServer 4.2.2 and PHPMapScript from Debian Binary Packages 178 ==== Install MapServer 4.2.2 and PHPMapScript from Debian Binary Packages ==== 177 179 178 180 Add the next line in /etc/apt/sources.list … … 187 189 188 190 And execute: 189 191 {{{ 190 192 apt-get update ; 191 193 apt-get install php-mapscript cgi-mapserver php4 192 194 }}} 193 195 More info in http://agrogeomatic.educagri.fr/debian