当前位置: 首页 > news >正文

建立可以在线做照片的网站市场营销手段有哪四种

建立可以在线做照片的网站,市场营销手段有哪四种,东营网站关键词优化,做网站用广告赚钱过时了2. 在Linux 当中安装 Nginx(13步) 下载&安装&启动(详细说明附加详细截图说明) 文章目录 2. 在Linux 当中安装 Nginx(13步) 下载&安装&启动(详细说明附加详细截图说明)1. 在 Linxu 下安装 Nginx 的详细步骤2. 最后: 1. 在 Linxu 下安装 Nginx 的详细…

2. 在Linux 当中安装 Nginx(13步) 下载&安装&启动(详细说明+附加详细截图说明)

文章目录

  • 2. 在Linux 当中安装 Nginx(13步) 下载&安装&启动(详细说明+附加详细截图说明)
  • 1. 在 Linxu 下安装 Nginx 的详细步骤
  • 2. 最后:


1. 在 Linxu 下安装 Nginx 的详细步骤

Nginx 官方下载地址:https://nginx.org/en/download.html
在这里插入图片描述

注意:保证Linux 虚拟机可以访问到外网:

[root@localhost bin]# ping www.baidu.com

在这里插入图片描述

具体的安装步骤如下:

  1. 搭建 gcc 环境
yum -y install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel

特别的:

  1. 一定要保证当前的 linux 系统, 可以连接外网, 因为 yum 需要到外网,获取数据
  2. 如 何 在 Linux 配 置 网 络 , 可 以 连 接 到 外 网 , 大家可以移步至:韩老师的教学https://www.bilibili.com/video/BV1Sv411r7vd?p=63
  3. 执行上面指令的时候, 可能会报 Centos Another app is currently holding the yum lock..错误, 是因为 yum 不时会自动升级, 占用了端口或文件, 解决方案 :
    1. 可以重启 Linux, 立即执行该指令
    2. 或 者等一会再执行
    3. 或者参考 https://www.cnblogs.com/lzxianren/p/4254059.html

在这里插入图片描述

可以执行如下指令:查看 gcc 安装的版本信息:

[root@localhost bin]# gcc --version
或者
[root@localhost bin]# gcc -v

在这里插入图片描述

安装 gcc 提示一些镜像失败的问题:yum 安装软件提示 cannot find a valid baseurl for repo:base/7/x86_64 的解决方法(2024更新),大家可以移步至:🌟🌟🌟 [Linux 用yum安装软件提示 cannot find a valid baseurl for repo:base/7/x86_64 的解决方法(2024更新)-CSDN博客](Linux 用yum安装软件提示 cannot find a valid baseurl for repo:base/7/x86_64 的解决方法(2024更新)-CSDN博客) 尝试解决,亲测有效。

  1. 通过 Xftp 将 nginx-1.20.2.tar.gz 上传到 Linux /opt 目录当中

一般,在 Linux 当中都是将安装软件放到 opt 目录下

在这里插入图片描述

在这里插入图片描述

进入到 opt 目录当中查看,是否上传成功。

[root@localhost opt]# cd /opt

在这里插入图片描述

  1. 切换到 /opt 目录 将上传的 nginx-1.20.2.tar.gz 文件解压
[root@localhost opt]# tar -zxvf nginx-1.20.2.tar.gz 

在这里插入图片描述

在这里插入图片描述

4. 将解压后的文件放到指定位置/usr/local/nginx 文件目录当中

[root@localhost opt]# mv nginx-1.20.2 /usr/local/nginx

在这里插入图片描述

5. 进入到 /usr/local/nginx文件目录当中

[root@localhost opt]# cd /usr/local/nginx

在这里插入图片描述

6. 配置 nginx 路径

注意:一定要进入到 nginx 目录当中去,才行。因为只有在 nginx 目录下,才有这个我们编排的 :configure 文件夹。才能执行如下指令。

在这里插入图片描述

./configure
--prefix=/usr/local/nginx
--pid-path=/var/run/nginx/nginx.pid
--lock-path=/var/lock/nginx.lock
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--with-http_gzip_static_module
--http-client-body-temp-path=/var/temp/nginx/client
--http-proxy-te
mp-path=/var/temp/nginx/proxy
--http-fastcgi-temp-path=/var/temp/nginx/fastcgi
--http-uwsgi-temp-path=/var/temp/nginx/uwsgi
--http-scgi-temp-path=/var/temp/nginx/scgi
--conf-path=/usr/local/nginx/nginx.conf

在这里插入图片描述

在这里插入图片描述

7. 补全 nginx 配置目录

执行如下命令

mkdir /var/temp/nginx -p

在这里插入图片描述

8. 编译并安装

执行如下命令:

make && make install

在这里插入图片描述

执行:

yum -y install make zlib-devel gcc-c++ libtool openssl openssl-devel

在这里插入图片描述

重新configure,执行下边命令:

./configure --user=nobody --group=nobody --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module --with-http_sub_module --with-http_ssl_module

重新编译,执行下边命令:

make && make install

如果还是安装失败的:可以看看这篇文章https://blog.csdn.net/y2020520/article/details/131187585

