Rather than installing them windows hosting uk provides a package that carries all the three important web-hosting applications to you.
AMP may be set up in almost any versions of the Linux OS. You should be able to set up the WebServer from the PC if you want a normal Ubuntu desktop or the command-line only Ubuntu computer. To do that, enter the following line of command
The setup process might take a while on account of the downloading of big volumes of information contained in the package. At the next step, make sure that you set a password to your MySQL root user up then affirm it. Otherwise, in case you leave the field empty, then you won’t have the ability to modify the password following the LAMP installation process. When you wish to make other users or update your database, the password may come in handy.
Another important thing worth noting is that if you change the Apache configuration, you have to restart Apache by implementing the command sudo /etc/init. d/apache2 restart. But, there is an exception once you carry out the process working with the loca .htaccess files.
Step 2: Examine the PHP Operation
LAMP provides an evaluation that could verify whether the PHP machine is operational as well as check the modules that are available. To do it, then insert the evaluation PHP file into the WebServer root directory, /var/www/html/. As an example, create a test PHP web page known as”name” then enter the following code to the web server root directory:
After that, go to your browser and then type http://localhost/name.php then hit enter. When it loads, it should show you your test PHP file. Available modules, configuration, and also the PHP version will be displayed on your window. It’s possible to add new PHP modules later you come.
The graphic package manager includes the modules that are available. grep module.
Measure 3: Test MySQL and its Bind Address
At this stage, you need to confirm whether MySQL installation was successful. Because CMS systems like WordPress won’t operate without it, this is. Enter the following command to execute the test: service MySQL status. It should be running clicking input, but if it doesn’t, restart the MySQL server through the following code:”sudo service mysql restart”
Additionally, check if the bind address of MySQL resembles that of your system. grep localhost. Results will show in your screen among which include your IP address. Open the MySQL configuration file and check everything is recorded there. Scroll until you see the bind address of your PC. The figures shown on this line should match the ones you saw. In case they don’t fit, change it to finish the test. The credentials you’d set throughout the MySQL installation procedure will give you access to a server. You are free to manipulate the MySQL environment and may produce a database.
Many CMS usually create a database . But reconfigure tables or you might have to do something extra like files. For that, you will need a database management tool. PHPMyAdmin is one of the very user-friendly tools. It offers an interface for the MySQL administration which delivers a landing place for those who aren’t well conversant with MySQL and its controls. The following section shows you how you can install PHPMyAdmin.
Step 4: PHPMyAdmin Installation
Procedure If the installation fails, you will have to reconfigure before repeating the process, repositories. For example, if you encounter a blue screen inquiring which web server you want to configure, then press the space bar (the red cursor should be next to the”apache2″).
A new prompt comes to a monitor inquiring whether phpMyAdmin should create a default database for its exclusive use, click . You will need to enter your admin password and username to make the database. Restart the Apache to complete the process.
To log into phpMyAdmin, type the following address in your browser: http://localhost/phpmyadmin/. Enter the username and password in the fields provided then click go. It’s important to notice that the passwords that you set for this process ought to be strong because the web server software gives access to your own PC to others.
Step 5: DNS Configuration
You might choose to configure the local web server to have a private domain name such as exmple.com. To achieve this, you should change the Apache settings to accept requests from the net. Below are the specific measures for configuring your DNS:
Make sure that your domain name of option has an A record; it should point to a specific IP address. Your DNS records are updated from the DNS hosting service supplier. To assess if the configuration was successful, use the dig tool that will return details including also an authority section, domain name, and your IP address.
After downloading and installing the latest version of the LAMP server, Apache will be optimized to begin hosting sites on your own Linux PC. Here are the measures of an easy hosting configuration. They are particularly for hosts that you can utilize to encourage websites.
First, disable the Apache virtual server default by entering the command sudo a2dissite *default option. Set. Make sure to modify your domain from exmple.com to your desired name. Use the command line: sudo mkdir desiredname.com.
Open the folder that you just launched and make other four sub-folders or directories inside it. These files , will serve the aim of maintaining your weblogs, and backups.
- sudo mkdir -p desiredname.com/public_html
- Then, start a new virtual server document for your site through this command:
- sudo nano /etc/apache2/sites-available/desiredname.com.conf
- Notice that your domain “desiredname.com” was replaced by “desiredname.com. conf”.
At this phase, you now need to create a configuration for your virtual server. Utilize the block of code below to help you do the procedure. You can copy paste it remember to substitute our random desiredname.com domain with your own in addition to add the error log control.
Finally, empower your website by means of this command: sudo a2ensite desiredname.com.conf. You’ll receive a prompt to restart Apache to use your new settings. These simple steps will have prepared your Apache to maintain your website. The procedure can be repeated by you for any websites you’d love to host on your Linux PC on your LAMP server.