
To do this execute the commands following commands, and replace with your server IP, and with the port you wish to use. To develop applications locally, we can use PHP serve and specify the host and port of our server. In this case, we name the project example. Of course, we have to replace with the name of your application. To do this, run the following command: composer create-project -prefer-dist laravel/laravel With Composer installed, now we can install Laravel. sudo mv composer.phar /usr/local/bin/composer sudo chmod +x /usr/local/bin/composer 5. The following commands will take care of that. Next, we have to make sure Composer can be used globally and make it executable. Composer both works great with and makes it much easier to install Laravel.įirst, we need to download Composer. Install ComposerĬomposer is a PHP dependency manager that facilitates the download of PHP libraries in our projects. To save, hit CTRL+O, and to exit, hit CTRL+X Then, open the web browser and go to If you see this screen, you can be sure that PHP is working as it should.Ĭongratulations, MariaDB was installed successfully. Run the following command: sudo nano /var/ To do this, we need to create a file in Apache’s root directory. Now, we can test if PHP is working correctly. If the following command produced an output saying some packages were not found, simply update your Ubuntu by running the following command, and rerun the previous one: apt-get update To do this, execute the following command: sudo apt install php libapache2-mod-php php-mbstring php-xmlrpc php-soap php-gd php-xml php-cli php-zip php-bcmath php-tokenizer php-json php-pear You will need to install the language itself and some extra module. Fortunately, PHP 7 comes by default in Ubuntu’s official repositories, which makes the installation very easy. sudo ufw allow “Apache Full”Īfter that, we can check the Apache service status again. If you have no firewall installed, feel free to skip this step. Now, if you’re using a firewall, it is necessary to establish a rule in the Firewall so that Apache can run smoothly. Ubuntu by default, starts the Apache service and makes it boot during system loading. To do this, execute the following command. sudo systemctl status apache2Īs you can see, on our VPS there is no Apache service, so we have to install it. Luckily, you can check easily!Once you connect to your server using SSH, verify that an Apache system service exists. It is one of the most popular HTTP server tools, so it’s likely that your VPS has it installed. Install Apache Web Serverįor Laravel to work, you’ll need Apache. Here’s a helpful tutorial to help you along!įollowing the steps below will walk you through the easiest way to install Laravel on Ubuntu: 1. Install Laravel on Ubuntu Using Composerīefore we start, you’ll need to SSH into your virtual private server. Laravel – the PHP Framework for Code Lovers.
