当前位置:网站首页>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
边栏推荐
- Expansion of number theory Euclid
- Juc并发编程09——Condition实现源码分析
- [hdu6868] absolute math (pusher + Mobius inversion)
- 杰理之AES能256bit吗【篇】
- ansible playbook语法和格式 自动化云计算
- [Niuke practice match 68] fans of Niuniu (matrix fast power cycle matrix optimization)
- Introduction to graph theory -- drawing
- Common DBA SQL statements (4) - Top SQL
- 雨生百谷,万物生长
- DBA common SQL statements (2) - SGA and PGA
猜你喜欢
Sim Api User Guide(4)
Computer network security experiment II DNS protocol vulnerability utilization experiment
Planning and construction of industrial meta universe platform
Juc并发编程09——Condition实现源码分析
101. Symmetric Tree
【无标题】
Failureforwardurl and failureurl
Nvidia最新三维重建技术Instant-ngp初探
Sim Api User Guide(6)
構建元宇宙時代敏捷制造的九種能力
随机推荐
DBA常用SQL语句 (5) - Latch 相关
Expansion of number theory Euclid
failureForwardUrl与failureUrl
2022年制冷与空调设备运行操作考试练习题及模拟考试
代码源每日一题 div1 (701-707)
MacOS下使用CLion编译调试MySQL8.x
Go语言实践模式 - 函数选项模式(Functional Options Pattern)
Formattime timestamp format conversion
Failureforwardurl and failureurl
CSP认证 202203-2 出行计划(多种解法)
论文阅读《Integrity Monitoring Techniques for Vision Navigation Systems》——3背景
通过流式数据集成实现数据价值(1)
Realize data value through streaming data integration (3) - real-time continuous data collection
Custom login failure handling
2022年流动式起重机司机考试题库模拟考试平台操作
Compile and debug mysql8 with clion under MacOS x
Longest common front string
[COCI] lattice (dichotomy + tree divide and conquer + string hash)
杰理之用户如何最简单的处理事件【篇】
最长公共前串