Install gcc
First download
pcre-8.12.tar.gz
http://download.csdn.net/detail/qq_2292 9803/8771933
tar -zxvf pcre-8.21.tar.gz
cd pcre-8.21
./configure
make
make install
./configure prompts insufficient permissions If so, just use chmod 777 ./configureIf it prompts
configure:
error: in `/usr/local/src/pcre-8.12':configure: error: no acceptable C compiler found in $PATH
Then there is a lack of gcc
yum install gcc download gcc
install zlib library
cd /usr/local/
wget http://zlib.net/zlib-1.2 .8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8
./configure
make
make install
Install SSL
dCD/USR/LOCAL/
wget
Http://www.opensl.org/source/opensl-1.0.tar.gz
tar -zxvf openssl-1.0.1c.tar.gz./config
make
make install
install nginx
Nginx generally has two versions, They are the stable version and the development version. You can choose one of these two versions according to your purpose. The following are the detailed steps to install Nginx into the /usr/local/nginx directory:
cd /usr/local/
wget
http://nginx.org/download/nginx-1.2.8.tar.gz
tar -zxvf nginx-1.2.8.tar.gzcd nginx-1.2.8
./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/src/pcre-8.12 --with-http_ssl_module --with- openssl=/usr/local/src/openssl-1.0.1c
make
make install
--with-pcre=/usr/src/pcre-8.21 refers to The source code path of pcre-8.21.
--with-zlib=/usr/src/zlib-1.2.7 refers to the source code path of zlib-1.2.7.
6. Start
Make sure the system’s port 80 is not occupied by other programs,
/usr/local/nginx/sbin/nginx
Check if Successful startup:
netstat -ano|grep 80 If the result is entered, it means the startup is successful.
Open the browser to access the IP of this machine. If the browser displays "Welcome to nginx!", it means that Nginx has been installed and run successfully.
7. Restart u/usr/local/nginx/sbin/nginx —S RELOAD
8. Modify the configuration file
CD/USR/LOCAL/NGINX/Conf .Vi nginx.conf
9. Common configuration
#nginx Run users and groups
User www www;
#startup process, usually set to the number of CPUs is equal
worker_processes 4;
#Global error log and PID file
pid /var/run/nginx.pid;
error_log /var/log/nginx/error.log;
{Events {en #Epoll is a way in multi -way reuse IO (I/O Multiplexing), but only for the core of Linux2.6 and above, it can greatly improve the performance of Nginx
USE EPOLL ; 个#Single background Worker PROCESS process maximum concurrent link number
worker_connections 10240;
}
#Set HTTP server, use its reverse proxy function to provide load balancing support 00 403 500 502 503 504 /50x.html;
index index.html index .shtml
autoindex off;
fastcgi_intercept_errors on;
sendfile on;
# These are good default values.
tcp_nopush on;
tcp_nodelay off;
# output compression saves bandwidth
gzip off;
#gzip_static on;
#gzip_min_length 1k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_buffers 4 16k;
gzip_proxied any;
gzip_disable "MSIE [1-6].";
gzip_types text/plain text/html text/css application/x-javascript application/xml application/xml+rss text/javascript;
#gzip_vary on;
server_name_in_redirect off;
#设定负载均衡的服务器列表
upstream portals {
server 172.16.68.134:8082 max_fails=2 fail_timeout=30s;
server 172.16.68.135:8082 max_fails=2 fail_timeout=30s;
server 172.16.68.136:8082 max_fails=2 fail_timeout=30s;
server 172.16.68.137:8082 max_fails=2 fail_timeout=30s;
}
#upstream overflow {
# server 10.248.6.34:8090 max_fails=2 fail_timeout=30s;
# server 10.248.6.45:8080 max_fails=2 fail_timeout=30s;
#}
server {
#侦听8080端口
listen 8080;
server_name 127.0.0.1;
#403、404页面重定向地址
error_page 403 = http://www.e100.cn/ebiz/other/217/403.html;
error_page 404 = http://www.e100.cn/ebiz/other/218/404.html;
proxy_connect_timeout 90;
proxy_send_timeout 180;
proxy_read_timeout 180;
proxy_buffer_size 64k;
proxy_buffers 4 128k;
proxy_busy_buffers_size 128k;
client_header_buffer_size 16k;
large_client_header_buffers 4 64k;
#proxy_send_timeout 3m;
#proxy_read_timeout 3m;
#proxy_buffer_size 4k;
#proxy_buffers 4 32k;
proxy_set_header Host $http_host;
proxy_max_temp_file_size 0;
#proxy_hide_header Set-Cookie;
# if ($host != 'www.e100.cn' ) {
# rewrite ^/(.*)$ http://www.e100.cn/$1 permanent;
# }
location / {
deny all;
}
location ~ ^/resource/res/img/blue/space.gif {
proxy_pass http://tecopera;
}
location = / {
rewrite ^(.*)$ /ebiz/event/517.html last;
}
location = /ebiz/event/517.html {
add_header Vary Accept-Encoding;
root /data/web/html;
expires 10m;
}
location = /check.html {
root /usr/local/nginx/html/;
access_log off;
}
location = /50x.html {
root /usr/local/nginx/html/;
expires 1m;
access_log off;
}
location = /index.html {
add_header Vary Accept-Encoding;
#定义服务器的默认网站根目录位置
root /data/web/html/ebiz;
expires 10m;
}
#定义反向代理访问名称
location ~ ^/ecps-portal/* {
# expires 10m;
#重定向集群名称
proxy_pass http://portals;
#proxy_pass http://172.16.68.134:8082;
}
location ~ ^/fetionLogin/* {
# expires 10m;
proxy_pass http://portals;
#proxy_pass http://172.16.68.134:8082;
}
#location ~ ^/business/* {
# # expires 10m;
# proxy_pass http://172.16.68.132:8088;
# #proxy_pass http://172.16.68.134:8082;
#}
location ~ ^/rsmanager/* {
expires 10m;
root /data/web/;
#proxy_pass http://rsm;
}
#定义nginx处理的页面后缀
location ~* (.*).(jpg|gif|htm|html|png|js|css)$ {
root /data/web/html/;
#页面缓存时间为10分钟
expires 10m;
}
#设定查看Nginx状态的地址
location ~* ^/NginxStatus/ {
stub_status on;
access_log off;
allow 10.1.252.126;
allow 10.248.6.49;
allow 127.0.0.1;
deny all;
}
# error_page 405 =200 @405;
# location @405
# {
# proxy_pass http://10.248.6.45:8080;
# }
access_log /data/logs/nginx/access.log combined;
error_log /data/logs/nginx/error.log;
}
server {
listen 8082;
server_name _;
location = /check.html {
root /usr/local/nginx/html/;
access_log off;
}
}
server {
listen 8088;
server_name _;
location ~ ^/* {
root /data/web/b2bhtml/;
access_log off;
}
}
server {
listen 9082;
server_name _;
# location ~ ^/resource/* {
# expires 10m;
# root /data/web/html/;
# }
Location / {
root /data/web/html/sysMaintain/;
if ( !-f $request_filename) {
;
The above introduces the installation of linux nginx, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

选择C语言编译器:五款最受欢迎的推荐,需要具体代码示例引言:C语言是一种广泛应用于系统开发和嵌入式设备编程的高级编程语言。无论是初学者还是有经验的程序员,选择合适的C语言编译器都是至关重要的。本文将介绍五款最受欢迎的C语言编译器,并提供具体的代码示例,以帮助读者选择适合自己需求的编译器。一、GCC编译器:GCC(GNUCompilerCollection

Debian是一种流行的Linux发行版,广泛应用于服务器和桌面系统,GCC(GNUCompilerCollection)是一款开源的编译器套件,用于编译C、C++、Fortran等多种编程语言,在Debian系统中,安装GCC及GCC10非常简单,本文将为您提供详细的安装指南。安装GCC1.打开终端(Terminal),使用以下命令更新软件包列表:```shellsudoaptupdate```2.安装GCC及其相关工具:sudoaptinstallbuild-essential这个命令将安装

因为需要用到C++11,但CentOS自带的gcc4.4.7不支持,所以决定升级gcc。操作如下:#备份mv/etc/yum.repos.d/devtools-2.repo/etc/yum.repos.d/devtools-2.repo.bakwgethttp://people.centos.org/tru/devtools-2/devtools-2.repo-O/etc/yum.repos.d/devtools-2.repoyuminstalldevtoolset-2-gccdevtoolse

关于GCC在CentOS下通过yum安装默认版本号,CentOS5是4.1.2;CentOS6是4.4.7;CentOS7是4.8.3。很多时候在编译安装软件都需要高版本的GCC,否则就会报错。那么如何升级GCC的版本呢?首先要确认升级到的GCC版本号。目前GCC的最新版已经到了5.2,而CentOS7则依然使用其4.8,所以基于兼容性考虑,我选择升级到4.8.5。GCC官网:https://gcc.gnu.org下面开始一步一步来编译安装GCC4.8.5,需要注意的是,在编译安装GCC之前,系

以下是在Linux系统上安装GCC(GNUCompilerCollection)的详细教程:更新软件包列表:在终端中执行以下命令,以确保您的系统的软件包列表是最新的:sudoaptupdate安装GCC:继续在终端中执行以下命令,以安装GCC及其相关工具:sudoaptinstallbuild-essentialbuild-essential是一个包含GCC和其他构建工具的软件包,它将满足大多数基本编译需求。验证安装:安装完成后,您可以验证GCC是否成功安装。在终端中执行以下命令,检查GCC的版

gcc有多种意思:1、GNU编译器套件,是由GNU开发的编程语言编译器,包括C、C++、Objective-C、Fortran、Java、Ada和Go语言前端,也包括这些语言的库。2、海湾地区的政治经济组织,即海湾阿拉伯国家合作委员会,简称海湾合作委员会或海合会,成立于1981年5月,总部设在沙特阿拉伯首都利雅得。3、全球创业周校园中心,是一个汇聚创业爱好者的大学生社团组织。

GCC静态分析器通过编译时检测潜在错误和安全问题来调试C++代码。使用步骤如下:安装GCC静态分析器。使用-fanalyzer编译代码。分析JSON、XML或逐行警告列表中的结果。实战案例:通过检测数组越界来防止崩溃和安全漏洞。

Linux下使用GCC进行嵌入式ARM汇编的推荐配置嵌入式系统常用的处理器架构之一是ARM架构,而Linux是广泛应用于嵌入式系统开发的操作系统。在Linux下使用GCC进行嵌入式ARM汇编可以方便地进行开发工作。本文将介绍如何进行GCC的配置,并提供一些代码示例。安装GCC工具链首先,我们需要安装GCC工具链。GCC工具链是GCC编译器在某个特定平台下的集


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version
Chinese version, very easy to use

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
