ubuntu16.04.3安装教程_Ubuntu16下安装QQ

ubuntu16.04.3安装教程_Ubuntu16下安装QQUbuntu16.04.1安装NginxNginx(“enginex”)是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP代理服务器。Nginx是由IgorSysoev为俄罗斯访问量第二的Rambler.ru站点开发的,第一个公开版本0.1.0发布于2004年10月4日。其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

Ubuntu16.04.1 安装Nginx
Nginx (“engine x”) 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,第一个公开版本0.1.0发布于2004年10月4日。其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名。

安装Nginx依赖库

安装gcc g++的依赖库
ubuntu平台可以使用如下命令。

apt-get install build-essential
apt-get install libtool
centeros平台可以使用如下命令。

centos平台编译环境使用如下指令
安装make:
yum -y install gcc automake autoconf libtool make

安装g++:
yum install gcc gcc-c++  
安装 pcre依赖库(http://www.pcre.org/
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
安装 zlib依赖库(http://www.zlib.net
apt-get install zlib1g-dev
安装 ssl依赖库
apt-get install openssl
安装Nginx(http://nginx.org

下载最新版本:

wget http://nginx.org/download/nginx-1.11.3.tar.gz

解压:

tar -zxvf nginx-1.11.3.tar.gz

进入解压目录:

cd nginx-1.11.3

配置:

./configure –prefix=/usr/local/nginx

编辑nginx:

make
注意:这里可能会报错,提示“pcre.h No such file or directory”,具体详见:http://stackoverflow.com/questions/22555561/error-building-fatal-error-pcre-h-no-such-file-or-directory
需要安装 libpcre3-dev,命令为:sudo apt-get install libpcre3-dev

安装nginx:

sudo make install

启动nginx:

sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
注意:-c 指定配置文件的路径,不加的话,nginx会自动加载默认路径的配置文件,可以通过 -h查看帮助命令。

查看nginx进程:

ps -ef|grep nginx
Nginx常用命令

启动 Nginx
/usr/local/nginx/sbin/nginx

./sbin/nginx 
停止 Nginx
./sbin/nginx -s stop

./sbin/nginx -s quit
-s都是采用向 Nginx 发送信号的方式。
Nginx重新加载配置
1
./sbin/nginx -s reload
指定配置文件
./sbin/nginx -c /usr/local/nginx/conf/nginx.conf
-c表示configuration,指定配置文件
查看 Nginx 版本
有两种可以查看 Nginx 的版本信息的参数。第一种如下:
./sbin/nginx -v

nginx: nginx version: nginx/1.0.0
另一种显示的是详细的版本信息:
poechant@ubuntu:/usr/local/nginx ./sbin/nginxVnginx:nginxversion:nginx/1.0.0nginx:builtbygcc4.3.3(Ubuntu4.3.35ubuntu4)nginx:TLSSNIsupportenablednginx:configurearguments:withhttpsslmodulewithopenssl=/home/luming/openssl1.0.0d/poechant@ubuntu:/usr/local/nginx ./sbin/nginx -t
nginx: could not open error log file: open() “/usr/local/nginx/logs/error.log” failed (13: Permission denied)
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
2012/01/09 16:45:09 [emerg] 23898#0: open() “/usr/local/nginx/logs/nginx.pid” failed (13: Permission denied)
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
如果出现如上的提示信息,表示没有访问错误日志文件和进程,可以sudo(super user do)一下:
poerchant@ubuntu:/usr/local/nginx sudo./sbin/nginxtnginx:theconfigurationfile/usr/local/nginx/conf/nginx.confsyntaxisoknginx:configurationfile/usr/local/nginx/conf/nginx.conftestissuccessfulpoechant@ubuntu:/user/local/nginx ./sbin/nginx -h
或者:
poechant@ubuntu:/user/local/nginx$ ./sbin/nginx -?

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/193002.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号