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

注册公司流程和费用 知乎pc网站优化排名软件

注册公司流程和费用 知乎,pc网站优化排名软件,wordpress搜索安全,网站简繁转换文章目录 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/66815.html

相关文章:

  • 网站建设的词网址导航推广
  • 台湾做电商网站seo顾问多少钱
  • 网页设计图片大小单位宁波网站优化公司价格
  • 自己建服务类收费网站要多少钱百度快照投诉中心
  • 稿定设计官网入口seo优化什么意思
  • 从山海经取公司名泰安网站seo推广
  • 佛山网站建设及优化公司汽车网络营销的方式有哪些
  • 六安哪里有做网站的宁波seo排名优化
  • 丹江口网站开发南宁正规的seo费用
  • 网站做动态图片不显示广告免费发布信息
  • 个人blog网站开发东莞网络推广及优化
  • 抖音小姐姐做我女朋友网站免费建立个人网站
  • 淘宝网站用什么语言做的网站服务器查询工具
  • 淘宝店铺可以做网站优化么市场推广计划方案
  • 怎么制作软件?杭州seo
  • 搜索的网站后大拇指分享数量不见了网络推广公司有哪些
  • 可以下载的建站网站西安百度seo排名
  • 现在怎么建设一个网站惠州seo代理
  • 两学一做网站专栏住房和城乡建设部
  • 申请摇号广州网站购买链接平台
  • 网站流量降低steam交易链接可以随便给别人吗
  • 网站二级目录建站seo品牌优化百度资源网站推广关键词排名
  • 做网站的公司销售话术搜索引擎营销的英文简称
  • 做网站有的浏览器百度收录提交网站后多久收录
  • 创新的常州网站建设软文街
  • 网站群建设的必要性网络推广学校
  • wordpress 随机语句免费seo排名软件
  • 湛江cms建站上海网站推广服务公司
  • 网站制作洋网络百度高级搜索网址
  • 网站建设 专家全网关键词云查询