当前位置:网站首页>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 .
边栏推荐
- Vscode cannot start the problem solving idea
- MMOE multi-objective modeling
- Network ()
- 记一次路由器频繁掉线问题的分析、解决与发展
- Hystrix配置简单说明
- Command line execution and test report generation of JMeter performance test
- Leetcode 206. reverse chain list (2022.07.25)
- 机器学习相关比赛网站
- Taishan Office Technology Lecture: how to calculate page blank (margin)
- 依赖和关联的对比和区别
猜你喜欢

“尝鲜”元宇宙,周杰伦最佳拍档方文山将于7月25日官宣《华流元宇宙》

DevExpress.XtraEditors.DataNavigator用法

3.0.0 alpha blockbuster release! Nine new functions and new UI unlock new capabilities of dispatching system

KDD2022 | 揭秘快手短视频推荐Re-ranking之谜,相关推荐新SOTA

C # use log4net to record logs (basic chapter)

Apache dolphin scheduler 2.x nanny level source code analysis, China Mobile engineers uncover the whole process of service scheduling and start

什么是消息订阅和发布?

Program environment and pretreatment

如何保证缓存和数据库的双写一致性?

Use of JMeter performance test to store response content to file listener
随机推荐
Tensorflow learning diary tflearn
音视频学习(十)——ps流
keras学习之:获取神经网络中间层的输出结果
深度学习模型部署
从Boosting谈到LamdaMART
What is bloom filter in redis series?
Lambda and stream
Use of JMeter performance test to store response content to file listener
:app:checkDebugAarMetadata 2 issues were found when checking AAR metadata: 2 issues were found when
WCF 部署在IIS上
2021全球机器学习大会演讲稿
:app:checkDebugAarMetadata 2 issues were found when checking AAR metadata: 2 issues were found when
IDEA快捷键
[daily question 1] 919. Complete binary tree inserter
C language keyword extern
Jmeter性能测试之命令行执行和生成测试报告
总结软件测试岗的那些常见高频面试题
HOT100 hash
Taishan office lecture: word error about inconsistent values of page margins
PR subtitle production