Archive

Posts Tagged ‘apache’

Installing PHP on OSX

December 28th, 2011 rupert No comments

I need wordpress + nominatim running on OSX and since it uses php…

http://www.php.net/manual/en/install.unix.apache2.php

1. Installation

./configure --prefix=/usr/local/php-5.3.8 --with-mysql --with-pgsql=/usr/local/postgresql --with-apxs2=/usr/local/apache2/bin/apxs
make
sudo make install
rupert-mbp~/Desktop/php-5.3.8% sudo make install
Password:
Installing PHP SAPI module:       apache2handler
/usr/local/apache2.2.14/build/instdso.sh SH_LIBTOOL='/usr/local/apache2.2.14/build/libtool' libs/libphp5.so /usr/local/apache2.2.14/modules
/usr/local/apache2.2.14/build/libtool --mode=install cp libs/libphp5.so /usr/local/apache2.2.14/modules/
cp libs/libphp5.so /usr/local/apache2.2.14/modules/libphp5.so
Warning!  dlname not found in /usr/local/apache2.2.14/modules/libphp5.so.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2.2.14/modules/libphp5.so
[activating module `php5' in /usr/local/apache2.2.14/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/php-5.3.8/bin/
Installing PHP CLI man page:      /usr/local/php-5.3.8/man/man1/
Installing build environment:     /usr/local/php-5.3.8/lib/php/build/
Installing header files:          /usr/local/php-5.3.8/include/php/
Installing helper programs:       /usr/local/php-5.3.8/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php-5.3.8/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php-5.3.8/lib/php/
[PEAR] Archive_Tar    - installed: 1.3.7
[PEAR] Console_Getopt - installed: 1.3.0
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util       - installed: 1.2.1
[PEAR] PEAR           - installed: 1.9.4
Wrote PEAR system config file at: /usr/local/php-5.3.8/etc/pear.conf
You may want to add: /usr/local/php-5.3.8/lib/php to your php.ini include_path
/Users/rupert/Desktop/php-5.3.8/build/shtool install -c ext/phar/phar.phar /usr/local/php-5.3.8/bin
ln -s -f /usr/local/php-5.3.8/bin/phar.phar /usr/local/php-5.3.8/bin/phar
Installing PDO headers:          /usr/local/php-5.3.8/include/php/ext/pdo/
sudo make install  5.52s user 9.35s system 79% cpu 18.819 total

2. Configuration
Specify php.ini per virtualhost

PHPINIDir /etc

Categories: Uncategorized Tags: ,

Post Install Apache2.x, ColdFusion 8

May 28th, 2008 rupert No comments

After binding Apache2.x and ColdFusion 8, I find it very useful to follow the post-install instructions below:

1. Copying ColdFusion Admin directory to /wwwroot (webroot)

# ln -s /var/www /wwwroot
# cp -Rf /opt/coldfusion8/wwwroot/CFIDE /wwwroot/
# rm /wwwroot/index.html
# cd /wwwroot
# ln -s CFIDE cfide

2. Adding index.cfm to DirectoryIndex.

# vim /etc/apache2/mods-available/dir.conf
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm index.cfm

3. Restart apache

/etc/init.d/apache2 stop 
/etc/init.d/apache2 start

4. Browse Admin page for the first time

Categories: debian Tags: , ,

Installing Apache2.2 ColdFusion8 on Mac OS X Leopard

May 7th, 2008 rupert 1 comment

Ok so this post is a bit late as I saw it in my drafts, but better late than never. I did these even before I wrote the PostGres8.3/Postgis/pgRouting post.

1. Apache
reference: http://httpd.apache.org/

./configure –prefix=/usr/local/apache2 –with-m2m=prefork
make
sudo make install

- To start on boot, download apache2startup.tar.gz and extract to your /Library/StartupItems/

2. ColdFusion
- run the installer as you would normally do in any windows/linux installation. I would suggest you put your installation in /opt and not ~ (home) because Leopard might wipe it out when upgrading to a higher OS version.
- should automatically start on boot
- bind coldfusion to apache

- Just in case you need to start it on boot, download coldfusion8Startup.tar.gz

3. Installing mod_python on Apache
$ ./configure –with-apxs=/usr/local/apache2/bin/apxs
$ make
$ sudo make install

Categories: osx Tags: , , ,

Mapserver Debug Output

August 24th, 2007 rupert 1 comment

Grabbing the latest ms4w-2.2.6, I was now able to get debugging output by specifying below in my mapfile.


CONFIG MS_ERRORFILE "stderr"

This would log all requests to your Apache error log. I can now play with different debugging modes as described from RFC28. Here is a simple output of my error.log with a DEBUG 2 set..


[error] [client 127.0.0.1] CGI Request 1 on process 4136
[error] [client 127.0.0.1] msDrawMap(): Layer 0 (district), 0.172s
[error] [client 127.0.0.1] msDrawMap(): Layer 1 (water_200k), 0.187s
[error] [client 127.0.0.1] msDrawMap(): Layer 2 (greens_200k), 0.454s
[error] [client 127.0.0.1] msDrawMap(): Layer 6 (roads_150_01), 0.906s
[error] [client 127.0.0.1] msDrawMap(): Layer 9 (roads_270_01), 0.515s
[error] [client 127.0.0.1] msDrawMap(): Layer 10 (roads_180_01), 0.563s
[error] [client 127.0.0.1] msDrawMap(): Layer 11 (roads_280_01), 0.531s
[error] [client 127.0.0.1] msDrawMap(): Layer 12 (roads_400_01), 0.516s
[error] [client 127.0.0.1] msDrawMap(): Layer 13 (roads_140_03), 0.547s
[error] [client 127.0.0.1] msDrawMap(): Layer 14 (roads_140_04), 1.297s
[error] [client 127.0.0.1] msDrawMap(): Layer 15 (roads_141_02), 0.703s
[error] [client 127.0.0.1] msDrawMap(): Layer 16 (roads_150_02), 0.890s
[error] [client 127.0.0.1] msDrawMap(): Layer 17 (roads_boundary_160_170_270), 0.953s
[error] [client 127.0.0.1] msDrawMap(): Layer 18 (roads_160_02), 0.829s
[error] [client 127.0.0.1] msDrawMap(): Layer 19 (roads_170_02), 0.640s
[error] [client 127.0.0.1] msDrawMap(): Layer 20 (roads_270_02), 0.531s
[error] [client 127.0.0.1] msDrawMap(): Layer 22 (roads_180_02), 0.563s
[error] [client 127.0.0.1] msDrawMap(): Layer 23 (roads_280_02), 0.516s
[error] [client 127.0.0.1] msDrawMap(): Layer 24 (roads_400_02), 0.531s
[error] [client 127.0.0.1] msDrawMap(): Layer 26 (subway), 0.109s
[error] [client 127.0.0.1] msDrawMap(): Layer 27 (subwaystops), 0.125s
[error] [client 127.0.0.1] msDrawMap(): Layer 28 (subway_transfer_stops), 0.110s
[error] [client 127.0.0.1] msDrawMap(): Layer 29 (district_boundary), 0.156s
[error] [client 127.0.0.1] msDrawMap(): Layer 33 (400_280_180_170_160_150_labels_01), 4.859s
[error] [client 127.0.0.1] msDrawMap(): Layer 35 (subwaystops_labels), 0.125s
[error] [client 127.0.0.1] msDrawMap(): Layer 36 (district_labels), 0.125s
[error] [client 127.0.0.1] msDrawMap(): Drawing Label Cache, 5.860s
[error] [client 127.0.0.1] msDrawMap() total time: 23.329s

Categories: mapserver Tags: ,

Debian Howto: Apache 2.2 + ColdFusion Updated for SID

August 1st, 2007 rupert 1 comment

Wow, this is really nice. I was able to install Apache2.2 + ColdFusion on my current Debian 4.0 Etch.

Here’s an introduction on using apt…

Use apt-cache to search the local database for available packages.
apt-cache search [search terms] will find packages that sound like what you want and:
apt-cache show [packagename] will return more details on a particular package.
apt-cache showpkg [packagename] will return more details on a particular package.
apt-cache policy [packagename] will return which versions are available along with the priority of each version.
apt-setup will enable you to change mirrors. The alternative is to edit /etc/apt/sources.list manually (which I prefer).
apt-get clean clears the local repository of all retrieved package files.
apt-get autoclean clears the local repository of retrieved package files of programs that are no longer installed.
dpkg -l [packagename] will list the version and a short description of the package we have installed.

Installing Apache2.2

1. apt-get install g++

2. apt-get install apache2

Setting up apache2-utils (2.2.3-4) ...
Setting up apache2.2-common (2.2.3-4) ...
Setting Apache2 to Listen on port 80. If this is not desired, please edit /etc/apache2/ports.conf as desired. Note that the Port directive no longer works.
Module alias installed; run /etc/init.d/apache2 force-reload to enable.
Module autoindex installed; run /etc/init.d/apache2 force-reload to enable.
Module dir installed; run /etc/init.d/apache2 force-reload to enable.
Module env installed; run /etc/init.d/apache2 force-reload to enable.
Module mime installed; run /etc/init.d/apache2 force-reload to enable.
Module negotiation installed; run /etc/init.d/apache2 force-reload to enable.
Module setenvif installed; run /etc/init.d/apache2 force-reload to enable.
Module status installed; run /etc/init.d/apache2 force-reload to enable.
Module auth_basic installed; run /etc/init.d/apache2 force-reload to enable.
Module authz_default installed; run /etc/init.d/apache2 force-reload to enable.
Module authz_user installed; run /etc/init.d/apache2 force-reload to enable.
Module authz_groupfile installed; run /etc/init.d/apache2 force-reload to enable.
Module authn_file installed; run /etc/init.d/apache2 force-reload to enable.
Module authz_host installed; run /etc/init.d/apache2 force-reload to enable.
 
Setting up apache2-mpm-worker (2.2.3-4) ...
Starting web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

3. /etc/init.d/apache2 start

4. ps -ef | grep apache2

5. Post Install:

#mkdir -p /usr/local/apache2
#ln -s /var/log/apache2 /usr/local/apache2/logs
#ln -s /var/www /usr/local/apache2/htdocs
#ln -s /usr/lib/cgi-bin /usr/local/apache2/cgi-bin

Installing ColdFusion 8
1. Install ColdFusion 8 normally. Make the user as nobody

2. To start ColdFusion8 on boot, download this startup script (coldfusion8_startup_debian).
Drop it to /etc/init.d/ and start coldfusion

3. Bind ColdFusion to Apache. Modify the existing apache_connector.sh.

#!/bin/sh
 
#
# Configure the Apache connector.
#       -dir should be the *directory* which contains httpd.conf
#       -bin should be the path to the apache *executable*
#       -script should be the path to the script which is used to
#               start/stop apache
#
../../runtime/bin/wsconfig \
        -server coldfusion \
        -ws apache \
        -dir /etc/apache2 \
        -bin /usr/sbin/apache2 \
        -script /usr/sbin/apache2ctl \
        -coldfusion
 
exit $#

4. Check if the bind is successful by inspecting /etc/apache2/httpd.conf . You should see something similar below…

# JRun Settings
LoadModule jrun_module /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun22.so
<IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore /opt/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store
    JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl url <optionally redirect to this URL on errors>
    #JRunConfig ProxyRetryInterval 600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
    #JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
    #JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
    #JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server>
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>

5. Follow Post install considerations

Installing ColdFusion7.0.2

References:
http://demirkapi.net/tutorials/coldfusion_debian_installation.cfm
http://www.easycfm.com/print/index.cfm?tutorial_id=376

1. apt-get install libstdc++6 libstdc++5 libstdc++2.10-glibc2.2(etch)

On etch, by default there is already xlibs, if we have desktop. On sid, if there is also no X, we need to install libxp6 libxt6 libxtst6. If you don’t install these libraries, you will get a graphing library error during coldfusionmx startup.

2. By default debian has a ‘nobody’ user also

From http://forums.gentoo.org/viewtopic-t-312113.html, and if you get a libc.so.6 No suc file or directory found problem

3. Modify /opt/coldfusionmx7/bin/coldfusion and comment out LD_ASSUME_KERNEL

174 # Some Java JVMs (both from Sun and IBM) don't work with the new floating stack
175 # feature of the i686 version of glibc. Force glibc to use the deprecated stack model.
176 # Check if the OS is SuSE8.1 or SuSE 9 - if it is, do not use the deprecated stack model.
177 #SUSEFLAG=`grep 'SuSE Linux 8.1\|UnitedLinux 1.0\|SuSE Linux 9\|SUSE LINUX Enterprise Server 9' /etc/SuSE-release /etc/UnitedLinux-release /etc/UnitedLinux-release 2> /dev/null`
178
179 #if [ ! "$SUSEFLAG" ]; then
180 # LD_ASSUME_KERNEL=2.2.9
181 # export LD_ASSUME_KERNEL
182 #fi

4. Boot on Start.

#cp -Rf /opt/coldfusionmx7/bin/coldfusion /etc/init.d/coldfusionmx7
#update-rc.d coldfusionmx7 start 80 2 3 4 5 . stop 15 0 1 6 .

5. You need the latest wsconfig.jar that will work on Apache2.2. It was discussed from a technote here. Configure apache with coldfusion

or

Call java and execute wsconfig.jar


/opt/coldfusionmx7/runtime/jre/bin/java
cd {cf_root}/runtime/lib

java -Dtrace.ci=1 -jar wsconfig.jar -server coldfusion -ws apache

-dir /etc/apache2/

-bin /usr/sbin/apache2

-script /usr/sbin/apache2ctl

-coldfusion -v

[-apxs]

Categories: debian Tags: , ,