当前位置:网站首页>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 .
边栏推荐
- Machine learning related competition website
- 在线问题反馈模块实战(十四):实现在线答疑功能
- 数据库基础
- 如何保证缓存和数据库的双写一致性?
- 如何关闭高位端口
- Comparison and difference between dependence and Association
- 2019中兴捧月·模型压缩方案
- JMeter performance test saves the results of each interface request to a file
- Taishan office lecture: word error about inconsistent values of page margins
- 0 dynamic programming leetcode1567. Length of the longest subarray with positive product
猜你喜欢

以太网交换安全

Web page basic label

:app:checkDebugAarMetadata 2 issues were found when checking AAR metadata: 2 issues were found when

现在开发人员都开始做测试了,是不是以后就没有软件测试人员了?

Simulation of transfer function step response output of botu PLC first-order lag system (SCL)

【每日一题】919. 完全二叉树插入器

QT listview add controls and pictures

Deep learning model deployment

博途PLC一阶滞后系统传递函数阶跃响应输出仿真(SCL)

Crawler data analysis
随机推荐
系统架构&微服务
基于Thinkphp的开源管理系统
2022.7.22DAY612
How to ensure the double write consistency between cache and database?
【Keras入门日志(3)】Keras中的序贯(Sequential)模型与函数式(Functional)模型
JMeter性能测试之使用CSV文件参数化
如何关闭高位端口
Now developers are beginning to do testing. Will there be no software testers in the future?
现在开发人员都开始做测试了,是不是以后就没有软件测试人员了?
Polymorphism, final and interface
VScode无法启动问题解决思路
Regression analysis code implementation
Parameterization of JMeter performance test using CSV file
LeetCode剑指offer专项(一)整数
PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts
以太网交换安全
Use of JMeter performance test to store response content to file listener
Network Trimming: A Data-Driven Neuron Pruning Approach towards Efficient Deep Architectures论文翻译/笔记
Kdd2022 | uncover the mystery of Kwai short video recommendation re ranking, and recommend the new SOTA
Quantitative perception training in tensorflow2.x and x86 end evaluation of tflite