Exported on 28-Sep-2021 13:04:12
Parameters
1 - Install Nginx Server
We will being by installing Nginx web server.
Login as user {Linux User} on node {Linux Node}
# Install nginx server
sudo zypper -n in nginx
# Configure and start nginx
sudo systemctl enable nginx
sudo systemctl start nginx
2 - Install MySQL (MariaDB) Server
Installs MySQL database server
Login as user {Linux User} on node {Linux Node}
# Install MariaDB Server and Client
sudo zypper -n in mariadb mariadb-client
# Enable and start MySQL Server
sudo systemctl start mysql
sudo systemctl enable mysql
3 - Install PHP and FPM
Installs PHP version 7.4 and PHP-FPM package which is used as the php interpreter for Nginx.
Login as user {Linux User} on node {Linux Node}
# Install php and fpm
sudo zypper -n in php7 php7-fpm
4 - Upload Nginx Config File
Uploads PHP configuration file, this enable nginx to support php execution with the help of php-fpm socket.
Login as user {Linux User} on node {Linux Node}
5 - Upload PHP-FPM Config File
Uploads php-fpm configuration files, this sets correct FPM parameters for the LEMP stack environment.
Login as user {Linux User} on node {Linux Node}
6 - Finish Configuration & Create PHPInfo file
Finally, move the configuration files to their respective directories and restart the servers. To test that PHP is working fine with Nginx, a info.php file is created in the root directory of the server.
Visit http://YOUR_IP/info.php
, once this step has been completed to verify the installation.
Login as user {Linux User} on node {Linux Node}
# Replace nginx default config file
sudo cp ~/uploads/nginx-opensuse.conf /etc/nginx/nginx.conf
# Replace FPM configuration file
sudo cp ~/uploads/www-opensuse.conf /etc/php7/fpm/php-fpm.d/www.conf
sudo cp /etc/php7/fpm/php-fpm.conf.default /etc/php7/fpm/php-fpm.conf
# Add phpinfo file
echo '<?php phpinfo(); ?>' | sudo tee /srv/www/htdocs/info.php
# Restart servers
sudo service php-fpm restart
sudo service nginx restart
Install LEMP (Linux, Nginx, MySQL and PHP) On OpenSuse Server With AttuneOps
This Blueprint Install LEMP Stack Components On A OpenSuse Server And Creates A PHP Info File To Verify The Installation
LEMP is a variation of the ubiquitous LAMP stack used for developing and deploying web applications. While LAMP uses Apache as WebServer, its alternative Nginx is used with LEMP stack. LEMP stack consists of the following technologies.
Linux The Linux® kernel is the main component of a Linux operating system (OS) and is the core interface between a computer's hardware and its processes. Linux provides the base for LEMP stack components, and makes installing the desired applications easy. Most common used Linux distributions are Ubuntu and Debian. Other available Linux distributions are CentOS, RedHat, OpenSuse, and Fedora etc.
Nginx Nginx is an open source reverse proxy server. It is used to enable HTTP, HTTPS, SMTP, POP3, and IMAP protocols over a network. Nginx can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. It is main alternative and competitor to Apache Web Server. NGINX Plus is an application delivery platform built on NGINX, an open-source web server and reverse proxy for high-traffic sites.
PHP PHP is a general-purpose and server-side scripting language that is especially suited for web development. PHP originally stood for Personal Home Page. It was later changed to Hypertext Preprocessor. PHP runs on all major operating systems including Windows, Linux and macOS. PHP supports a wide range of databases, like MySQL, PostgreSQL, MS SQL, db2, Oracle Database, and MongoDB. LEMP stack utilises MYSQL as the database with PHP.
MySQL MySQL is a Relational Database Management System, it is available as a open-source software under the terms of General Public License. MySQL is backed and maintained by Oracle. MySQL runs on all major operating systems and is easy to setup and uses Structured Query Language (SQL).
Pre-Blueprint Attune setup