--- title: "PHP APM with AWS Elastic Beanstalk" slug: "linux-aws-elastic-beanstalk-php" description: "Install Stackify Linux Agent for your application on AWS Elastic Beanstalk. Learn how to set up and deploy with activation key and device alias for monitoring." updated: 2018-11-12T19:51:01Z published: 2018-11-12T19:51:01Z canonical: "docs.stackify.com/linux-aws-elastic-beanstalk-php" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.stackify.com/llms.txt > Use this file to discover all available pages before exploring further. # PHP APM with AWS Elastic Beanstalk Instructions on how to install the Retrace Linux Agent and PHP APM on [AWS Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk). ### Installing Stackify Linux Agent 1. Create a new file named **stackify.config** in your application’s **.ebextensions** folder. [Learn More about .ebextensions](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html). 2. Add the following to your **stackify.config** file: Replace `[INSERT ACTIVATION KEY]` with your activation key value. Optionally you can include the device name by replacing the `[aliasname]` with the desired device alias. You can find your activation key under [Settings: Account](https://s1.stackify.com/Manage/AccountInfo). ```yaml sources: /home/ec2-user: https://s1.stackify.com/Account/AgentDownload/Linux commands: 01: command: sudo ./agent-install.sh --key [INSERT ACTIVATION KEY] --environment "Production" --devicealias [aliasname] cwd: /home/ec2-user/stackify-agent-install-32bit files: "/etc/php.d/99stackify.ini" : mode: "000755" owner: root group: root content: | extension=stackify.so stackify.application_name=PHP Elastic Beanstalk Application stackify.environment_name=Test ``` Note: **stackify.application_name** and **stackify.environment_name** fields can be adjusted per the name and environment of your application 1. Deploy your app to Elastic Beanstalk - [Deploy using the **AWS Console**](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html) - [Deploy using **eb deploy**](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-deploy.html)