Description of installing a LAMP stack on virtual servers running the Ubuntu 18.04 operating system.
What is a LAMP stack?
LAMP is an abbreviation that stands for “Linux, Apache, MySQL, and PHP,” which is a well-known software suite used by many websites or online applications. While being rather straightforward and simple to use, the LAMP stack is surprisingly powerful.
Different iterations of the LAMP stack have grown in popularity in recent years; for instance, PostgreSQL has replaced MySQL as the default database management system and Python or Perl is used in its place.
The installation of the other components will be covered in the instructions because the Ubuntu 18.04 Linux operating system is already installed on Netooze virtual servers.
Installing Apache
The server application known as Apache is at the very core of the LAMP stack. Processing HTTP requests, which are used to transport data over the Internet, is the responsibility of a web server.
The most widely used web server software in the world, Apache is incredibly reliable and open source.
To install Apache, use the following command:
sudo apt-get install apache2
Before checking, do not forget to open the HTTP port, for example using the iptables utility:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
Navigate in your browser to the following address:
http://IP-адрес-сервера/
As a result, the following stub page will open.
Installing MySQL
Installing a database management system is the next step. The most popular DBMS, MySQL, is also one of the easiest to set up and operate. Due to the fact that it does not fully implement the SQL standard and supports fewer data types than other DBMSs, the system is fairly quick (in particular, PostgreSQL). This makes MySQL a fantastic tool to utilise for creating straightforward apps that are quick to instal and use but don’t need complicated capabilities.
To install MySQL, run the following command:
sudo apt-get install mysql-server
After installation, it is recommended to run the security script:
sudo mysql_secure_installation
To test the installation, you need to connect to MySQL, when connecting, you need to enter a password:
mysql -u root -p
Installing PHP
PHP is a configuration element intended for dynamic content presentation. It executes many scripts, connects to MySQL databases to retrieve data, and then transmits the finalised product to a web server for public viewing.
To install PHP, run the following command:
sudo apt install php
This will install the latest version of PHP available in the Ubuntu repositories (currently PHP 7.2) and some additional components, for example: libapache2-mod-php7.2 libsodium23 php-common php7.2 php7.2-cli php7.2-common php7 .2-json php7.2-opcache php7.2-readline
It is often necessary to install additional PHP components, to find them use the following command:
apt-cache search php7
This will display a list of available components and their brief description. To install, you can use the following command:
apt install module-name
Checking the LAMP stack installation
Using a text editor, create a test php file:
vi /var/www/html/info.php
Add the following content to it and save your changes:
Restart the Apache server:
service apache2 restart
Navigate in your browser to the following address:
http://IP-adres-servera/info.php
If everything is set correctly, you will see the information page.
Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!