linux nginx重新编译安装,Linux系统Nginx编译安装教程

1、下载nginx1.2.4

#注:下载地址:http://nginx.org/download/nginx-1.2.4.tar.gz

wget -c http://nginx.org/download/nginx-1.2.4.tar.gz

2、安装

#注:默认安装到/usr/local/nginx

tar -zxvf nginx-1.2.4.tar.gz

cd nginx-1.2.4

./configure

如果出现

./configure: error: the HTTP rewrite module requires the PCRE

library.

You can either disable the module by using

--without-http_rewrite_module

option, or install the PCRE library into the system, or build the

PCRE library

statically from the source with nginx by using

--with-pcre= option.

#注:安装pcre-devel解决问题

yum -y install pcre-devel

# ./configure

make  #注:会出来一堆东西

make install

3、运行

/usr/local/nginx/sbin/nginx

#注:nginx默认使用80端口,若是80端口被占用,修改/usr/local/nginx/conf/nginx.conf里的

server {

listen 80;   #我这边改为8081

#查看nginx是否正常

[[email protected] nginx-1.2.4]# /usr/local/nginx/sbin/nginx -t

nginx: the configuration file /usr/local/nginx/conf/nginx.conf

syntax is ok

nginx: configuration file /usr/local/nginx/conf/nginx.conf test is

successful

4、测试

echo "test123" > /usr/local/nginx/html/index.html

然后在浏览器中输入ip:8081 可以看到内容test123

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/395503.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

htt://3g.hn_根据我对“询问HN:谁在招聘?”的分析,开发人员技能发展趋势

htt://3g.hnby Ryan Williams瑞安威廉姆斯(Ryan Williams) 根据我对“询问HN:谁在招聘?”的分析,开发人员技能发展趋势 (Trending Developer Skills, Based on my Analysis of “Ask HN: Who’s Hiring?”) For people learning to code an…

day1作业二:多级菜单操作

作业二:多级菜单 (1)三级菜单 (2)可以次选择进入各子菜单 (3)所需新知识点:列表、字典 要求:输入back返回上一层,输入quit退出整个程序 思路: &am…

JDK源码分析(5)之 HashMap 相关

HashMap作为我们最常用的数据类型,当然有必要了解一下他内部是实现细节。相比于 JDK7 在JDK8 中引入了红黑树以及hash计算等方面的优化,使得 JDK8 中的HashMap效率要高于以往的所有版本,本文会详细介绍相关的优化,但是主要还是写 …

linux usb init,复制Linux liveUSB导致init.d脚本出错 - 不可能..?

请发表您的想法或想出的任何想法。我很想知道别人在想什么。整体问题当我安装一个简单的Java应用程序(我写的)通过/etc/init.d/在启动(在后台)运行时,它适用于我明确安装它的liveUSB。当我制作该棒的副本时,它永远不会成功启动。在引导liveUSB副本时&…

最小费用最大流模版

#include <iostream> #include <cstring> #include <cstdio> #include <queue> #include <algorithm>using namespace std;const int MAXN10100; const int MAXM40010; const int INF0x3f3f3f3f;struct Edge      //cost代表单位流量流过该…

fpga中的slack_是否想减少部署过程的恐怖程度? 在Slack中构建ChatOps。

fpga中的slackby Rick Mak麦瑞克(Rick Mak) 是否想减少部署过程的恐怖程度&#xff1f; 在Slack中构建ChatOps。 (Want to make the deployment process less scary? Build ChatOps in Slack.) In a company that makes mobile and web products, developers shouldn’t be t…

位运算-查找数组中唯一成对的数

基础实例一&#xff1a;使用位运算判断数的奇偶性 实例代码&#xff1a; public class Test {public static void main(String[] args) {System.out.println(isOdd(49));System.out.println(isOdd(50));}// 与运算public static boolean isOdd(int i){return (i & 1) ! 0;…

Docker实践:Cannot connect to the Docker daemon.

Docker实践&#xff1a;Cannot connect to the Docker daemon.查看docker daemon是否在运行 [rootlocalhost openec]# ps aux | grep dockerroot 3030 0.0 0.0 112656 984 pts/0 S 16:20 0:00 grep --colorauto docker启动docker[rootlocalhost openec]# ser…

linux虚拟终端时间短,使用Screen创建虚拟终端避免Linux远程断线

维护Linux的ssh工具在使用中&#xff0c;一旦遇到网络中断&#xff0c;则当前的shell就会自动关闭当前的工作进度就会丢失&#xff0c;这对于远程升级等比较耗费时间的工作是非常不利的对于远程调适代码也是很不可靠不安全的为此&#xff0c;可以使用screen这个工具来解决这个问…

中国第一软件开发_我第一次开发企业软件中学到的知识

中国第一软件开发In this article, I’ll share ten lessons I learned from my first project as a self-taught software developer. I was working for a consulting company at the time, and my official title was Software Engineer. The project I worked on was a web…

react-native-Cocoapods-Swift-Project

https://reactnative.cn/docs/integration-with-existing-apps/ 1、创建一个xcode工程&#xff0c;single View就行&#xff0c;项目语言选择swift&#xff0c;oc的直接生成就行不用这么麻烦。 2、把跟目录上创建 node的package.json,执行命令 npm init npm install react-nati…

用shell或者python写出各种图形

首先是shell等边三角形[roothxy my_script]# sh ff.sh num:6************************* *********** [roothxy my_script]# cat ff.sh #!/bin/bash ######################################################################### # File Name: ff.sh # Author: huxianyong # mai…

cfdiv2/c/找规律

题目连接 £&#xff1a;若n<4&#xff0c;NO&#xff1b; £&#xff1a;若n4,特判&#xff0c;n5&#xff0c;特判。 £&#xff1a;若n>6,用2-4组成24&#xff0c;1和5和6组成零&#xff0c;即可。 #include <set> #include <map> #includ…

linux lcd显示流程,求助 armlinux中实现lcd显示

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼/* for (bufIdx0; bufIdx < NUM_DISPLAY_BUFS-1; bufIdx) {fbp[bufIdx1] fbp[bufIdx] displaySize;}*/for(bufIdx0;bufIdx{buf(unsigned int *)fbp;for (i0; i < displaySize / sizeof(unsigned int); i) {buf[i] UYVY_BL…

android引入开源库_为好目录引入开源:通过代码帮助公益组织

android引入开源库by Michael D. Johnson迈克尔约翰逊(Michael D.Johnson) 为好目录引入开源&#xff1a;通过代码帮助公益组织 (Introducing the Open Source for Good Directory: Help Nonprofits with Code) A few months ago, we asked 20,000 people why they were learn…

第二阶段站立会议08

站立会议内容&#xff1a; 大家准备继续将代码进行融合&#xff0c;进行测试对一些功能进行优化。 1、会议照片&#xff1a; 2、任务展板&#xff1a; 3、燃尽图&#xff1a; 转载于:https://www.cnblogs.com/smcoder/p/7002539.html

ionic view 视图

ionic view 方法 $ionicView.loaded视图已经被加载了。这事件只发生一次当视图被创建并添加到Dom中。当跳出页面并且被缓存了的话&#xff0c;再次访问这个页面时这个时间将不会被激活。Loaded事件是个好方式让你为这个视图设置你的代码&#xff1b; 然而&#xff0c;他并不是…

ios开发 mvp实践_实践中开发人员的工作流程-我们如何在30天内建立​​MVP

ios开发 mvp实践by Lna Faure莱娜福雷(LnaFaure) 实践中开发人员的工作流程-我们如何在30天内建立​​MVP (The developer’s workflow in practice — how we built our MVP in 30 days) As a web developer, I often get to start projects from scratch and make decisions…

linux智能电压表设计与实现,毕业论文 智能数字电压表设计.doc

毕业论文毕业论文智能数字电压表设计智能数字电压表设计- PAGE I -摘要随着微电子技术和计算机技术的迅速发展&#xff0c;特别是单片机的出现和发展&#xff0c;使传统的电子测量仪器在原理、功能、精度及自动化水平等方面发生了巨大的变化&#xff0c;形成一种新一代的测量仪…

git——学习笔记(三)分支管理

一、创建、合并分支 每次提交&#xff0c;git都往后走一格&#xff0c;串成一跳时间线&#xff0c;head指向的是分支&#xff0c;分支指向提交。master是主分支&#xff0c;dev是另一条分支&#xff0c;分支就像指针一样&#xff0c;合并、删除分支时&#xff0c;修改的都是指针…