LAMP stack is a popular open-source web platform commonly used to run dynamic websites and servers. It includes Linux, Apache, MySQL, and PHP.
You'll need to ensure you have a user set up that is not root that has been granted Sudo privileges. If you need assistance in doing this, you can do the following:
You'll want to set a strong password for the user.
The set password prompts:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
You'll then use usermod to add the user to the sudo group. Make sure to replace [desiredusername] below with the actual username you desire to create
sudo usermod -a -G Sudo [desiredusername]
Use the su command to switch to the new user account to which you have granted the privileges.
Apache is one of the most popular web servers available and widely used due to its stability. It's generally the default choice for Clients when setting up a web server due to its long history, stability, and support over many years.
You will install Apache using the Ubuntu package manager, apt.
You will run the following commands to start the update for your system and start the installation process.
It will then prompt you for the password of the user. Once you enter the password, it will start the installation process by showing its packages. You will press Y and then hit Enter on your keyboard to continue with the installation.
You can verify that Apache installed correctly by going to http://your_server_IP_address (Replace your_server_IP_address with your server's IP address).
You can find your server IP address by navigating to the Cloud Control section in your Client Area. It can also be found in the welcome email we sent out to you. That email can be found in your email history, which is accessible through the Client Area by clicking the drop-down menu on the right-hand side that says "Hello Client."
If installed correctly, this should bring up a default Apache Default Page when you visit your server's IP address in your browser.
MySQL is a database management system. Hostwinds clients use this to organize and provide access to databases where your site will store information.
Run the following commands to get started.
sudo apt-get install mysql-server
As it did before, when installing Apache, it will bring up a prompt showing the packages it will install and the disk space that will be used. Press Y and then Enter on your keyboard to continue with the installation.
During this, you will be asked to select a password for the MySQL "root" user. Make sure NOT to leave this blank and to create a strong password.
PHP is the component that will process the code to display the content on your site. It can run scripts, connect to MySQL, and hand over the content.
Apache will first look for the index.html file, but since you are using PHP, you will want to tell the webserver to look for index.php instead. You'll change this by editing the dir. conf file with root privileges.