Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install LNMP+wordpress for Centos7

Shulou Source: shulou.com Published: 2022-06-01 00:12:52 09月21日 Update

This article mainly explains "how to install LNMP+wordpress in Centos7". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install LNMP+wordpress in Centos7.

1. Install nginx

# yum install nginx# configuration file in / etc/nginx#systemctl start nginx# startup nginx#systemctl enable nginx.service # set to boot # systemctl status firewalld # check the firewall, if it is active (running), then # vim / etc/firewalld/zones/public.xml # in zone … # systemctl reload firewalld

Test: 114.215.172.90 is the public network ip address

two。 Install mysql (not mariadb)

# rpm-uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm#yum repolist enabled | grep "mysql.*-community.*" # yum-y install mysql-community-server#yum-y install mysql-community-server# installation Community Edition # systemctl start mysqld # launch mysql#mysql_secure_installation # mysql security installation, enter root password, all the way y

3. Install php

# yum install php-fpm php-mysql#systemctl start php-fpm# Boot php-fpm#systemctl enable php-fpm# setup Boot Boot # mkdir / var/www#chown-r apache:apache / var/www

Modify the configuration file of nginx: create a new wordpress.conf in the / etc/nginx/conf.d directory

Server {listen 8000 × # pass the php scripts to fastcgi server listening on 127.0.0.1:9000location ~\ .php$ {root / usr/www;fastcgi_pass 127.0.0.1Plus 9000 × fastcgival index index.php;fastcgi_param script_filename $document_root$fastcgi_script_name;include fastcgi_params;} # systemctl reload nginx

Create a phpinfo.php in the / usr/www directory

External access:

4. Install wordpress

From downloading wordpress-4.4.2-zh_cn.tar.gz, decompress to / usr/www

Create a wordpress database

# mysql-uroot-p#create database wordpress

Through access, and installation prompts to install, you need to add the mysql user name and password, and develop the wordpress-related user name and password, and then create successfully.

Access can be done, or you can click on the login on the page for page setup and other related management work.

At this point, I believe you have a deeper understanding of "Centos7 how to install LNMP+wordpress". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Password content file user user name directory page learning configuration utility deeper security success interest address practicality practical simple operation data database Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Tech Info Shulou Technology MariaDB Microsoft