部署LNMP环境——Yum安装(113资讯网)

Yum安装优点:安装东西,方便快捷,特别是不用考虑包依赖
教程(Centos做演示,其他系统大同小异):
- 1.更换国内Yum源:
- [root@root xx ]# rm -rf /etc/yum.repos.d/*.repo
- [root@root xx ]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- [root@root xx ]# curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
- [root@root xx ]# yum makecache
- 2.磁盘挂载:
- [root@root xx ]# wget http://mirrors.linuxeye.com/scripts/auto_fdisk.sh
- [root@root xx ]# chmod +x ./auto_fdisk.sh
- [root@root xx ]# ./auto_fdisk.sh
- 3.nginx的yum仓库配置:
- [root@root xx ]# cd /etc/yum.repos.d
- vim nginx.repo
- ————————————————
- [nginx-stable]
- name=nginx stable repo
- baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
- gpgcheck=1
- enabled=1
- gpgkey=https://nginx.org/keys/nginx_signing.key
- module_hotfixes=true
- [nginx-mainline]
- name=nginx mainline repo
- baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
- gpgcheck=1
- enabled=0
- gpgkey=https://nginx.org/keys/nginx_signing.key
- module_hotfixes=true
- ————————————————
- [root@root xx ]# yum repolist
- 4.安装nginx,mariadb,php:
- [root@root xx ]# yum -y install mariadb mariadb-server
- [root@root xx ]# yum -y install nginx
- [root@root xx ]# yum -y install php php-cli php-curl php-fpm php-intl php-mcrypt php-mysql php-gd php-mbstring php-xml php-dom
- 5.开机启动与关闭防火墙:
- [root@root xx ]# systemctl stop firewalld //立刻关闭防火墙
- [root@root xx ]# systemctl disable firewalld //永久关闭
- [root@root xx ]# setenforce 0 //关闭selinux
- [root@root xx ]# systemctl start nginx //启动nginx
- [root@root xx ]# systemctl start mariadb //启动mariadb
- [root@root xx ]# systemctl start php-fpm //启动php
- [root@root xx ]# systemctl enable mariadb php-fpm nginx //给服务做开机自启
- 6.配置数据库:
- [root@root xx ]# mysqladmin -u root password '123' //设置mariadb的初始密码为123
- [root@root xx ]# mysql -u root -p
- >>>create database farm; //创建一个名字为farm的数据库
- >>>exit 退出
- 7.配置nginx文件:
- [root@root xx ]# cd /etc/nginx/conf.d/
- vim default.conf
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 有时候需要换成路径
- 8.配置php.ini文件:
- [root@root xx ]# vim /etc/php-fpm.d/www.conf
- user = nginx
- group = nginx
- 9.重启php,nginx:
- [root@root nginx ]# systemctl restart nginx
- [root@root nginx ]# systemctl restart php-fpm
- 10.安装程序:
- [root@root nginx ]# cd /usr/share/nginx/
- [root@root nginx ]# rm -rf *
- [root@root nginx ]# wget http://updatenew.dedecms.com/base-v57/package/DedeCMS-V5.7-UTF8-SP2.tar.gz (测试程序)
- [root@root nginx ]# mv DedeCMS-V5.7-UTF8-SP2/uploads/* /usr/share/nginx/html/
- [root@root nginx ]# chown -Rf nginx /usr/share/nginx/html
- [root@root nginx ]# chmod -Rf 755 /usr/share/nginx/html
部署LNMP环境——Yum安装(113资讯网)的更多相关文章
- 手动部署LNMP环境(CentOS 7)
手动部署LNMP环境(CentOS 7) 一.修改 yum 源 [root@localhost ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/e ...
- 【转载】Centos系统快速部署LNMP环境
PHP语言在Linux系统上运行的时候,需要在Linux系统上部署相应的Nginx.MySQL.PHP等环境,只有将这些环境参数都设置好,PHP相关应用程序才可正常运行,部署环境的方法有很多种,可手动 ...
- docker中基于centos镜像部署lnmp环境 php7.3 mysql8.0 最新版
Docker是一个开源的应用容器引擎,基于Go语言并遵从Apache2.0协议开源. Docker可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布到任何流行的Linux机器上 ...
- 高级运维(三):部署Lnmp环境、构建Lnmp平台、地址重写
一.部署LNMP环境 目标: 安装部署Nginx.MariaDB.PHP环境 1> 安装部署Nginx.MariaDB.PHP.PHP-FPM: 2> 启动Nginx.MariaDB.FP ...
- 手动编译部署LNMP环境(CentOS7.5+Nginx-1.18.0+MySQL-5.7.30+PHP-7.4.14)
在平时运维工作中,经常需要用到LNMP应用框架.LNMP环境是指在Linux系统下,由Nginx + MySQL + PHP组成的网站服务器架构. 可参考前面的文章: 如何在CentOS 7上搭建LA ...
- 十九.部署LNMP环境、构建LNMP平台、地址重写
proxy client web1 web2 1.部署LNMP环境 1.1 部署nginx(前面已部署过) 1.2 部署mariadb ]# yum -y install mariadb mari ...
- Centos7之LNMP环境编译安装
Centos7之LNMP环境编译安装 一.系统环境准备 注:安装时间过长,只做参考!!!1.系统信息 [root@localhost ~]# uname -r 3.10.0-957.el7.x86_6 ...
- 部署 LNMP(源码安装版本)shell脚本
#!/bin/bash # 一键部署 LNMP(源码安装版本) menu() { clear echo " ##############‐‐‐‐Menu‐‐‐‐##############& ...
- lnmp环境里安装mssql及mssql的php扩展
小活中用到mssql,于是在自己lnmp环境中安装各mssql数据库 步骤如下: 源码编译安装 (1)下载freetds-stable-0.91源码:http://download.csdn.net/ ...
随机推荐
- Java实现 LeetCode 491递增子序列
491. 递增子序列 给定一个整型数组, 你的任务是找到所有该数组的递增子序列,递增子序列的长度至少是2. 示例: 输入: [4, 6, 7, 7] 输出: [[4, 6], [4, 7], [4, ...
- Java实现蓝桥杯模拟约数的个数
问题描述 1200000有多少个约数(只计算正约数). 答案提交 这是一道结果填空的题,你只需要算出结果后提交即可.本题的结果为一个整数,在提交答案时只填写这个整数,填写多余的内容将无法得分. pac ...
- java实现祖冲之割圆法
祖冲之割圆法 南北朝时,我国数学家祖冲之首先把圆周率值 计算到小数点后六位,比欧洲早了1100年!他采 用的是称为"割圆法"的算法,实际上已经蕴含 着现代微积分的思想. 如图[1. ...
- 通知!Symantec品牌证书已正式更名为Digicert
尊敬的合作伙伴和客户: 您好! 2017年8月2日,CA认证机构Digicert宣布正式收购 Symantec 安全认证业务.为此,Digicert宣布从2020年4月30日起,停止使用与赛门铁克(S ...
- 快速幂解法--x^n
class Solution{ public: double myPow(double x,int n){ if(==x || n==) return ; if(n == ) return x; if ...
- [leetcode] 股票问题
参考文章: [1] 团灭 LeetCode 股票买卖问题 [2] Most consistent ways of dealing with the series of stock problems 其 ...
- Netty 源码解析: Netty 的 ChannelPipeline
ChannelPipeline和Inbound.Outbound 我想很多读者应该或多或少都有 Netty 中 pipeline 的概念.前面我们说了,使用 Netty 的时候,我们通 ...
- PCB制图--VCC、VDD、VEE、VSS、VDDA、VSSA
VDDA为所有的模拟电路部分供电,包括: ADC模块,复位电路,PVD(可编程电压监测器),PLL,上电复位(POR)和掉电复位(PDR)模块,控制VBAT切换的开关等.即使不 使用ADC功能,也需要 ...
- ODEINT 求解常微分方程(4)
import numpy as np from scipy.integrate import odeint import matplotlib.pyplot as plt # function tha ...
- 对于Python的GIL锁理解
GIL是什么 首先需要明确的一点是GIL并不是Python的特性,它是在实现Python解析器(CPython)时所引入的一个概念.就好比C++是一套语言(语法)标准,但是可以用不同的编译器来编译成可 ...