Symfony is a robust and flexible PHP framework widely used for developing web applications. This guide will walk you through the step-by-step process of installing Symfony on Ubuntu 22.04.

📋 Prerequisites
Before proceeding, ensure you have:
- A server running Ubuntu 22.04.
- A user account with sudo privileges.
- A stable internet connection.
🔄 Step 1: Update System Packages
Begin by updating your system’s package index:
sudo apt update -y
sudo apt upgrade -y
Reboot the system if necessary:
sudo reboot
☕ Step 2: Install PHP and Required Extensions
Symfony requires PHP and several extensions. Install them using:
sudo apt install php php-cli php-common php-mbstring php-xml php-zip php-curl php-intl php-sqlite3 unzip curl git -y
Verify the PHP installation:
php -v
📥 Step 3: Install Symfony CLI
The Symfony CLI tool helps in managing Symfony applications. Install it using:
wget https://get.symfony.com/cli/installer -O - | bash
Move the Symfony binary to a directory in your system’s PATH:
sudo mv ~/.symfony*/bin/symfony /usr/local/bin/symfony
Verify the installation:
symfony -v
🛠️ Step 4: Create a New Symfony Project
Create a new Symfony project named my_project with the full web application skeleton:
symfony new my_project --full
Navigate to the project directory:
cd my_project
🚀 Step 5: Start the Symfony Local Web Server
Symfony CLI includes a local web server for development purposes. Start it using:
symfony server:start
You should see output indicating the server is running, such as:
[OK] Web server listening
The Web server is using PHP CLI 8.1.2
http://127.0.0.1:8000
Open your web browser and navigate to http://127.0.0.1:8000 to access your new Symfony application.
✅ Conclusion
You’ve successfully installed the Symfony PHP framework on Ubuntu 22.04. You can now start developing your web application using Symfony’s powerful features.
Meta Description: Learn how to install the Symfony PHP framework on Ubuntu 22.04 with this step-by-step guide. Set up your development environment and start building robust web applications.
SEO Keywords: Symfony installation Ubuntu 22.04, install Symfony PHP framework, Symfony Ubuntu setup, PHP framework installation guide
Hướng dẫn cài đặt Cluster Kafka trên Ubuntu
https://forum.congdonglinux.com










Add Comment