In this tutorial, we will use the command line and the "scp" command to transfer files. You can use an FTP client like FileZilla or the command line to transfer files to your Droplet. ![]() Now that the LAMP stack is installed, we can upload the PHP application to the server. Once the installation is complete, start the Apache and MySQL services: sudo systemctl start apache2Įnable the services to start automatically on boot: sudo systemctl enable apache2 To install the LAMP stack on your Droplet, run the following command: sudo apt update & sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql -y Installing a LAMP StackĪ LAMP (Linux, Apache, MySQL, PHP) stack is required to host a PHP application. Now, log out of the root account and log back in using the new user account. Next, grant sudo privileges to the new user by running: usermod -aG sudo yourusername To create a new user, run the following command, replacing "yourusername" with your desired username: adduser yourusername It's a good idea to create a new user with sudo privileges, as using the root account for daily tasks is not recommended. Enter the current root password, then create and confirm a new, secure password. Connect to your Droplet using your SSH client and the IP address and root password provided in the email.Īfter logging in, you will be prompted to change the root password. Save this information as you will need it later. Once your Droplet is created, you will receive an email with the IP address and root password for your server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |