Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpdave/f8f56e5cb42c9f293c4ed02c7de8c30d to your computer and use it in GitHub Desktop.
Save phpdave/f8f56e5cb42c9f293c4ed02c7de8c30d to your computer and use it in GitHub Desktop.
DISCLAIMER Note: this is currently is a draft and is not meant to be used yet. Many things that I'm looking to clean up and simplify. There may be things that don't work so only do this on a development system that you aren't worried about it being fubar'd
#some things we may need:
wget http://www.oss4aix.org/download/RPMS/zlib/zlib-devel-1.2.8-1.aix5.1.ppc.rpm
rpm --ignoreos --ignorearch --nodeps --replacepkgs -hUv zlib-devel-1.2.8-1.aix5.1.ppc.rpm
#nginx: [emerg] using regex "\.php$" requires PCRE library in /usr/local/nginx/conf/nginx.conf:72
wget http://www.oss4aix.org/download/RPMS/pcre/pcre-8.35-1.aix5.1.ppc.rpm
rpm --ignoreos --ignorearch --nodeps --replacepkgs -hUv pcre-8.35-1.aix5.1.ppc.rpm
wget http://www.oss4aix.org/download/RPMS/pcre/pcre-devel-8.35-1.aix5.1.ppc.rpm
rpm --ignoreos --ignorearch --nodeps --replacepkgs -hUv pcre-devel-8.35-1.aix5.1.ppc.rpm
#git source
git clone https://github.com/nginx/nginx -c http.sslVerify=false
cd nginx
#configure it, make it, install it
PATH=/opt/freeware/bin:$PATH \
CC=gcc \
CFLAGS=-O3 \
./auto/configure \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-http_ssl_module \
--pid-path=/var/run/nginx.pid \
--without-http_scgi_module \
--without-http_uwsgi_module \
--with-cpu-opt=ppc64 && gmake && gmake install
joe /usr/local/nginx/conf/nginx.conf
/*
server {
listen 61183;
location / {
root html;
index index.php index.html index.htm;
}
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
*/
#test config
/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
#nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
#nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
#run nginx webserver
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
#Create a test file
rm /usr/local/nginx/html/index.html
echo "<?php phpinfo(); ?>" >> /usr/local/nginx/html/index.php
#stop the webserver and start it.
/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx
#setup for PHP
cp ~/php-src/php.ini-development /usr/local/phpdave7/lib/php.ini
ln -s /usr/local/phpdave7/lib/php.ini /usr/local/phpdave7/etc
joe /usr/local/phpdave7/lib/php.ini
#find cgi.fix_pathinfo and set it to 0
#cgi.fix_pathinfo=0
#References:
# http://php.net/manual/en/install.unix.nginx.php
# https://sites.google.com/site/rhdisk0/unix/aix/nginx-aix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment