This file covers all the steps needed to install a web server and Yii 2 framework to host a project in an Ubuntu 14.04 server.
First, the packages related to apache and php need to be installed:
| #!/bin/bash | |
| # | |
| # Copies certain kinds of known files and directories from a given Jenkins master directory | |
| # into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em. | |
| # | |
| set -ex | |
| if [ $# -ne 2 ]; then | |
| echo usage: $0 root_dir jenkins_master |
| WARNING : Unauthorized access to this system is forbidden and will be | |
| prosecuted by law. By accessing this system, you agree that your actions | |
| may be monitored if unauthorized usage is suspected. |
| 1. Generate ssh key: ssh-keygen -t rsa -C "your_email@example.com" | |
| 2. Go to ssh folder: cd ~/.ssh/ | |
| 3. Copy content of id_rsa.pub file | |
| 4. Go to bitbucket setting by going to your profile > select Bitbucket settings. Then select SSH keys and add new one. |
| # PHP | |
| # Test and package your PHP project. | |
| # Add steps that run tests, save build artifacts, deploy, and more: | |
| # https://docs.microsoft.com/azure/devops/pipelines/languages/php | |
| pool: | |
| vmImage: 'Ubuntu 16.04' | |
| variables: | |
| phpVersion: 7.2 |
| UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA= |