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

北京做网站多少钱无锡seo公司哪家好

北京做网站多少钱,无锡seo公司哪家好,宁波企业网站设计,旅游网站设计源码文章目录 Nginx源码安装注安装pcre库安装openssl库创建用户及用户组安装编译环境解压文件检测环境重要目录检查配置服务启动脚本查看效果: Nginx源码安装 注 本实验基于RHEL73.10.0-327.el7.x86_64,尽量使用RHEL7或CentOS7。 安装pcre库 安装 pere 库…

文章目录

      • Nginx源码安装
        • 安装pcre库
        • 安装openssl库
        • 创建用户及用户组
        • 安装编译环境
        • 解压文件
        • 检测环境
        • 重要目录
        • 检查
        • 配置服务启动脚本
        • 查看效果:

Nginx源码安装

本实验基于RHEL73.10.0-327.el7.x86_64,尽量使用RHEL7或CentOS7。

安装pcre库

安装 pere 库是为了使 Nginx 支持具备 URI 重写功能的 rewrite 模块,如果不安装 pere 库,则Nginx无法使用该模块。

yum install -y pcre-devel

安装openssl库

防止安装过程中报错。

yum install -y openssl-devel

创建用户及用户组

groupadd -g 958 nginx
useradd  -u 956 -g 958 -c "Nginx User" -s /sbin/nologin nginx

安装编译环境

yum install gcc gcc-c++ make

解压文件

tar zxvf nginx-1.22.0.tar.gz -C /usr/local/src/
drwxr-xr-x. 8 1001 1001 4096 May 24  2022 nginx-1.22.0

检测环境

执行nginx目录下的configure脚本

./configure 
#检查汇总
Configuration summary+ using system PCRE library+ OpenSSL library is not used+ using system zlib librarynginx path prefix: "/usr/local/nginx"nginx binary file: "/usr/local/nginx/sbin/nginx"nginx modules path: "/usr/local/nginx/modules"nginx configuration prefix: "/usr/local/nginx/conf"nginx configuration file: "/usr/local/nginx/conf/nginx.conf"nginx pid file: "/usr/local/nginx/logs/nginx.pid"nginx error log file: "/usr/local/nginx/logs/error.log"nginx http access log file: "/usr/local/nginx/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"
#然后
make
#再
make install

重要目录

[root@nginx nginx]# tree -d -L 1
.
├── client_body_temp 
├── conf #配置文件存放
├── fastcgi_temp
├── html #工作目录,等价于apache /var/www/html
├── logs #日志文件及pid文件
├── proxy_temp
├── sbin #启动脚本存放目录
├── scgi_temp
└── uwsgi_temp

检查

#查看Nginx版本
/usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.22.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) 
configure arguments:
#启动Nginx
/usr/local/nginx/sbin/nginx
#查看监听端口
netstat -lnutp | grep nginx
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      33728/nginx: master

配置服务启动脚本

vim /usr/lib/systemd/system/nginx.service
#Contents
[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network.target remote-fs.target nss-lookup.target[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid #这里的pidFile一定要和配置汇总里的对应。
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/bin/sh -c "/bin/kill -s HUP $(/bin/cat /usr/local/nginx/logs/nginx.pid)"
ExecStop=/bin/sh -c "/bin/kill -s TERM $(/bin/cat /usr/local/nginx/logs/nginx.pid)"[Install]
WantedBy=multi-user.target
#检查
systemctl daemon-reload
#在使用systemctl启动前记得杀死nginx的进程,不然重启会失败。详细可以看错误日志。
systemctl restart nginx.service
netstat -lnutp| grep 80
tcp      0    0 0.0.0.0:80        0.0.0.0:*         LISTEN      70435/nginx: master 

至此Nginx源码安装完成。

查看效果:

#因为我这边虚拟机没有安装界面所以只能在物理机上访问,所以防护墙必须关。
systemctl stop firewalld.servicesed  -i 's/^SELINUX=enforcing/SELINUX=Permissive/' /etc/selinux/config

image-20230803232451633

http://www.ds6.com.cn/news/60651.html

相关文章:

  • 建站品牌大全开发app需要多少资金
  • 做网站最主要是那个一类商标搜狗网页
  • django可以做多大的网站最好用的搜索引擎
  • 中心网站建设百度怎么发自己的小广告
  • 宁波网站推广高手百度投诉中心人工电话
  • wordpress网站建设教程视频网店运营在哪里学比较好些
  • 上海哪学网站建设优化浙江网站建设推广
  • 微信网站怎么做的好名字百度软件市场
  • 化妆品应如何网站建设定位友情链接检查工具
  • 做网站的公司哪家强网站优化推广seo
  • 学校网站建设用哪个系统seo诊断分析报告
  • 国外免费搭建网站个人免费网站建设
  • wordpress setup-config.php空白整站seo排名费用价格
  • 沙元浦做网站的公司哪个平台做推广效果好
  • 响应式网站建设哪家公司好互联网营销方法有哪些
  • 网站301重定向中国站长网入口
  • 做静态网站的参考文献网络优化器下载
  • 网站工作室设计百度搜索优化关键词排名
  • 优化企业网站标题微信广告怎么投放
  • 建设网站需要学习什么黑科技引流工具
  • 室内设计网课代码优化
  • 网络软文营销案例东莞整站优化排名
  • 网站开发制作公司seo中文含义是什么
  • 深圳住房建设局网站首页营销推广方式有哪些
  • 一个备案号可以放几个网站查销售数据的网站
  • 如何介绍自己的网站做百度网站一年多少钱
  • 免费推广网站平台黄色手机系统优化软件哪个好
  • 云南哪里有给做网站的怎么进行网站关键词优化
  • 网站备案幕布怎么做怎样开网站
  • 乌克兰网站建设网络营销与直播电商专业