Yum安装优点:安装东西,方便快捷,特别是不用考虑包依赖

教程(Centos做演示,其他系统大同小异):

  1. 1.更换国内Yum源:
  2. [root@root xx ]# rm -rf /etc/yum.repos.d/*.repo
  3. [root@root xx ]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  4. [root@root xx ]# curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
  5. [root@root xx ]# yum makecache
  6. 2.磁盘挂载:
  7. [root@root xx ]# wget http://mirrors.linuxeye.com/scripts/auto_fdisk.sh
  8. [root@root xx ]# chmod +x ./auto_fdisk.sh
  9. [root@root xx ]# ./auto_fdisk.sh
  10. 3.nginx的yum仓库配置:
  11. [root@root xx ]# cd /etc/yum.repos.d
  12. vim nginx.repo
  13. ————————————————
  14. [nginx-stable]
  15. name=nginx stable repo
  16. baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
  17. gpgcheck=1
  18. enabled=1
  19. gpgkey=https://nginx.org/keys/nginx_signing.key
  20. module_hotfixes=true
  21. [nginx-mainline]
  22. name=nginx mainline repo
  23. baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
  24. gpgcheck=1
  25. enabled=0
  26. gpgkey=https://nginx.org/keys/nginx_signing.key
  27. module_hotfixes=true
  28. ————————————————
  29. [root@root xx ]# yum repolist
  30. 4.安装nginx,mariadb,php:
  31. [root@root xx ]# yum -y install mariadb mariadb-server
  32. [root@root xx ]# yum -y install nginx
  33. [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
  34. 5.开机启动与关闭防火墙:
  35. [root@root xx ]# systemctl stop firewalld //立刻关闭防火墙
  36. [root@root xx ]# systemctl disable firewalld //永久关闭
  37. [root@root xx ]# setenforce 0 //关闭selinux
  38. [root@root xx ]# systemctl start nginx //启动nginx
  39. [root@root xx ]# systemctl start mariadb //启动mariadb
  40. [root@root xx ]# systemctl start php-fpm //启动php
  41. [root@root xx ]# systemctl enable mariadb php-fpm nginx //给服务做开机自启
  42. 6.配置数据库:
  43. [root@root xx ]# mysqladmin -u root password '123' //设置mariadb的初始密码为123
  44. [root@root xx ]# mysql -u root -p
  45. >>>create database farm; //创建一个名字为farm的数据库
  46. >>>exit 退出
  47. 7.配置nginx文件:
  48. [root@root xx ]# cd /etc/nginx/conf.d/
  49. vim default.conf
  50. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 有时候需要换成路径
  51. 8.配置php.ini文件:
  52. [root@root xx ]# vim /etc/php-fpm.d/www.conf
  53. user = nginx
  54. group = nginx
  55. 9.重启php,nginx:
  56. [root@root nginx ]# systemctl restart nginx
  57. [root@root nginx ]# systemctl restart php-fpm
  58. 10.安装程序:
  59. [root@root nginx ]# cd /usr/share/nginx/
  60. [root@root nginx ]# rm -rf *
  61. [root@root nginx ]# wget http://updatenew.dedecms.com/base-v57/package/DedeCMS-V5.7-UTF8-SP2.tar.gz (测试程序)
  62. [root@root nginx ]# mv DedeCMS-V5.7-UTF8-SP2/uploads/* /usr/share/nginx/html/
  63. [root@root nginx ]# chown -Rf nginx /usr/share/nginx/html
  64. [root@root nginx ]# chmod -Rf 755 /usr/share/nginx/html

部署LNMP环境——Yum安装(113资讯网)的更多相关文章

  1. 手动部署LNMP环境(CentOS 7)

    手动部署LNMP环境(CentOS 7) 一.修改 yum 源 [root@localhost ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/e ...

  2. 【转载】Centos系统快速部署LNMP环境

    PHP语言在Linux系统上运行的时候,需要在Linux系统上部署相应的Nginx.MySQL.PHP等环境,只有将这些环境参数都设置好,PHP相关应用程序才可正常运行,部署环境的方法有很多种,可手动 ...

  3. docker中基于centos镜像部署lnmp环境 php7.3 mysql8.0 最新版

    Docker是一个开源的应用容器引擎,基于Go语言并遵从Apache2.0协议开源. Docker可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布到任何流行的Linux机器上 ...

  4. 高级运维(三):部署Lnmp环境、构建Lnmp平台、地址重写

    一.部署LNMP环境 目标: 安装部署Nginx.MariaDB.PHP环境 1> 安装部署Nginx.MariaDB.PHP.PHP-FPM: 2> 启动Nginx.MariaDB.FP ...

  5. 手动编译部署LNMP环境(CentOS7.5+Nginx-1.18.0+MySQL-5.7.30+PHP-7.4.14)

    在平时运维工作中,经常需要用到LNMP应用框架.LNMP环境是指在Linux系统下,由Nginx + MySQL + PHP组成的网站服务器架构. 可参考前面的文章: 如何在CentOS 7上搭建LA ...

  6. 十九.部署LNMP环境、构建LNMP平台、地址重写

    proxy client web1 web2   1.部署LNMP环境 1.1 部署nginx(前面已部署过) 1.2 部署mariadb ]# yum -y install mariadb mari ...

  7. Centos7之LNMP环境编译安装

    Centos7之LNMP环境编译安装 一.系统环境准备 注:安装时间过长,只做参考!!!1.系统信息 [root@localhost ~]# uname -r 3.10.0-957.el7.x86_6 ...

  8. 部署 LNMP(源码安装版本)shell脚本

    #!/bin/bash # 一键部署 LNMP(源码安装版本) menu() { clear echo " ##############‐‐‐‐Menu‐‐‐‐##############& ...

  9. lnmp环境里安装mssql及mssql的php扩展

    小活中用到mssql,于是在自己lnmp环境中安装各mssql数据库 步骤如下: 源码编译安装 (1)下载freetds-stable-0.91源码:http://download.csdn.net/ ...

随机推荐

  1. Java实现 蓝桥杯 算法提高 概率计算

    算法提高 概率计算 时间限制:1.0s 内存限制:256.0MB 问题描述 生成n个∈[a,b]的随机整数,输出它们的和为x的概率. 输入格式 一行输入四个整数依次为n,a,b,x,用空格分隔. 输出 ...

  2. Java实现 LeetCode 235 二叉搜索树的最近公共祖先

    235. 二叉搜索树的最近公共祖先 给定一个二叉搜索树, 找到该树中两个指定节点的最近公共祖先. 百度百科中最近公共祖先的定义为:"对于有根树 T 的两个结点 p.q,最近公共祖先表示为一个 ...

  3. Fiddler13模拟弱网络环境测试

    前言现在的Android软件,基本上都会有网络请求,有些APP需要频繁的传输数据时对于网络请求的稳定性和在特殊网络条件下的兼容性有要求,但是我们在测试的时候又很难模拟那种弱网络差网络的情况,今天就给大 ...

  4. 小师妹学JavaIO之:文件系统和WatchService

    目录 简介 监控的痛点 WatchService和文件系统 WatchSerice的使用和实现本质 总结 简介 小师妹这次遇到了监控文件变化的问题,F师兄给小师妹介绍了JDK7 nio中引入的Watc ...

  5. MySQL查询优化利刃-EXPLAIN

    有一个 ? 遇到这样一个疑问:当where中In一个索引字段,那么在查询中还会使用到索引吗? SELECT * FROM table_name WHERE column_index in (expr) ...

  6. 4k壁纸

    4k

  7. 【译】Introducing YARP Preview 1

    1 YARP YARP是一个项目,用于创建反向代理服务器.它开始于我们注意到来自微软内部团队的一系列问题.他们要么为其服务构建反向代理,要么询问 API 和用于构建 API 的技术.因此我们决定让他们 ...

  8. CentOS 7 源码编译安装PostgreSQL 9.5

    下载 在postgresql的官方即可找到源码文件目录,地址如下:https://www.postgresql.org/ftp/source/,在下载列表中根据需求选择版本,进入子目录后,可以看到文件 ...

  9. 【 哈希和哈希表】Three Friends【进制哈希】

    Three Friends 传送门:链接 (UPC)或  链接(大视野) 题目描述 Three friends like to play the following game. The first f ...

  10. 链式前向星存树图和遍历它的两种方法【dfs、bfs】

    目录 一.链式前向星存图 二.两种遍历方法 一.链式前向星存图:(n个点,n-1条边) 链式前向星把上面的树图存下来,输入: 9 ///代表要存进去n个点 1 2 ///下面是n-1条边,每条边连接两 ...