Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is a dynamic website environment in Linux and how to deploy it

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

When talking about websites, we may have heard the words static and dynamic but not know what they mean, or we may know something literally but not know the difference.

All this can be traced back to websites and web applications. A Web application is a website, but many websites are not Web applications. For example, Weibo is a website and an application, but like some companies, the official website is a website but not a web application. At the same time, it is often heard that what is called a website is a static website, and what is called a web application is a dynamic website.

Next, we introduce the difference between static websites and dynamic websites.

Static sites are the most basic type of website and the easiest to create. It does not require server-side processing, only client-side processing. Client side technologies are HTML, CSS and JavaScript. Simply put, it does not require the use of a backend. A static website is presented to users exactly as it is stored, which means that nothing on the page can be changed by users or even webmasters unless the website is redesigned or webmasters go directly into the code to make changes. There is no content stored, except for the actual pages of the site; no users, no comments, no blog posts or any interactivity. There is no programming language required to create a static website, JavaScript is technically a programming language, but there is no need to create a static website. However, if a site uses JavaScript but does not have PHP or any other programming language, it is still considered a static site because JavaScript is a client-side language.

Static web pages consist of "fixed code," and nothing on the page changes unless the site developer makes changes. Think of it as a corporate brochure. This is why static websites are sometimes called brochure websites because they give you a lot of the same information as brochures. Therefore, if you need to create a website that only needs information and is not updated regularly, it is easier and probably more efficient to create a static website.

There is a simple way to determine if a website is dynamic. If users can interact with it, it is a dynamic website. Therefore, most of the websites we may visit are dynamic websites. Whether it is Zhihu, Douban, Facebook or Digital-Tutors, users can interact with the website. Just being able to click on the links in the website does not explain the problem, such as commenting on posts, creating user profiles or making reservations.

Dynamic sites use languages such as PHP to interact with information stored in databases. As a result, the creation of dynamic websites is much more complex and costly. Not only does Web hosting need to be done, but a database or server must also be created. The language used to create dynamic sites is also much more complex than the client-side language.

Most dynamic websites utilize content management systems to manage their content. Typically, developers will create custom CMSs for their customers (using PHP and MySQL), but this is not required. There are plenty of free systems available to you, such as WordPress, Drupal and Joomla. You may have heard of PHP and ASP.NET for dynamically generating HTML. What this really means is that those programming languages can be changed and written HTML through guidance without people actually going into the code and making changes. Another term commonly associated with dynamic sites is CRUD, which stands for create, read, update, and delete. All four of these things happen when you use a dynamic site because they refer to the functionality of the database. Think of a blog. To be successful in any blogging platform anyway, you must be able to create content before you can read or view that content on a page. You should be able to update or edit your posts and then also have the option to delete them. All this work happens in databases. Content management systems make this process possible.

That's the difference between static and dynamic websites, so let's look at how to deploy a dynamic website environment.

LNMP dynamic website deployment architecture is a dynamic website system solution composed of Linux + Nginx + MySQL + PHP, which has excellent characteristics such as free, efficient, strong scalability and low resource consumption.

I. preparations

Before installing the service program using the source package, the installation host must first have an environment for compiling the program source code. He needs to have compilers for C language, C++ language, Perl language, and various common compilation support function libraries. Therefore, please configure the Yum software repository first, and then install all the packages listed below. Use wget command to download 16 software source packages required for LNMP dynamic website deployment architecture and 1 forum website system package for checking the effect on Linux server.

II. Configuring MySQL Services

Create a user named mysql, specifically responsible for running MySQL database, decompressing, compiling, installing MySQL database service program, service command to start mysqld database service.

III. Configure Nginx Services

Nginx is an excellent lightweight service for deploying dynamic websites. It was originally developed for Russian portal sites and is trusted by users because of its stability, rich features, low memory consumption and strong concurrency. At present, domestic portal sites such as Sina, Netease and Tencent have used this service.

IV. Configuring PHP Services

PHP (Hyperxt Preprocessor) is a common open source scripting language, invented in 1995, it absorbs many advantages of C language, Java language and Perl language, with open source, free, fast, cross-platform strong, high efficiency and other excellent characteristics, is currently one of the most commonly used languages in the field of Web development.

Specific configuration service process, refer to "Linux should learn so", the book details the code implementation of each step, clear and intuitive, is a good helper to achieve configuration.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report