SlideShare una empresa de Scribd logo
1 de 83
Descargar para leer sin conexión
© Proximity 2015
© Proximity 2015
About us
© Proximity 2015
Agenda
• What is open source?
• PHP for open source
• PHP on IBM i
• Live install of Zend Server
• Live install of Zend DBi
• What are Zend Server applications?
• Hands-on install from a .zpk
• Hands-on install from source
• Zend Server - A brief tour
• Configuring Zend Server – top tips
• Q & A
© Proximity 2015
Objectives – what are yours?
• What is your experience of open source applications?
• What is your experience of PHP, MySQL or Zend Server?
• Would you run an open source application on IBM i for your business?
• Are you interested in any specific open source applications?
© Proximity 2015
Objectives – what are ours?
• An understanding of open source applications on IBM i
• Implementation of Zend Server and Zend DBi
• Installation of an open source application of your choice
• Basic configuration of your open source application
• An open source application up and running
© Proximity 2015
What is open source?
© Proximity 2015
Free like a puppy
© Proximity 2015
Open source solutions
• Source code made available for free under license
• License provides rights to study, change and distribute
• Core code is free, but expect to pay for anything beyond this
• Extra features
• “Skins” for CMS systems
• Support
• Cost of maintaining the software
• Your time
• Backups etc.
© Proximity 2015
Open source solutions
• Can use any language or database, but PHP and MySQL is a popular combination
• PHP and MySQL are available on IBM i
© Proximity 2015
Open source solutions
• We will install the following
• Zend Server – PHP engine, Apache web server
• Zend DBi – MySQL database
• This gives us our iAMP “stack”
• i = IBM i
• A = Apache
• M= MySQL
• P = PHP
IBM i
Apache MySQL
PHP
Applications
© Proximity 2015
PHP on IBM i
• A great choice for web development
• Easy to learn, especially for RPG developers
• PHP itself is open source and free to use
• Widely used
• Strong PHP community
• Extensive resources and tools available
• Wealth of education materials
• Runs on IBM i
• Integrates and works well with existing applications
• SQL database access, RPG / COBOL / CL program calls
• No 3rd party hardware required
© Proximity 2015
PHP on IBM i
HTTP request
HTML, CSS, JS etc.
CSS, JavaScript
© Proximity 2015
Installing Zend Server
© Proximity 2015
Installing Zend Server – who are Zend?
• Founded by Andi Gutmans and Zeev Suraski in 1999
• Provides products and services relating to PHP
• Zend Server
• Zend DBi
• Zend Studio
• Zend Framework
© Proximity 2015
Installing Zend Server – what is Zend Server?
• The PHP engine (and not just on IBM i)
• Complete application server, including web server
• Brought to IBM i thanks to collaboration between IBM and Zend
• Basic version is free for IBM i (with forum support)
• Uses IBM HTTP Server (Apache)
• Comes complete with XML Toolkit to access native resources
© Proximity 2015
Installing Zend Server – prerequisites
• Folder /usr/local exists
• Ports 10080 - 10083 are available
• Licensed programs and PTFs appropriate to the OS version are installed
• Zend Server not already installed
• I will install on to a clean partition, you can verify it works
© Proximity 2015
Installing Zend Server – prerequisites
For IBM i 6.1
• Current PTF Group for 5761DG1 (minimum SF99115 Group 13)
• FastCGI PTFs
• 5761SS1 – SI36005
• 5761DG1 – SI36027
Licensed Program Product Option Description
5761SS1 33 Portable App Solutions Environment
5761SS1 30 Qshell
5761DG1 *BASE IBM HTTP Server for i
5733SC1 *BASE IBM Portable Utilities for i
5733SC1 1 OpenSSH, OpenSSL, zlib
© Proximity 2015
Installing Zend Server – prerequisites
For IBM i 7.1
• Current PTF Group for 5770DG1 (minimum SF99368 Group 1)
Licensed Program Product Option Description
5770SS1 33 Portable App Solutions Environment
5770SS1 30 Qshell
5770DG1 *BASE IBM HTTP Server for i
5733SC1 *BASE IBM Portable Utilities for i
5733SC1 1 OpenSSH, OpenSSL, zlib
© Proximity 2015
Installing Zend Server – prerequisites
For IBM i 7.2
• No additional PTFs required
Licensed Program Product Option Description
5770SS1 33 Portable App Solutions Environment
5770SS1 30 Qshell
5770DG1 *BASE IBM HTTP Server for i
5733SC1 *BASE IBM Portable Utilities for i
5733SC1 1 OpenSSH, OpenSSL, zlib
© Proximity 2015
Installing Zend Server – installing the software
• Download the appropriate SAVF from the Zend website,
and FTP to the IBM i
• Choose your installation mode
• Silent (a.k.a. Batch)
• Interactive
• We will choose interactive
RSTLICPGM LICPGM(6ZSVRPI) DEV(*SAVF) SAVF(QGPL/ZSVRSAVF6)
• Skip Zend DBi for now
© Proximity 2015
Straw Poll
• What IBM i version are you running?
• Do you have Zend Server installed?
• Do you have any PHP / web development skills?
• Is your business using Open Source PHP applications on other platforms?
• Do you run Zend Server on Windows or Linux?
?
© Proximity 2015
Installing Zend Server – completing the installation
• Zend Server Console
• Web based UI for configuration and monitoring of Zend Server
• Navigate to http://<your_server_IP>:10081/ZendServer
• First time in there will be initial configuration to do
• Accept the license agreement
• Select the appropriate launch profile
• Development
• Production
• Set the admin and developer user passwords
• Deploy source libraries
© Proximity 2015
Exercise 1
© Proximity 2015
Installing Zend Server
• Validate the installation
• Navigate to http://<your_server_IP>:10080
• Zend Server Test Page should be displayed
• Check the subsystem on the IBM i
• For ease, we will use Presto to provide 5250 access via a browser
• Navigate to http://<your_server_IP>:8022/presto/presto
• Log in with QSECOFR / Proximity!!
• GO ZENDSVR6/ZSMENU > 5 > 3 > Enter
© Proximity 2015
Installing Zend DBi
© Proximity 2015
Installing Zend DBi – what is Zend DBi?
• MySQL binaries, compiled to run on IBM i
• Functionally identical to MySQL
• Popular, widely used open source database
• The database of choice for many open source applications
• Zend DBi is the IBM i implementation of MySQL, delivered by Zend
© Proximity 2015
Installing Zend DBi – installing the software
• Can be done as a second stage of the initial Zend Server installation
GO ZENDSVR6/ZSMENU
then take option 6 – ZendDBi Management menu and installation will start
• NOTE: QSECOFR privileges are required!
© Proximity 2015
Installing Zend DBi – verifying the installation
• A new subsystem and daemon job are created, so check that the
subsystem is running
WRKACTJOB SBS(ZENDDBI)
• Can also access the command line interface via QSH or QP2TERM
QSH
then
cd /usr/local/mysql/bin
mysql –u root
> show databases;
> use mysql;
> show tables;
© Proximity 2015
Installing Zend DBi – verifying the installation
• After installation, the root user password should be set
> set password for ‘root’@’localhost’ = password(‘Proximity!!’)
> quit
• To access the command line interface, we now need to enter
mysql –u root --pass=‘Proximity!!’
© Proximity 2015
Exercise 2
© Proximity 2015
Installing Zend DBi
• Verify the installation
• Navigate to http://<your_server_IP>:8022/presto/presto
• Log in with QSECOFR / Proximity!!
• GO ZENDSVR6/ZSMENU > 6 > 2
• Access the command line interface
• QSH
• cd /usr/local/mysql/bin
• mysql –u root --pass=‘Proximity!!’
• > show databases;
• > use mysql;
• > show tables;
• > select * from user;
© Proximity 2015
Zend Server Applications
© Proximity 2015
Zend Server applications – what are they?
• Any software that you run using Zend Server
• Open source applications
• Packaged, e.g. Magento, Drupal
• From Source, e.g. MediaWiki, Adminer
• Your own developed applications
• STREAM (delivery and transport management) in our case
• Once an application is configured, you can
• View statistics and logging information relating to the application
• Define monitoring rules specific to the application
• Define caching rules specific to the application
© Proximity 2015
Zend Server applications – how to define an application
• Applications are created automatically when you deploy from a package
• You can also manually define an application for
• Your manually developed code
• Other applications installed from source
• We will cover this in detail shortly
© Proximity 2015
Installing from a .zpk
© Proximity 2015
Installing an application from a .zpk – overview
• Zend provide a number of pre-packaged Open Source applications that can be
installed directly from the Zend Server console
• Magento – e-commerce
• Drupal – content management
• WordPress – content management / blog
• Joomla – content management
• phpMyAdmin – database admin tool
• phpBB – forum
• We have successfully deployed all of these, and use Drupal running on IBM i for all
our company websites
© Proximity 2015
Installing an application from a .zpk – example
• We use Drupal extensively, so we will us this as an example
• Access the Zend Server Console > Guide Page > click the Drupal icon
© Proximity 2015
Installing an application from a .zpk – download
© Proximity 2015
Installing an application from a .zpk – readme
© Proximity 2015
Installing an application from a .zpk – app details
© Proximity 2015
Installing an application from a .zpk – license
© Proximity 2015
Installing an application from a .zpk – prerequisites
© Proximity 2015
Installing an application from a .zpk – parameters
© Proximity 2015
Installing an Application from a .zpk – summary
© Proximity 2015
Installing an application from a .zpk – manual download
• Alternative approach, if you already have the .zpk file
• Access the Zend Server Console
• Applications > Apps > Deploy Application
• Specify the location of the .zpk
• Remaining steps are as before
• Some config tweaks may be needed to ensure upload does not time out
• Configurations > PHP > Filesystem and Streams
• Set default_socket_timeout to e.g. 300 seconds
• Configurations > PHP > Resource Limits and Tuning
• Set max_input_time to e.g. 300 seconds
© Proximity 2015
Installing an Application from a .zpk – under the covers
• Source is deployed in /usr/local/zendsvr6/var/apps/http/__default__/0
• A .conf file is generated and saved in /usr/local/zendsvr6/etc/sites.d/http/__default__/0
• The .conf files are included within the Apache config file
• Provides the necessary alias information to let Apache locate the application
• Any staging and activation scripts defined in the package are executed
• Application config based on the supplied parameters
• Generation of MySQL database if required
© Proximity 2015
Exercise 3
© Proximity 2015
Installing an application from a .zpk
• Access the Zend Server Console
• Navigate to http://<your_server_IP>:10081/ZendServer
• Log in with admin / Proximity!!
• Deploy an application
• Click on the Guide Page tab
• Click on the application you want to deploy
• Follow the steps defined on the crib sheet provided for the application
• Launch the application and have a wander around
• In the Zend Server Console, check the application specific statistics
© Proximity 2015
Installing from source
© Proximity 2015
Installing an application from source – overview
• Any application written in PHP that uses MySQL for the database can be
implemented on IBM i
• The examples we will look at today are
• Adminer – database admin tool
• SugarCRM – CRM tool
• Mantis BT – bug tracker
• Media Wiki – wiki
• We have successfully deployed and use Adminer and SugarCRM on IBM i
© Proximity 2015
Installing an application from source – archives
• Typically, source will be provided in a .zip or .tar archive for ease of downloading
• Both of these types can be unpacked on the IBM i
© Proximity 2015
Installing an application from source – unpacking .zip files
• Download the .zip file to the IFS, go into QSH or QP2TERM and enter
jar tf <myFilePath>
to list the contents of the archive
• Navigate to the location that you want to extract to and enter
jar xf <myFilePath>
to extract the contents
© Proximity 2015
Installing an application from source – unpacking .tar files
• Download the .tar file to the IFS, go into QSH or QP2TERM and enter
tar -tf <myFilePath>
to list the contents of the archive
• Navigate to the location that you want to extract to and enter
tar -xf <myFilePath>
to extract the contents.
• If you have a .tar.gz file, extract the .tar file from it before transferring to the server
© Proximity 2015
Installing an application from source – unpacking .tar files
• The native tar command can be problematic, as file paths are limited to 100 characters
• If you get a @longlink file after unpacking, the path limit has been exceeded and some files will be
missing or wrongly named
• There are two ways to address this …
• The easy approach – save the .tar file to the IFS root and unpack, then move to the correct location
• This will only work if the file paths are now less than 100 characters
• The hard approach – install the Open Source binary for the GNU version of the tar command
• More information on how to do this is available at …
• http://www-01.ibm.com/support/docview.wss?uid=nas8N1011528
• http://www.youngiprofessionals.com/wiki/index.php/PASE/OpenSourceBinaries
© Proximity 2015
Installing an application from source – example
• Adminer is a lightweight MySQL management tool
• Single script file, so easy to install
© Proximity 2015
Installing an application from source – create folder
© Proximity 2015
Installing an application from source – create folder
© Proximity 2015
Installing an application from source – authority
© Proximity 2015
Installing an application from source – upload
© Proximity 2015
Installing an application from source – definition
• Access the Zend Server Console > Applications > click Define Application
© Proximity 2015
Installing an application from source – definition
© Proximity 2015
Installing an application from source – definition
© Proximity 2015
Installing an application from source – launch
© Proximity 2015
Exercise 4
© Proximity 2015
Installing an application from source
• Create a folder within htdocs for the application and set the folder authority
• Navigate to http://<your_server_IP>:8022/presto/presto
• Log in with QSECOFR / Proximity!!
• wrklnk '/www/zendsvr6/htdocs/*‘
• mkdir ‘/www/zendsvr6/htdocs/<your_folder_name>’
• Take option 9=Work with Authority against the new folder
• Grant user QHTTPSVR *RWX data and *ALL object authority
• Upload the source
• Use FileZilla to transfer the source, .zip or .tar to the new folder
© Proximity 2015
Installing an application from source
• Unpack the source (if necessary)
• For .zip files
• In QSH or QP2TERM
• cd /www/zendsvr6/htdocs/<your_folder_name>
• jar xf <your_file_name>
• For .tar files
• In QSH or QP2TERM
• cd /www/zendsvr6/htdocs/<your_folder_name>
• tar –xf <your_file_name>
© Proximity 2015
Installing an application from source
• Define the Application within Zend Server
• Navigate to http://<your_server_IP>:10081/ZendServer
• Log in with admin / Proximity!!
• Click on the Applications tab
• Click Define Application
• Follow the steps defined on the crib sheet provided for the application
• Launch the application and have a wander around
• In the Zend Server Console, check the application specific statistics
© Proximity 2015
Troubleshooting
• Most common problems are authority related
• Try granting QTMHHTTP full authority to the application folder and all contents
• Check the logs!
• PHP log in Zend Server console
• Apache logs in /www/zendsvr6/logs
• For specific applications refer to user documentation, or Google
© Proximity 2015
Zend Server Console
© Proximity 2015
Zend Server Console – overview – dashboard
• Default landing page when you log into the console
• Displays overview information for the server
• Server statistics
• System events
• Information can also be filtered per application
© Proximity 2015
Zend Server Console – applications
• Lists defined and deployed applications
• Displays information for individual applications
• Application status
• Summary information
• Provides access to application monitoring and caching rules
• Provides access to virtual host configuration and PHP library management
© Proximity 2015
Zend Server Console – configurations
• Configuration of various aspects of Zend Server
• Components – enable/disable and configure Zend Server Components
• Deployment – required for us!
• Important for app performance – Data Cache, OPCache, Page Cache
• Important for monitoring – Code Tracing, Monitor, Statistics
• PHP – configure installed PHP components
• Z-Ray – fantastic tool for developers – more later
• IDE Integration – allows close coupled debugging from Zend Studio
• Monitor – additional configuration for the Zend Monitor component
© Proximity 2015
Zend Server Console – administration
• Day-to-day administration of Zend Server
• Servers – allows restart of server and shows any server level errors
• Audit Trail – shows log of changes made to the server
• Users – change passwords for admin and developer users
• Web API – maintenance of Web API keys, used in Zend Studio integration and when
accessing the server via its API layer (e.g. from Jenkins or other CI tools)
• License – shows license information
• Settings – server level configuration
© Proximity 2015
Zend Server Console – Z-Ray Live
• Developer tool that gives insight into PHP code by delivering detailed
information into a browser component
• Information includes
• PHP functions
• SQL queries
• Request variables
• Errors and warnings
• Server events
• Memory usage
• Z-Ray Live allows this data to be viewed for requests from devices where browser
component is not appropriate, e.g. mobile applications, API calls
© Proximity 2015
Configuring Zend Server
© Proximity 2015
Configuring Zend Server – top tips
• As seen on PowerWire.eu
• Character Set Configuration
• Multibyte Support
• Compression
• Bonus Tip! Memory Pools and Run Priorities
• Available on our website: http://proximity.co.uk/php-on-i
© Proximity 2015
Configuring Zend Server – character sets
Get this right now and you’ll never have character set problems
In /www/zendsvr6/conf/httpd.conf
DefaultFsCCSID 00285
CGIJobCCSID 00285
DefaultNetCCSID 01208
AddCharset UTF-8 .htm .html .xml
In /www/zendsvr6/conf/fastcgi.conf
SetEnv=“CCSID=1208” SetEnv=“LANG=C”
© Proximity 2015
Configuring Zend Server – character sets
In /usr/local/zendsvr6/share/ToolkitAPI/toolkit.ini
encoding = “UTF-8”
In the console, go to Configurations > PHP > ibm_db2
ibm_db2.i5_dbcs_alloc – set to use expanded allocations
© Proximity 2015
Configuring Zend Server – multibyte support
Means you’re not limited to ASCII
In the console, go to Configurations > PHP > mbstring
mbstring.http_output – set to UTF-8
mbstring.internal_encoding – set to UTF-8
mbstring.encoding_translation – set to On
mbstring.http_input – set to Pass
mbstring.language – set to neutral
© Proximity 2015
Configuring Zend Server – compression
A very quick win – speeds up response times of web pages
In /www/zendsvr6/conf/httpd.conf
LoadModule deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
AddOutputFilterByType DEFLATE application/x-httpd-php
application/json text/css application/x-javascript
application/javascript text/html
© Proximity 2015
Configuring Zend Server – memory pools and run priorities
Worth considering for Production systems where resources are shared with legacy applications
Use WRKSHRPOOL to define one of the shared pools as “Zend”
Use CHGSBSD to allocate the pool to subsystem ZENDSVR6
Change the Zend Server Class using WRKCLS ZENDSVR6/*ALL to set Run Priority to 20,
equivalent to interactive jobs
Change the HTTP Server Class using WRKCLS QHTTPSVR/QZHBHTTP to set Run
Priority to 20, equivalent to interactive jobs
© Proximity 2015
Any questions?
© Proximity 2015
Thanks
• i-UG for the opportunity
• Steve Bradshaw for the hardware and support
• You for attending

Más contenido relacionado

La actualidad más candente

PHP Batch Jobs on IBM i
PHP Batch Jobs on IBM iPHP Batch Jobs on IBM i
PHP Batch Jobs on IBM iAlan Seiden
 
PHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM iPHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM iAlan Seiden
 
From Zero to ZF: Your first zend framework project on ibm i
From Zero to ZF: Your first zend framework project on ibm iFrom Zero to ZF: Your first zend framework project on ibm i
From Zero to ZF: Your first zend framework project on ibm iAlan Seiden
 
PHP on Windows - What's New
PHP on Windows - What's NewPHP on Windows - What's New
PHP on Windows - What's NewZendCon
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi Shlomo Vanunu
 
Performance tuning with zend framework
Performance tuning with zend frameworkPerformance tuning with zend framework
Performance tuning with zend frameworkAlan Seiden
 
IBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP DevelopersIBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP DevelopersAlan Seiden
 
Zend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZendCon
 
PHP on IBM i Tutorial
PHP on IBM i TutorialPHP on IBM i Tutorial
PHP on IBM i TutorialZendCon
 
Web Performance First Aid
Web Performance First AidWeb Performance First Aid
Web Performance First AidAlan Seiden
 
Browser tools that make web development easier
Browser tools that make web development easierBrowser tools that make web development easier
Browser tools that make web development easierAlan Seiden
 
Zend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZendCon
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opmisnull
 

La actualidad más candente (20)

PHP Batch Jobs on IBM i
PHP Batch Jobs on IBM iPHP Batch Jobs on IBM i
PHP Batch Jobs on IBM i
 
PHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM iPHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM i
 
From Zero to ZF: Your first zend framework project on ibm i
From Zero to ZF: Your first zend framework project on ibm iFrom Zero to ZF: Your first zend framework project on ibm i
From Zero to ZF: Your first zend framework project on ibm i
 
PHP on Windows - What's New
PHP on Windows - What's NewPHP on Windows - What's New
PHP on Windows - What's New
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
Performance tuning with zend framework
Performance tuning with zend frameworkPerformance tuning with zend framework
Performance tuning with zend framework
 
IBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP DevelopersIBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP Developers
 
Zend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZend Core on IBM i - Security Considerations
Zend Core on IBM i - Security Considerations
 
PHP on IBM i Tutorial
PHP on IBM i TutorialPHP on IBM i Tutorial
PHP on IBM i Tutorial
 
Web Performance First Aid
Web Performance First AidWeb Performance First Aid
Web Performance First Aid
 
Browser tools that make web development easier
Browser tools that make web development easierBrowser tools that make web development easier
Browser tools that make web development easier
 
Zend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZend_Tool: Practical use and Extending
Zend_Tool: Practical use and Extending
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
 
Hidden gems in cf2016
Hidden gems in cf2016Hidden gems in cf2016
Hidden gems in cf2016
 
Command box
Command boxCommand box
Command box
 
A Bit of REST
A Bit of RESTA Bit of REST
A Bit of REST
 
Locking Down CF Servers
Locking Down CF ServersLocking Down CF Servers
Locking Down CF Servers
 
Keep Applications Online
Keep Applications OnlineKeep Applications Online
Keep Applications Online
 
Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
Require js training
Require js trainingRequire js training
Require js training
 

Similar a Running open source PHP applications on you IBM i

Using Presto for web-based GUI for green screens
Using Presto for web-based GUI for green screensUsing Presto for web-based GUI for green screens
Using Presto for web-based GUI for green screensProximity Group
 
What's new with Zend server
What's new with Zend serverWhat's new with Zend server
What's new with Zend serverCOMMON Europe
 
Command central 9.7: Features Overview
Command central 9.7: Features OverviewCommand central 9.7: Features Overview
Command central 9.7: Features OverviewSoftware AG
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM iCOMMON Europe
 
IBM Domino 9.0 Social Edition OpenSocial Component Deployment
IBM Domino 9.0 Social Edition OpenSocial Component DeploymentIBM Domino 9.0 Social Edition OpenSocial Component Deployment
IBM Domino 9.0 Social Edition OpenSocial Component DeploymentRahul A. Garg
 
The latest tools for developing your IBM i systems
The latest tools for developing your IBM i systemsThe latest tools for developing your IBM i systems
The latest tools for developing your IBM i systemsProximity Group
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformJeffrey T. Fritz
 
Add Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAdd Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAppDynamics
 
A Byte of Software Deployment
A Byte of Software DeploymentA Byte of Software Deployment
A Byte of Software DeploymentGong Haibing
 
IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...
IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...
IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...William Holmes
 
Better Bug Stomping with Zend Studio and Zend Server
Better Bug Stomping with Zend Studio and Zend ServerBetter Bug Stomping with Zend Studio and Zend Server
Better Bug Stomping with Zend Studio and Zend ServerZend by Rogue Wave Software
 
Manila MuleSoft Meetup #3 December 2018
Manila MuleSoft Meetup #3 December 2018Manila MuleSoft Meetup #3 December 2018
Manila MuleSoft Meetup #3 December 2018Christopher Co
 
Eclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse Day India
 
How to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe BreakHow to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe BreakAndrea Fontana
 
Twelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application ArchitectureTwelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application ArchitectureSigfred Balatan Jr.
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Suyati Technologies
 

Similar a Running open source PHP applications on you IBM i (20)

Using Presto for web-based GUI for green screens
Using Presto for web-based GUI for green screensUsing Presto for web-based GUI for green screens
Using Presto for web-based GUI for green screens
 
What's new with Zend server
What's new with Zend serverWhat's new with Zend server
What's new with Zend server
 
Command central 9.7: Features Overview
Command central 9.7: Features OverviewCommand central 9.7: Features Overview
Command central 9.7: Features Overview
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
Introduction to Node.js by Vinothini B
Introduction to Node.js by Vinothini BIntroduction to Node.js by Vinothini B
Introduction to Node.js by Vinothini B
 
Performance tuning PHP on IBMi
Performance tuning PHP on IBMiPerformance tuning PHP on IBMi
Performance tuning PHP on IBMi
 
IBM Domino 9.0 Social Edition OpenSocial Component Deployment
IBM Domino 9.0 Social Edition OpenSocial Component DeploymentIBM Domino 9.0 Social Edition OpenSocial Component Deployment
IBM Domino 9.0 Social Edition OpenSocial Component Deployment
 
The latest tools for developing your IBM i systems
The latest tools for developing your IBM i systemsThe latest tools for developing your IBM i systems
The latest tools for developing your IBM i systems
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
 
Add Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring ToolkitAdd Apache Web Server to your Unified Monitoring Toolkit
Add Apache Web Server to your Unified Monitoring Toolkit
 
A Byte of Software Deployment
A Byte of Software DeploymentA Byte of Software Deployment
A Byte of Software Deployment
 
Zend Framwork presentation
Zend Framwork presentationZend Framwork presentation
Zend Framwork presentation
 
Zend Framwork configurations
Zend Framwork configurationsZend Framwork configurations
Zend Framwork configurations
 
IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...
IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...
IBM Lotusphere 2012 Show301: Leveraging the Sametime Proxy to support Mobile ...
 
Better Bug Stomping with Zend Studio and Zend Server
Better Bug Stomping with Zend Studio and Zend ServerBetter Bug Stomping with Zend Studio and Zend Server
Better Bug Stomping with Zend Studio and Zend Server
 
Manila MuleSoft Meetup #3 December 2018
Manila MuleSoft Meetup #3 December 2018Manila MuleSoft Meetup #3 December 2018
Manila MuleSoft Meetup #3 December 2018
 
Eclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in Bluemix
 
How to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe BreakHow to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe Break
 
Twelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application ArchitectureTwelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application Architecture
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5
 

Último

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Último (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Running open source PHP applications on you IBM i

  • 3. © Proximity 2015 Agenda • What is open source? • PHP for open source • PHP on IBM i • Live install of Zend Server • Live install of Zend DBi • What are Zend Server applications? • Hands-on install from a .zpk • Hands-on install from source • Zend Server - A brief tour • Configuring Zend Server – top tips • Q & A
  • 4. © Proximity 2015 Objectives – what are yours? • What is your experience of open source applications? • What is your experience of PHP, MySQL or Zend Server? • Would you run an open source application on IBM i for your business? • Are you interested in any specific open source applications?
  • 5. © Proximity 2015 Objectives – what are ours? • An understanding of open source applications on IBM i • Implementation of Zend Server and Zend DBi • Installation of an open source application of your choice • Basic configuration of your open source application • An open source application up and running
  • 6. © Proximity 2015 What is open source?
  • 7. © Proximity 2015 Free like a puppy
  • 8. © Proximity 2015 Open source solutions • Source code made available for free under license • License provides rights to study, change and distribute • Core code is free, but expect to pay for anything beyond this • Extra features • “Skins” for CMS systems • Support • Cost of maintaining the software • Your time • Backups etc.
  • 9. © Proximity 2015 Open source solutions • Can use any language or database, but PHP and MySQL is a popular combination • PHP and MySQL are available on IBM i
  • 10. © Proximity 2015 Open source solutions • We will install the following • Zend Server – PHP engine, Apache web server • Zend DBi – MySQL database • This gives us our iAMP “stack” • i = IBM i • A = Apache • M= MySQL • P = PHP IBM i Apache MySQL PHP Applications
  • 11. © Proximity 2015 PHP on IBM i • A great choice for web development • Easy to learn, especially for RPG developers • PHP itself is open source and free to use • Widely used • Strong PHP community • Extensive resources and tools available • Wealth of education materials • Runs on IBM i • Integrates and works well with existing applications • SQL database access, RPG / COBOL / CL program calls • No 3rd party hardware required
  • 12. © Proximity 2015 PHP on IBM i HTTP request HTML, CSS, JS etc. CSS, JavaScript
  • 14. © Proximity 2015 Installing Zend Server – who are Zend? • Founded by Andi Gutmans and Zeev Suraski in 1999 • Provides products and services relating to PHP • Zend Server • Zend DBi • Zend Studio • Zend Framework
  • 15. © Proximity 2015 Installing Zend Server – what is Zend Server? • The PHP engine (and not just on IBM i) • Complete application server, including web server • Brought to IBM i thanks to collaboration between IBM and Zend • Basic version is free for IBM i (with forum support) • Uses IBM HTTP Server (Apache) • Comes complete with XML Toolkit to access native resources
  • 16. © Proximity 2015 Installing Zend Server – prerequisites • Folder /usr/local exists • Ports 10080 - 10083 are available • Licensed programs and PTFs appropriate to the OS version are installed • Zend Server not already installed • I will install on to a clean partition, you can verify it works
  • 17. © Proximity 2015 Installing Zend Server – prerequisites For IBM i 6.1 • Current PTF Group for 5761DG1 (minimum SF99115 Group 13) • FastCGI PTFs • 5761SS1 – SI36005 • 5761DG1 – SI36027 Licensed Program Product Option Description 5761SS1 33 Portable App Solutions Environment 5761SS1 30 Qshell 5761DG1 *BASE IBM HTTP Server for i 5733SC1 *BASE IBM Portable Utilities for i 5733SC1 1 OpenSSH, OpenSSL, zlib
  • 18. © Proximity 2015 Installing Zend Server – prerequisites For IBM i 7.1 • Current PTF Group for 5770DG1 (minimum SF99368 Group 1) Licensed Program Product Option Description 5770SS1 33 Portable App Solutions Environment 5770SS1 30 Qshell 5770DG1 *BASE IBM HTTP Server for i 5733SC1 *BASE IBM Portable Utilities for i 5733SC1 1 OpenSSH, OpenSSL, zlib
  • 19. © Proximity 2015 Installing Zend Server – prerequisites For IBM i 7.2 • No additional PTFs required Licensed Program Product Option Description 5770SS1 33 Portable App Solutions Environment 5770SS1 30 Qshell 5770DG1 *BASE IBM HTTP Server for i 5733SC1 *BASE IBM Portable Utilities for i 5733SC1 1 OpenSSH, OpenSSL, zlib
  • 20. © Proximity 2015 Installing Zend Server – installing the software • Download the appropriate SAVF from the Zend website, and FTP to the IBM i • Choose your installation mode • Silent (a.k.a. Batch) • Interactive • We will choose interactive RSTLICPGM LICPGM(6ZSVRPI) DEV(*SAVF) SAVF(QGPL/ZSVRSAVF6) • Skip Zend DBi for now
  • 21. © Proximity 2015 Straw Poll • What IBM i version are you running? • Do you have Zend Server installed? • Do you have any PHP / web development skills? • Is your business using Open Source PHP applications on other platforms? • Do you run Zend Server on Windows or Linux? ?
  • 22. © Proximity 2015 Installing Zend Server – completing the installation • Zend Server Console • Web based UI for configuration and monitoring of Zend Server • Navigate to http://<your_server_IP>:10081/ZendServer • First time in there will be initial configuration to do • Accept the license agreement • Select the appropriate launch profile • Development • Production • Set the admin and developer user passwords • Deploy source libraries
  • 24. © Proximity 2015 Installing Zend Server • Validate the installation • Navigate to http://<your_server_IP>:10080 • Zend Server Test Page should be displayed • Check the subsystem on the IBM i • For ease, we will use Presto to provide 5250 access via a browser • Navigate to http://<your_server_IP>:8022/presto/presto • Log in with QSECOFR / Proximity!! • GO ZENDSVR6/ZSMENU > 5 > 3 > Enter
  • 26. © Proximity 2015 Installing Zend DBi – what is Zend DBi? • MySQL binaries, compiled to run on IBM i • Functionally identical to MySQL • Popular, widely used open source database • The database of choice for many open source applications • Zend DBi is the IBM i implementation of MySQL, delivered by Zend
  • 27. © Proximity 2015 Installing Zend DBi – installing the software • Can be done as a second stage of the initial Zend Server installation GO ZENDSVR6/ZSMENU then take option 6 – ZendDBi Management menu and installation will start • NOTE: QSECOFR privileges are required!
  • 28. © Proximity 2015 Installing Zend DBi – verifying the installation • A new subsystem and daemon job are created, so check that the subsystem is running WRKACTJOB SBS(ZENDDBI) • Can also access the command line interface via QSH or QP2TERM QSH then cd /usr/local/mysql/bin mysql –u root > show databases; > use mysql; > show tables;
  • 29. © Proximity 2015 Installing Zend DBi – verifying the installation • After installation, the root user password should be set > set password for ‘root’@’localhost’ = password(‘Proximity!!’) > quit • To access the command line interface, we now need to enter mysql –u root --pass=‘Proximity!!’
  • 31. © Proximity 2015 Installing Zend DBi • Verify the installation • Navigate to http://<your_server_IP>:8022/presto/presto • Log in with QSECOFR / Proximity!! • GO ZENDSVR6/ZSMENU > 6 > 2 • Access the command line interface • QSH • cd /usr/local/mysql/bin • mysql –u root --pass=‘Proximity!!’ • > show databases; • > use mysql; • > show tables; • > select * from user;
  • 32. © Proximity 2015 Zend Server Applications
  • 33. © Proximity 2015 Zend Server applications – what are they? • Any software that you run using Zend Server • Open source applications • Packaged, e.g. Magento, Drupal • From Source, e.g. MediaWiki, Adminer • Your own developed applications • STREAM (delivery and transport management) in our case • Once an application is configured, you can • View statistics and logging information relating to the application • Define monitoring rules specific to the application • Define caching rules specific to the application
  • 34. © Proximity 2015 Zend Server applications – how to define an application • Applications are created automatically when you deploy from a package • You can also manually define an application for • Your manually developed code • Other applications installed from source • We will cover this in detail shortly
  • 36. © Proximity 2015 Installing an application from a .zpk – overview • Zend provide a number of pre-packaged Open Source applications that can be installed directly from the Zend Server console • Magento – e-commerce • Drupal – content management • WordPress – content management / blog • Joomla – content management • phpMyAdmin – database admin tool • phpBB – forum • We have successfully deployed all of these, and use Drupal running on IBM i for all our company websites
  • 37. © Proximity 2015 Installing an application from a .zpk – example • We use Drupal extensively, so we will us this as an example • Access the Zend Server Console > Guide Page > click the Drupal icon
  • 38. © Proximity 2015 Installing an application from a .zpk – download
  • 39. © Proximity 2015 Installing an application from a .zpk – readme
  • 40. © Proximity 2015 Installing an application from a .zpk – app details
  • 41. © Proximity 2015 Installing an application from a .zpk – license
  • 42. © Proximity 2015 Installing an application from a .zpk – prerequisites
  • 43. © Proximity 2015 Installing an application from a .zpk – parameters
  • 44. © Proximity 2015 Installing an Application from a .zpk – summary
  • 45. © Proximity 2015 Installing an application from a .zpk – manual download • Alternative approach, if you already have the .zpk file • Access the Zend Server Console • Applications > Apps > Deploy Application • Specify the location of the .zpk • Remaining steps are as before • Some config tweaks may be needed to ensure upload does not time out • Configurations > PHP > Filesystem and Streams • Set default_socket_timeout to e.g. 300 seconds • Configurations > PHP > Resource Limits and Tuning • Set max_input_time to e.g. 300 seconds
  • 46. © Proximity 2015 Installing an Application from a .zpk – under the covers • Source is deployed in /usr/local/zendsvr6/var/apps/http/__default__/0 • A .conf file is generated and saved in /usr/local/zendsvr6/etc/sites.d/http/__default__/0 • The .conf files are included within the Apache config file • Provides the necessary alias information to let Apache locate the application • Any staging and activation scripts defined in the package are executed • Application config based on the supplied parameters • Generation of MySQL database if required
  • 48. © Proximity 2015 Installing an application from a .zpk • Access the Zend Server Console • Navigate to http://<your_server_IP>:10081/ZendServer • Log in with admin / Proximity!! • Deploy an application • Click on the Guide Page tab • Click on the application you want to deploy • Follow the steps defined on the crib sheet provided for the application • Launch the application and have a wander around • In the Zend Server Console, check the application specific statistics
  • 50. © Proximity 2015 Installing an application from source – overview • Any application written in PHP that uses MySQL for the database can be implemented on IBM i • The examples we will look at today are • Adminer – database admin tool • SugarCRM – CRM tool • Mantis BT – bug tracker • Media Wiki – wiki • We have successfully deployed and use Adminer and SugarCRM on IBM i
  • 51. © Proximity 2015 Installing an application from source – archives • Typically, source will be provided in a .zip or .tar archive for ease of downloading • Both of these types can be unpacked on the IBM i
  • 52. © Proximity 2015 Installing an application from source – unpacking .zip files • Download the .zip file to the IFS, go into QSH or QP2TERM and enter jar tf <myFilePath> to list the contents of the archive • Navigate to the location that you want to extract to and enter jar xf <myFilePath> to extract the contents
  • 53. © Proximity 2015 Installing an application from source – unpacking .tar files • Download the .tar file to the IFS, go into QSH or QP2TERM and enter tar -tf <myFilePath> to list the contents of the archive • Navigate to the location that you want to extract to and enter tar -xf <myFilePath> to extract the contents. • If you have a .tar.gz file, extract the .tar file from it before transferring to the server
  • 54. © Proximity 2015 Installing an application from source – unpacking .tar files • The native tar command can be problematic, as file paths are limited to 100 characters • If you get a @longlink file after unpacking, the path limit has been exceeded and some files will be missing or wrongly named • There are two ways to address this … • The easy approach – save the .tar file to the IFS root and unpack, then move to the correct location • This will only work if the file paths are now less than 100 characters • The hard approach – install the Open Source binary for the GNU version of the tar command • More information on how to do this is available at … • http://www-01.ibm.com/support/docview.wss?uid=nas8N1011528 • http://www.youngiprofessionals.com/wiki/index.php/PASE/OpenSourceBinaries
  • 55. © Proximity 2015 Installing an application from source – example • Adminer is a lightweight MySQL management tool • Single script file, so easy to install
  • 56. © Proximity 2015 Installing an application from source – create folder
  • 57. © Proximity 2015 Installing an application from source – create folder
  • 58. © Proximity 2015 Installing an application from source – authority
  • 59. © Proximity 2015 Installing an application from source – upload
  • 60. © Proximity 2015 Installing an application from source – definition • Access the Zend Server Console > Applications > click Define Application
  • 61. © Proximity 2015 Installing an application from source – definition
  • 62. © Proximity 2015 Installing an application from source – definition
  • 63. © Proximity 2015 Installing an application from source – launch
  • 65. © Proximity 2015 Installing an application from source • Create a folder within htdocs for the application and set the folder authority • Navigate to http://<your_server_IP>:8022/presto/presto • Log in with QSECOFR / Proximity!! • wrklnk '/www/zendsvr6/htdocs/*‘ • mkdir ‘/www/zendsvr6/htdocs/<your_folder_name>’ • Take option 9=Work with Authority against the new folder • Grant user QHTTPSVR *RWX data and *ALL object authority • Upload the source • Use FileZilla to transfer the source, .zip or .tar to the new folder
  • 66. © Proximity 2015 Installing an application from source • Unpack the source (if necessary) • For .zip files • In QSH or QP2TERM • cd /www/zendsvr6/htdocs/<your_folder_name> • jar xf <your_file_name> • For .tar files • In QSH or QP2TERM • cd /www/zendsvr6/htdocs/<your_folder_name> • tar –xf <your_file_name>
  • 67. © Proximity 2015 Installing an application from source • Define the Application within Zend Server • Navigate to http://<your_server_IP>:10081/ZendServer • Log in with admin / Proximity!! • Click on the Applications tab • Click Define Application • Follow the steps defined on the crib sheet provided for the application • Launch the application and have a wander around • In the Zend Server Console, check the application specific statistics
  • 68. © Proximity 2015 Troubleshooting • Most common problems are authority related • Try granting QTMHHTTP full authority to the application folder and all contents • Check the logs! • PHP log in Zend Server console • Apache logs in /www/zendsvr6/logs • For specific applications refer to user documentation, or Google
  • 69. © Proximity 2015 Zend Server Console
  • 70. © Proximity 2015 Zend Server Console – overview – dashboard • Default landing page when you log into the console • Displays overview information for the server • Server statistics • System events • Information can also be filtered per application
  • 71. © Proximity 2015 Zend Server Console – applications • Lists defined and deployed applications • Displays information for individual applications • Application status • Summary information • Provides access to application monitoring and caching rules • Provides access to virtual host configuration and PHP library management
  • 72. © Proximity 2015 Zend Server Console – configurations • Configuration of various aspects of Zend Server • Components – enable/disable and configure Zend Server Components • Deployment – required for us! • Important for app performance – Data Cache, OPCache, Page Cache • Important for monitoring – Code Tracing, Monitor, Statistics • PHP – configure installed PHP components • Z-Ray – fantastic tool for developers – more later • IDE Integration – allows close coupled debugging from Zend Studio • Monitor – additional configuration for the Zend Monitor component
  • 73. © Proximity 2015 Zend Server Console – administration • Day-to-day administration of Zend Server • Servers – allows restart of server and shows any server level errors • Audit Trail – shows log of changes made to the server • Users – change passwords for admin and developer users • Web API – maintenance of Web API keys, used in Zend Studio integration and when accessing the server via its API layer (e.g. from Jenkins or other CI tools) • License – shows license information • Settings – server level configuration
  • 74. © Proximity 2015 Zend Server Console – Z-Ray Live • Developer tool that gives insight into PHP code by delivering detailed information into a browser component • Information includes • PHP functions • SQL queries • Request variables • Errors and warnings • Server events • Memory usage • Z-Ray Live allows this data to be viewed for requests from devices where browser component is not appropriate, e.g. mobile applications, API calls
  • 76. © Proximity 2015 Configuring Zend Server – top tips • As seen on PowerWire.eu • Character Set Configuration • Multibyte Support • Compression • Bonus Tip! Memory Pools and Run Priorities • Available on our website: http://proximity.co.uk/php-on-i
  • 77. © Proximity 2015 Configuring Zend Server – character sets Get this right now and you’ll never have character set problems In /www/zendsvr6/conf/httpd.conf DefaultFsCCSID 00285 CGIJobCCSID 00285 DefaultNetCCSID 01208 AddCharset UTF-8 .htm .html .xml In /www/zendsvr6/conf/fastcgi.conf SetEnv=“CCSID=1208” SetEnv=“LANG=C”
  • 78. © Proximity 2015 Configuring Zend Server – character sets In /usr/local/zendsvr6/share/ToolkitAPI/toolkit.ini encoding = “UTF-8” In the console, go to Configurations > PHP > ibm_db2 ibm_db2.i5_dbcs_alloc – set to use expanded allocations
  • 79. © Proximity 2015 Configuring Zend Server – multibyte support Means you’re not limited to ASCII In the console, go to Configurations > PHP > mbstring mbstring.http_output – set to UTF-8 mbstring.internal_encoding – set to UTF-8 mbstring.encoding_translation – set to On mbstring.http_input – set to Pass mbstring.language – set to neutral
  • 80. © Proximity 2015 Configuring Zend Server – compression A very quick win – speeds up response times of web pages In /www/zendsvr6/conf/httpd.conf LoadModule deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM AddOutputFilterByType DEFLATE application/x-httpd-php application/json text/css application/x-javascript application/javascript text/html
  • 81. © Proximity 2015 Configuring Zend Server – memory pools and run priorities Worth considering for Production systems where resources are shared with legacy applications Use WRKSHRPOOL to define one of the shared pools as “Zend” Use CHGSBSD to allocate the pool to subsystem ZENDSVR6 Change the Zend Server Class using WRKCLS ZENDSVR6/*ALL to set Run Priority to 20, equivalent to interactive jobs Change the HTTP Server Class using WRKCLS QHTTPSVR/QZHBHTTP to set Run Priority to 20, equivalent to interactive jobs
  • 82. © Proximity 2015 Any questions?
  • 83. © Proximity 2015 Thanks • i-UG for the opportunity • Steve Bradshaw for the hardware and support • You for attending