当前位置:网站首页>Lnmp+wordpress to quickly build a personal website
Lnmp+wordpress to quickly build a personal website
2022-07-26 07:39:00 【Xiaolesheng】
#LNMP Composition Introduction
LNMP A set of free software acronyms commonly used together to run a dynamic web site or server .L finger Linux,N finger Nginx,M Generally refer to MySQL, It can also refer to MariaDB,P Generally refer to PHP, It can also refer to Perl or Python.
#LNMP working principle
- ① Browser send http request Request to server (Nginx), The server responds and processes Web request , Put some static resources (CSS、 picture 、 Video etc. ) Save on the server .
- ② take PHP The script transfers the protocol through the interface ( Gateway Protocol )PHP-FCGI(FastCGI) Transferred to the PHP FPM( Process Manager ),PHP-FPM Don't deal with it . then PHP-FPM call PHP Parser process PHP Parser parsing PHP Script information .PHP The parser process can start multiple , Concurrent execution .
- ③ Return the parsed script to PHP-FPM,PHP-FPM Re pass FastCGI Send script information to Nginx.
- ④ Server repass http response To the browser , The browser will parse and render again , Finally, present .

actual combat
- Installation environment
[[email protected] ~]# hostnamectl set-hostname lnmp
[[email protected] ~]# bash
[[email protected] ~]# yum install -y wget
[[email protected] ~]# wget http://soft.vpser.net/lnmp/lnmp1.8.tar.gz
[[email protected] ~]# tar zxf lnmp1.8.tar.gz
[[email protected] ~]# ls
anaconda-ks.cfg lnmp1.8 lnmp1.8.tar.gz
[[email protected] ~]# cd lnmp1.8
[[email protected] lnmp1.8]# ./install.sh
============================== Check install ==============================
Checking ...
Nginx: OK
MySQL: OK
PHP: OK
PHP-FPM: OK
Clean Web Server src directory...
+------------------------------------------------------------------------+
| LNMP V1.8 for CentOS Linux Server, Written by Licess |
+------------------------------------------------------------------------+
| For more information please visit https://lnmp.org |
+------------------------------------------------------------------------+
| lnmp status manage: lnmp {
start|stop|reload|restart|kill|status} |
+------------------------------------------------------------------------+
| phpMyAdmin: http://IP/phpmyadmin/ |
| phpinfo: http://IP/phpinfo.php |
| Prober: http://IP/p.php |
+------------------------------------------------------------------------+
| Add VirtualHost: lnmp vhost add |
+------------------------------------------------------------------------+
| Default directory: /home/wwwroot/default |
+------------------------------------------------------------------------+
| MySQL/MariaDB root password: 123456 |
+------------------------------------------------------------------------+
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
nginx (pid 94339) is running...
php-fpm is runing!
SUCCESS! MySQL running (94891)
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 50 *:3306 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:22 *:*
LISTEN 0 128 :::22 :::*
Install lnmp takes 13 minutes.
Install lnmp V1.8 completed! enjoy it.
- Deploy Wordpress application

- Configuration database
[[email protected] lnmp1.8]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.62-log Source distribution
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database wordpress;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on *.* to [email protected] identified by '123456' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on *.* to [email protected]'%' identified by '123456' with grant option;
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye
- download wordpres package
[[email protected] lnmp1.8]# cd
[[email protected] ~]# wget https://cn.wordpress.org/latest-zh_CN.zip
[[email protected] ~]# unzip latest-zh_CN.zip
# Delete nginx default Index.html file
[[email protected] ~]# cd /home/wwwroot/default/
[[email protected] default]# ls
index.html lnmp.gif ocp.php phpinfo.php phpmyadmin p.php
[[email protected] default]# rm -rf index.html
[[email protected] wordpress]# cd /root/wordpress/
[[email protected] wordpress]# cp -rvf * /home/wwwroot/default/
[[email protected] wordpress]# chmod 777 /home/wwwroot/default/*
[[email protected] default]# cp wp-config-sample.php wp-config.php
[[email protected] default]# vim wp-config.php
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );
/** Database username */
define( 'DB_USER', 'root' );
/** Database password */
define( 'DB_PASSWORD', '123456' );
/** Database hostname */
define( 'DB_HOST', '127.0.0.1' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */ define( 'DB_COLLATE', '' );
- Browser access test





After entering the homepage of the blog , You can publish articles here , Record events, etc .
边栏推荐
- From boosting to lamdamart
- Anaconda 中安装 百度飞浆Paddle 深度学习框架 教程
- Fang Wenshan, Jay Chou's best partner, will officially announce "Hualiu yuancosmos" on July 25
- 1. MySQL Architecture [MySQL advanced]
- Shardingsphere data slicing
- 0 dynamic programming leetcode1567. Length of the longest subarray with positive product
- Wrong Addition
- 2022.7.22DAY612
- [keras entry log (3)] sequential model and functional model in keras
- 2019 ZTE touyue · model compression scheme
猜你喜欢

The analysis, solution and development of the problem of router dropping frequently

动态性能视图概述

Regular expression rules and common regular expressions

Taishan office lecture: word error about inconsistent values of page margins

WCF deployed on IIS

Practice of online question feedback module (XIV): realize online question answering function

Web page basic label

How to close the high-level port

JMeter performance test saves the results of each interface request to a file

table 固定特定行
随机推荐
Network Trimming: A Data-Driven Neuron Pruning Approach towards Efficient Deep Architectures论文翻译/笔记
Solution to the problem of token loss when microservice feign is called
如何关闭高位端口
C language keyword extern
【uniapp】多种支付方式封装
[classic thesis of recommendation system (10)] Alibaba SDM model
Next item recommendations in short sessions
DevExpress.XtraEditors.DataNavigator用法
Use of JMeter performance test to store response content to file listener
机器学习相关比赛网站
Shardingsphere data slicing
Crawler data analysis
LeetCode剑指offer专项(一)整数
Devaxpress.xtraeditors.datanavigator usage
Basic knowledge of convolutional neural network
从Boosting谈到LamdaMART
PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts
模型剪枝三:Learning Structured Sparsity in Deep Neural Networks
QT listview add controls and pictures
MySQL implementation plan