• Articles / Artículos
  • Contact / Contacto
CODEANDO : our blog about technology

Apache 2.2 and PHP 5 on QNX 6.5 Step-by-step Installation

29/5/2013

2 Comments

 
Important: there is a new version of this article here..

__________________________

STEP 1: PREPARE ENVIRONMENT


Creating www Group

echo "www:x:199:" >> /etc/group

Creating www User

echo "www:x:199:199:www:/www:/bin/sh" >> /etc/passwd

Setup PATH in /etc/profile

echo "export PATH=\$PATH:/usr/pkg/bin:usr/pkg/sbin" >> /etc/profile

Setup CS_LIBPATH in /etc/rc.d/rc.local

echo "setconf CS_LIBPATH \$(getconf CS_LIBPATH):/usr/pkg/lib" >> /etc/rc.d/rc.local

Download pkgsrc project. To get pkgsrc, write this line into a single line: 

svn checkout --username <username> http://community.qnx.com/svn/repos/pkgsrc/HEAD_650

(username is your registrated email address in qnx.com, you can register for free) 

Now your environment is ready for install. Reboot QNX and go to STEP 2.

STEP 2: INSTALL

Bootstraping pkgsrc
cd /HEAD_650
(cd pkgsrc/bootstrap && ./bootstrap --workdir HEAD_650
/pkgsrc/bootstrap/work)


Preparing Apache 2.2
cd /HEAD_650/pkgsrc/www/apache22
bmake distinfo
bmake clean


Compiling and Linking and Installing Apache 2.2
cd /HEAD_650/pkgsrc
(cd www/apache22 && /usr/pkg/bin/bmake install)


Configuring dinamic .so modules in Apache 2.2
cd /HEAD_650/pkgsrc/www/apache22/work/httpd-2.2.23/
./configure --enable-so


Installing Apache 2.2.
cd /HEAD_650/pkgsrc
(cd www/apache22 && /usr/pkg/bin/bmake install)


Installing PHP5 Module for Apache 2.2
cd /HEAD_650/pkgsrc
(cd www/ap-php && bmake install)


Preparing Apache 2.2 to start when QNX boots
cp /usr/pkg/share/examples/rc.d/apache /etc/rc.d/apache
echo "/etc/rc.d/apache start" >> /etc/rc.d/rc.local


Installation Finished. Now go to STEP 3

STEP 3: APACHE CONFIG FILE AND NETWORK SETTINGS

Before starting Apache remember to configure your network.

Network settings must be in MANUAL MODE. DHCP is not available,

For example:
IP: 10.0.2.99 (or any proper IP address)
Netmask 255.255.255.0
Host Name: qnx650 (or any proper name EXCEPT localhost)
Name Servers: 10.0.2.1
Default Gateway: 10.0.2.1


Once the network is configured to manual mode, add your hostname to /etc/hosts
For example:
10.0.2.99 qnx650
(where 10.0.2.99 is a fixed IP Address and qnx650 is our hostname)


STEP 4: APACHE CONFIG FILES

Edit apache config file according to the Apache22 help descriptions: 

The Important contents of Apache2.2 config file: /usr/pkg/etc/httpd/httpd.conf include:
ServerRoot "/usr/pkg" 
Listen 10.0.2.99:80 
User www 
Group www 
ServerAdmin you@example.com
ServerName 
10.0.2.99 (use your localhost IP address) 
DocumentRoot "/usr/pkg/share/httpd/htdocs"



Also add the following lines to the appropiate sections to enable PHP 5 module:

In the "Dynamic Shared Object (DSO) Support" section add:
LoadModule php5_module lib/httpd/mod_php5.so

In the "AddHandler" section add:
AddHandler application/x-httpd-php .php

STEP 5: READY TO GO!

To start apache manually, enter:
. /etc/rc.d/apache start

To stop apache enter:
. /etc/rc.d/apache stop

You should be able to access http://your-ip/index.html

In case of any fault, please see the error log file in /var/log/httpd/error_log

You can contact me here.
This post is published by the developer's team at INNVAS SRL. If you have any comments, suggestions or requests, please feel free To contact us. Thanks for stopping by!

2 Comments
ucanpicme
30/6/2013 12:46:28 pm

Thanks bro exactly what i was looking for ..
God bless you ..

Reply
PHP Website Development link
18/11/2013 06:34:59 pm

By hiring a dedicated open source developer you can have a search engine friendly, cross browser compatible and semantically coded website for your business enterprise.

Reply



Leave a Reply.

    Picture

    Authors

    We are the development team at INNVAS SRL, a nice group of engineers and IT specialists with solid experience in software development on different platforms, most of them custom developments, for different areas and industries. Our experience includes real time systems (automation and control), SCADA systems, drivers and protocols, GIS, image processing, simulation and optimization, web portals, mobile applications, embedded solutions, among others. 
    We enjoy working on different hardware and software platforms (Windows, Linux, QNX, Android, iOS , Raspberry Pi) and technologies (.NET, Java, HTML5,  C / C ++, Python, Matlab, CUDA, among others).

    Categories

    All
    Apache
    Linux
    MySQL
    Netbios
    Networking
    OpenTSDB
    PHP
    QNX
    Raspberry Pi
    Samba
    Ubuntu

    Archives

    July 2016
    June 2016
    May 2013

    Ads

    Consulting

    Picture
    Need support in QNX ?

    Apache on QNX
    Open SSL on QNX
    MySQL on QNX
    PHP 5 on QNX
    Open LDAP on QNX

    Contact us at:


    INNVAS SRL
    Montevideo
    Uruguay
    ​www.innvas.com
    info@innvas.com


    QNX is a trademark of
    ​QNX Software Systems
Powered by Create your own unique website with customizable templates.