9. 测试配置与 nginx 是否正常,当出现 successful 即可

[root@localhost nginx]# ./sbin/nginx -t

在这里插入图片描述

在这里插入图片描述

10. 启动 nginx

./sbin/nginx -c # 启动Nginx 
./sbin/nginx -c nginx.conf # 启动 Nginx ,同时指明是通过哪个路径下的 nginx.conf 配置文件进行启动,不写明,则是启动 /usr/local/nginx/conif 默认路径下面的 nginx.conf 进行启动 nginx 的
# 注意:这里我们是在 Nginx 目录下其启动的,所以用的是:./sbin
绝对路径进行启动的方式:
/usr/local/nginx/sbin/nginx -c

在这里插入图片描述

启动 Nginx 可能的错误 和解决方案

解决 nginx 启动报错 nginx: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

pid       /usr/local/nginx/logs/nginx.pid;
[root@localhost conf]# mkdir /usr/local/nginx/log

11. 查看进程/或端口(默认端口是 80)

[root@localhost nginx]# ps -ef | grep nginx
root       2477      1  0 20:07 ?        00:00:00 nginx: master process ./sbin/nginx
nobody     2488   2477  0 20:08 ?        00:00:00 nginx: worker process
root       2519   2417  0 20:10 pts/0    00:00:00 grep --color=auto nginx

在这里插入图片描述

注意:养成一个好习惯,每次启动任何服务器,都执行一下 ps -ef | grep xxx 查看该服务器是否启动成功了。

12. 验证Nginx 是否安装成功

nginx 默认监听端口 80,出现 Welcome to nginx!该页面就是搞定了

Linux 的浏览器:http://localhost

在这里插入图片描述

13. 配置防火墙,让 Windows 访问 Nginx

说明:默认情况下 Windows 是不能访问 Nginx , 因为Linux虚拟机是当中防火墙是关闭 80 端口的,关闭了,外界是无法访问到 80端口的。所以我们需要将其打开,让外界我们的 windows 可以访问到 80 端口。

查看开放的端口号

[root@localhost nginx]# firewall-cmd --list-all

在这里插入图片描述

设置开放的端口号

#firewall-cmd --add-service=http --permanent #增加了一个 http 服务,理解
firewall-cmd --add-port=80/tcp --permanent

重启防火墙,只有重启了防火墙,你对防火墙的配置才会生效

firewall-cmd --reload

重启后,再次执行,查看防火墙开放的端口信息:

[root@localhost nginx]# firewall-cmd --list-all

在这里插入图片描述

测试: windows 浏览器上输入:[Linux ifconfig 查看到的IP地址]+80端口 : http://192.168.12.134/

在这里插入图片描述

补充:

查看 Nginx 的版本信息指令:

[root@localhost nginx]# ./sbin/nginx -v

在这里插入图片描述

重启 Nginx的指令:该指令也是在 Nginx 安装目录下执行的。

[root@localhost nginx]# ./sbin/nginx -s reload

2. 最后:

“在这个最后的篇章中,我要表达我对每一位读者的感激之情。你们的关注和回复是我创作的动力源泉,我从你们身上吸取了无尽的灵感与勇气。我会将你们的鼓励留在心底,继续在其他的领域奋斗。感谢你们,我们总会在某个时刻再次相遇。”

在这里插入图片描述

http://www.hrbkazy.com/news/38144.html

相关文章:

  • 猪八戒做网站怎么样推广图片大全
  • 做一件代发的网站外链查询工具
  • 天津做网站哪家好友情链接检测
  • 用dw做动态网站乱码怎么弄百度网页提交入口
  • html5标准网站建设重庆seo网站运营
  • 深圳龙华医院网站建设温州网站优化推广方案
  • 深圳网站建设公司哪家好网站建设情况
  • ps 做ui比较好的网站有哪些短链接在线生成器
  • 教育网站安全建设方案谷歌外链代发
  • 盗版小说网站怎么赚钱网络营销的特点包括
  • 一起做网站17怎么下单深圳优化公司义高粱seo
  • wordpress如何恢复百度seo查询工具
  • 网站开发做前端还是后端app软件开发制作公司
  • 服务器可以吧网站做跳转吗高中同步测控优化设计答案
  • 云南建站网络营销第三版课本
  • 深圳百度seo代理泰州百度seo
  • 做网站学什么什么专业武汉网站推广优化
  • 小组做数据库网站青岛网络推广公司
  • 仿网站百度会怎么做重庆seo杨洋
  • 公司做网站的价格几千元b站2020推广网站
  • 做ppt选小图案的网站泰州网站排名seo
  • 做网站需要什么素材怎么做公众号
  • 如何建导航网站宁波网站seo诊断工具
  • 自己电脑怎么做网站服务器深圳专业建站公司
  • 宿迁做网站公司种子搜索引擎在线
  • 重庆做商城网站建设南宁seo营销推广
  • 富士康新闻最新消息新闻seo营销外包公司
  • 上海闵行区官网seo学徒是做什么
  • 南江县建设局网站广告营销策略有哪些
  • 网站文章做百度排名产品如何做网络推广