Linux_Nginx 安装笔记
来源:互联网 发布:免费的看书软件 编辑:程序博客网 时间:2024/05/29 07:38
环境:Vmware Workstation 10,CentOS-7-x86_64-DVD-1511.iso,Xshell 4.0,ip:192.168.216.140
[root@localhost ~]# yum list nginx* #yum查看nginx安装信息
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
错误:没有匹配的软件包可以列出
[root@localhost ~]# yum list pcre pcre-devel zlib zlib-devel openssl openssl-devel
已安装的软件包
openssl.x86_64 1:1.0.1e-42.el7.9 @anaconda
pcre.x86_64 8.32-15.el7 @anaconda
zlib.x86_64 1.2.7-15.el7 @anaconda
可安装的软件包
openssl.x86_64 1:1.0.1e-60.el7_3.1 updates
openssl-devel.i686 1:1.0.1e-60.el7_3.1 updates
openssl-devel.x86_64 1:1.0.1e-60.el7_3.1 updates
pcre.i686 8.32-15.el7_2.1 base
pcre.x86_64 8.32-15.el7_2.1 base
pcre-devel.i686 8.32-15.el7_2.1 base
pcre-devel.x86_64 8.32-15.el7_2.1 base
zlib.i686 1.2.7-17.el7 base
zlib.x86_64 1.2.7-17.el7 base
zlib-devel.i686 1.2.7-17.el7 base
zlib-devel.x86_64 1.2.7-17.el7 base
[root@localhost ~]# yum install pcre pcre-devel zlib zlib-devel openssl openssl-devel #yum安装nginx所需依赖
[root@localhost ~]# rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm #rpm安装nginx yum repo源
[root@localhost ~]# yum list nginx #yum 再次查看nginx安装信息
已加载插件:fastestmirror
nginx | 2.9 kB 00:00:00
nginx/x86_64/primary_db | 24 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
可安装的软件包
nginx.x86_64 1:1.12.0-1.el7.ngx nginx
[root@localhost ~]# yum install nginx #yum安装nginx
[root@localhost ~]# service nginx start #启动nginx
Redirecting to /bin/systemctl start nginx.service
[root@localhost ~]# ps -ef | grep nginx #ps命令查看nginx进程
root 15531 1 0 11:27 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 15532 15531 0 11:27 ? 00:00:00 nginx: worker process
root 15867 2681 0 11:31 pts/0 00:00:00 grep –color=auto nginx
[root@localhost ~]# service nginx status #service查看nginx运行状态
Redirecting to /bin/systemctl status nginx.service
● nginx.service - nginx - high performance web server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: active (running) since 三 2017-05-24 11:27:55 CST; 3min 47s ago
注意:下面两条命令“–”是两个“-”,csdn显示有误。
[root@localhost ~]# firewall-cmd –zone=public –add-port=80/tcp –permanent #防火墙永久开放80端口号
success
[root@localhost ~]# firewall-cmd –reload #重启防火墙是新开放的端口号生效
success
http://192.168.216.140/ #网页访问
- Linux_Nginx 安装笔记
- Linux_Nginx安装教程
- Linux_nginx安装配置(二)
- Linux_nginx安装配置负载均衡_tomcat
- Linux_nginx简介及配置安装(一)
- Linux_nginx配置seesion共享
- Linux_nginx和mysql应用状态分析
- 安装笔记
- (笔记) Openssl 成功安装笔记。
- mysql安装笔记
- pvpgn安装笔记
- openwebmail安装笔记
- Bugzilla 的安装笔记
- E17安装笔记
- MySQL笔记:MySQL安装
- Apache安装笔记(转贴)
- Nutch 安装使用笔记
- gentoo安装文档 笔记
- 关于sql语句的一些整理(下)
- 1045. 快速排序(25)
- C++----局部静态对象和函数
- (95)宏库UI
- 软件架构模板
- Linux_Nginx 安装笔记
- curl 调用接口报错 Protocol http not supported or disabled in libcurl
- android中如何实现进入一个界面不做任何动作过10秒钟(有操作从新计时)自动跳转到待机activity,点击待机界面回到原来的界面
- 龙芯推出新一代处理器 离Intel还有多大差距
- 40个Java多线程问题总结
- IOS 设备信息和系统信息获取大全
- Android ADB工具-管理设备 app(二)
- C++ 获取所有USB设备 列举所有USB设备 列举所有USB HUB
- JS中URL中的特殊字符问题:escape,encodeURI,encodeURIComponent(转)