当前位置:网站首页>Configuration of LNMP
Configuration of LNMP
2022-04-23 10:03:00 【wyju】
l representative linux
n representative nginx
m representative mysql
p representative php
1. install nginx
1.1 This is the installation connection
https://blog.csdn.net/weixin_45955039/article/details/124282533?spm=1001.2014.3001.5501
1.2 Do not start after installation , Modify the configuration file
vim /usr/local/nginx/conf/nginx.conf
notes nini, And put 48 The line is modified as follows
index index.php index.html index.htm;

Uncomment 68-74 That's ok , And modify it 73 The content of the line is as follows
include fastcgi.conf;

1.3 start-up ngnix
No output
/usr/local/nginx/sbin/nginx

2. install mysql, Be sure to start mysql
https://blog.csdn.net/weixin_45955039/article/details/123137325?spm=1001.2014.3001.5501
3. install php
3.1 stay /data Create one in the directory php Catalog
[root@slave2 hadoop]# cd /data/
[root@slave2 data]# mkdir php

3.2 hold php Installation package , Upload to php Directory
Install package download connection
https://mirrors.lzu.edu.cn/centos/7/os/x86_64/Packages/
Post upload effect

3.3 install php service
yum -y install php-*.rpm
3.4 see php state
systemctl status php-fpm

3.5 start-up php
systemctl start php-fpm

3.6 close php
systemctl stop php-fpm
4. To write php Script , Test if you can connect
cd /usr/local/nginx/html/
vim test.php
The contents are as follows
<?php
phpinfo();
?>

5. To write php Connect database script , The test is that you can connect to the database
[root@slave2 html]# cd /usr/local/nginx/html/
[root@slave2 html]# vim test02.php
The contents are as follows
<?php
$links=mysql_connect("localhost","root","123456");
if($links){
echo "link db ok!!!";
}
else{
echo "link db no!!!";
}
?>

版权声明
本文为[wyju]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230956570727.html
边栏推荐
- PHP two-dimensional array specifies that the elements are added after they are equal, otherwise new
- DBA common SQL statements (3) - cache, undo, index and wait events
- 通过流式数据集成实现数据价值(3)- 实时持续数据收集
- DBA常用SQL语句(2)— SGA和PGA
- [ACM-ICPC 2018 Shenyang Network preliminaries] J. Ka Chang (block + DFS sequence)
- [untitled]
- SQL tuning series - Introduction to SQL tuning
- CSP certification 202203-2 travel plan (multiple solutions)
- 解决VMware卸载后再安装出现的问题
- Planning and construction of industrial meta universe platform
猜你喜欢
随机推荐
计算机网络安全实验二|DNS协议漏洞利用实验
Go语言实践模式 - 函数选项模式(Functional Options Pattern)
SQL tuning series - Introduction to SQL tuning
LeetCode-608. 树节点
Chinese Remainder Theorem and extended Chinese remainder theorem that can be understood by Aunt Baojie
实践六 Windows操作系统安全攻防
Nvidia最新三维重建技术Instant-ngp初探
通过流式数据集成实现数据价值(2)
Chapter 3 enable and adjust the size of IM column storage (im-3.1)
第一章 Oracle Database In-Memory 相关概念(IM-1.1)
[lnoi2014] LCA - tree chain subdivision - multipoint LCA depth and problems
杰理之AES能256bit吗【篇】
第二章 Oracle Database In-Memory 体系结构(上) (IM-2.1)
0704、ansible----01
Less than 100 secrets about prime numbers
杰理之栈溢出 stackoverflow 怎么办?【篇】
Cloud identity is too loose, opening the door for attackers
Understand scope
杰理之通常程序异常情况有哪些?【篇】
Computer network security experiment II DNS protocol vulnerability utilization experiment









