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

建设通网站是什么网站北京工信部网站

建设通网站是什么网站,北京工信部网站,做网站构建,网站建设常用结构类型2. 在Linux 当中安装 Nginx(13步) 下载安装启动(详细说明附加详细截图说明) 文章目录 2. 在Linux 当中安装 Nginx(13步) 下载安装启动(详细说明附加详细截图说明)1. 在 Linxu 下安装 Nginx 的详细步骤2. 最后#xff1a; 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 虚拟机可以访问到外网 [rootlocalhost bin]# ping www.baidu.com具体的安装步骤如下 搭建 gcc 环境 yum -y install gcc-c pcre pcre-devel zlib zlib-devel openssl openssl-devel特别的 一定要保证当前的 linux 系统, 可以连接外网, 因为 yum 需要到外网,获取数据如 何 在 Linux 配 置 网 络 , 可 以 连 接 到 外 网 , 大家可以移步至韩老师的教学https://www.bilibili.com/video/BV1Sv411r7vd?p63执行上面指令的时候, 可能会报 Centos Another app is currently holding the yum lock..错误, 是因为 yum 不时会自动升级, 占用了端口或文件, 解决方案 可以重启 Linux, 立即执行该指令或 者等一会再执行或者参考 https://www.cnblogs.com/lzxianren/p/4254059.html 可以执行如下指令查看 gcc 安装的版本信息 [rootlocalhost bin]# gcc --version 或者 [rootlocalhost 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博客) 尝试解决亲测有效。 通过 Xftp 将 nginx-1.20.2.tar.gz 上传到 Linux /opt 目录当中 一般在 Linux 当中都是将安装软件放到 opt 目录下 进入到 opt 目录当中查看是否上传成功。 [rootlocalhost opt]# cd /opt切换到 /opt 目录 将上传的 nginx-1.20.2.tar.gz 文件解压 [rootlocalhost opt]# tar -zxvf nginx-1.20.2.tar.gz 4. 将解压后的文件放到指定位置/usr/local/nginx 文件目录当中 [rootlocalhost opt]# mv nginx-1.20.2 /usr/local/nginx5. 进入到 /usr/local/nginx文件目录当中 [rootlocalhost opt]# cd /usr/local/nginx6. 配置 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.conf7. 补全 nginx 配置目录 执行如下命令 mkdir /var/temp/nginx -p8. 编译并安装 执行如下命令 make make install执行 yum -y install make zlib-devel gcc-c libtool openssl openssl-devel重新configure执行下边命令 ./configure --usernobody --groupnobody --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 即可 [rootlocalhost nginx]# ./sbin/nginx -t10. 启动 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;[rootlocalhost conf]# mkdir /usr/local/nginx/log11. 查看进程/或端口(默认端口是 80) [rootlocalhost 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 --colorauto 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 端口。 查看开放的端口号 [rootlocalhost nginx]# firewall-cmd --list-all设置开放的端口号 #firewall-cmd --add-servicehttp --permanent #增加了一个 http 服务,理解 firewall-cmd --add-port80/tcp --permanent重启防火墙只有重启了防火墙你对防火墙的配置才会生效 。 firewall-cmd --reload重启后再次执行查看防火墙开放的端口信息 [rootlocalhost nginx]# firewall-cmd --list-all测试: windows 浏览器上输入[Linux ifconfig 查看到的IP地址]80端口 : http://192.168.12.134/ 补充 查看 Nginx 的版本信息指令 [rootlocalhost nginx]# ./sbin/nginx -v重启 Nginx的指令该指令也是在 Nginx 安装目录下执行的。 [rootlocalhost nginx]# ./sbin/nginx -s reload2. 最后 “在这个最后的篇章中我要表达我对每一位读者的感激之情。你们的关注和回复是我创作的动力源泉我从你们身上吸取了无尽的灵感与勇气。我会将你们的鼓励留在心底继续在其他的领域奋斗。感谢你们我们总会在某个时刻再次相遇。”
http://www.hkea.cn/news/14449700/

相关文章:

  • 网站视频链接福州制作网站软件
  • 佛山html5网站建设使用wordpress漏洞反弹shell
  • 杭州培训网站建设西安优秀的集团门户网站建设费用
  • 网站策划公司wordpress获取指定id分类名称
  • 好的做外贸的网站有哪些装饰设计资质等级标准
  • 宝安小学网站建设企业网银登录
  • 建设网站的要求亦庄建设局网站
  • 怎么开网站详细步骤网站空间怎么选
  • 湖南建设人力资源湖南网站建设浙江嘉兴最新事件
  • 苏州松陵镇哪里做网站邯郸最新消息
  • 商城网站建设视频成都企业建站
  • 医院做网站运维找个免费的网站
  • 听歌网站源码wordpress dux2.0
  • 青岛谷歌网站建设长春网站建设找新生科技
  • 个人博客模板网站wordpress应用展示
  • 自适应网站搭建wordpress 手册主题
  • 做外贸通常用哪些网站网站建设Skype打不开
  • 百度官方网站网址湖北专业网站建设检修
  • 深圳网站建设三把火如何创作自己的平台
  • 北京的电商平台网站jsp网站开发心得
  • 学做网站多久能学会汽车网站排行榜前十名
  • 杭州网站建设公司平台设计素材的网站
  • 单位申请免费网站湖南企业网站制作公司
  • 湖州网站开发公司asp c 网站开发
  • 网站子页设计wordpress免费商城
  • 网站服务器放置地查询南充 网站建设
  • 开网站做什么产品网络推广怎样做
  • 做网站要会写代码吗好姑娘免费高清视频
  • 怎么做夜场网站网上书城网站开发的目的与意
  • 建设网站答辩情况WordPress上传文件格式