{"id":21069207,"url":"https://github.com/devfaysal/ubuntu-php-dev-setup","last_synced_at":"2025-08-10T16:45:17.790Z","repository":{"id":222067108,"uuid":"756152197","full_name":"devfaysal/ubuntu-php-dev-setup","owner":"devfaysal","description":"PHP dev setup on Ubuntu","archived":false,"fork":false,"pushed_at":"2024-02-17T03:47:16.000Z","size":13,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T08:58:50.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devfaysal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-12T04:12:45.000Z","updated_at":"2024-10-11T05:48:33.000Z","dependencies_parsed_at":"2024-02-17T04:27:25.678Z","dependency_job_id":null,"html_url":"https://github.com/devfaysal/ubuntu-php-dev-setup","commit_stats":null,"previous_names":["devfaysal/ubuntu-php-dev-setup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devfaysal/ubuntu-php-dev-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfaysal%2Fubuntu-php-dev-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfaysal%2Fubuntu-php-dev-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfaysal%2Fubuntu-php-dev-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfaysal%2Fubuntu-php-dev-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devfaysal","download_url":"https://codeload.github.com/devfaysal/ubuntu-php-dev-setup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfaysal%2Fubuntu-php-dev-setup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269756052,"owners_count":24470543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T18:33:13.635Z","updated_at":"2025-08-10T16:45:17.694Z","avatar_url":"https://github.com/devfaysal.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP development setup on Ubuntu machine\n\n## Install Apache\n\n```sudo apt update```\n\n```sudo apt install apache2```\n\n## Install PHP\n```sudo apt-get install ca-certificates apt-transport-https software-properties-common wget curl lsb-release -y```\n\nhttps://launchpad.net/~ondrej/+archive/ubuntu/php/\n\n```sudo add-apt-repository ppa:ondrej/php```\n\n```sudo apt update```\n\n### PHP 7.4 with common extensions\n```sudo apt install php7.4 php7.4-cli php7.4-fpm php7.4-bcmath php7.4-curl php7.4-gd php7.4-intl php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-sqlite3 php7.4-xml php7.4-zip libapache2-mod-php7.4 php7.4-common```\n\n### PHP 8.1 with common extensions\n```sudo apt install php8.1 php8.1-cli php8.1-fpm php8.1-bcmath php8.1-curl php8.1-gd php8.1-intl php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-sqlite3 php8.1-xml php8.1-zip libapache2-mod-php8.1 php8.1-common```\n\n### PHP 8.2 with common extensions\n```sudo apt install php8.2 php8.2-cli php8.2-fpm php8.2-bcmath php8.2-curl php8.2-gd php8.2-intl php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-sqlite3 php8.2-xml php8.2-zip libapache2-mod-php8.2 php8.2-common```\n\n### PHP 8.3 with common extensions\n```sudo apt install php8.3 php8.3-cli php8.3-fpm php8.3-bcmath php8.3-curl php8.3-gd php8.3-intl php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-sqlite3 php8.3-xml php8.3-zip libapache2-mod-php8.3 php8.3-common```\n\nFor quickly toggling between versions of PHP, I have written a small bash script that can be helpful https://github.com/devfaysal/switch-php-version\n\n## Install Composer\nhttps://getcomposer.org/download/\n\n## Install MySQL\n```sudo apt install mysql-server```\n\nhttps://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-22-04\n\n## Permissions\n```sudo a2enmod rewrite```\n\n```sudo chown {your ubuntu username} /var/www```\n\n## Install Git\n```sudo apt install git```\n\n## Setup Virtual host\nFor the Laravel applications I have written a small bash script that can help create a whole Virtual host setup quickly https://github.com/devfaysal/laravel-vhost \n\n## Install Nodejs\nhttps://stackoverflow.com/a/66166866/6150983\nDownload LTS version from https://nodejs.org/en (a file like node-v20.10.0-linux-x64.tar.xz will be downloaded)\n\n```sudo apt update```\n\n```sudo apt install xz-utils```\n\ncd into the directory where the file node-v20.10.0-linux-x64.tar.xz downloaded\n\n```sudo tar -xvf node-v20.10.0-linux-x64.tar.xz```\n\n```sudo cp -r node-v20.10.0-linux-x64/{bin,include,lib,share} /usr/```\n\nCheck the version to confirm the installation \n\n```node --version```\n```npm -v```\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfaysal%2Fubuntu-php-dev-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevfaysal%2Fubuntu-php-dev-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfaysal%2Fubuntu-php-dev-setup/lists"}