1.首先查看linux系统

cat /proc/version
Linux version 4.9.59-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1047 SMP Sun Oct 29 12:19:23 GMT 2017
# 这表示Ubantu系统

2.装nginx

sudo apt-get install nginx

过程会让选一个Y同意占用内存。

3.如果出现无法定位nginx包,进行如下操作:

sudo apt-get update

4.更新完成之后,安装nginx

sudo apt-get install nginx

5.Ubuntu安装之后的文件结构大致为:

1)所有的配置文件都在/etc/nginx下,并且每个虚拟主机已经安排在了/etc/nginx/sites-available下

2)程序文件在/usr/sbin/nginx

3)日志放在了/var/log/nginx中

4)并已经在/etc/init.d/下创建了启动脚本nginx

5)默认的虚拟主机的目录设置在了/var/www/nginx-default (有的版本默认的虚拟主机的目录设置在了/var/www, 请参考/etc/nginx/sites-available里的配置)

参考http://wiki.ubuntu.org.cn/Nginx

Ubuntu系统安装nginx的更多相关文章

  1. ubuntu系统安装nginx出现的错误(依赖环境没有安装完)

    报错信息: error: the HTTP image filter module requires the GD library. 编译参数:(或源安装) ./configure --prefix= ...

  2. Ubuntu/deppin 系统安装Nginx

    Ubuntu/deppin 系统安装Nginx 添加密钥 打开Nginx官网 ,并找到如下位置: 在桌面新建"nginx_signing.key"文件,文件内容为请点击图1中的标注 ...

  3. ubuntu系统安装初始化脚本

    ubuntu系统安装初始化脚本 经常安装卸载ubuntu,每次系统安装完成后要安装好多软件,一个个命令输很麻烦浪费时间,一个sh文件全搞定! 1. flashplayer下载:点击这里 2. Auda ...

  4. virtualbox搭建ubuntu server nginx+mysql+tomcat web服务器1 (未完待续)

    virtualbox搭建ubuntu server nginx+mysql+tomcat web服务器1 (未完待续) 第一次接触到 linux,不知道linux的确很强大,然后用virtualbox ...

  5. ubuntu系统安装软件方法

    ubuntu系统安装软件方法 ubuntu下安装软件有三种方式,分别为在线安装apt-get方式,软件商店安装方式和 1. 软件商店安装方式 这种方式对经常使用windows系统的同学来说最为简单,因 ...

  6. ubuntu下nginx+php5的部署

    ubuntu下nginx+php5环境的部署和centos系统下的部署稍有不同,废话不多说,以下为操作记录:1)nginx安装root@ubuntutest01-KVM:~# sudo apt-get ...

  7. ubuntu 重启 nginx 失败,* Restarting nginx nginx ...fail!

    ubuntu 重启 nginx 失败,* Restarting nginx nginx ...fail!       执行 nginx 重启服务时,提示失败如下: $ sudo service ngi ...

  8. ubuntu server nginx 安装与配置

    ubuntu server nginx 安装与配置 一:关于nginx http://wiki.ubuntu.org.cn/Nginx http://nginx.org/cn http://wiki. ...

  9. Ubuntu系统安装配置Pintos和Bochs

    Ubuntu系统安装配置 Pintos 和 Bochs 安装过程 首先是UEFI启动模式下Win8.1安装Ubuntu14.04双系统,由于篇幅过长,就不在这里详写.可见博主的另一篇博客http:// ...

随机推荐

  1. SDN中的Heavy-Hitter测量文献阅读

    Heavy Hitter Detection and Identification in Software Defined Networking 来源:International Conference ...

  2. js扩展运算符(spread)三个点(...)

    常见用法: 1.该运算符主要用于函数调用. function push(array, ...items) { array.push(...items); } function add(x, y) { ...

  3. 如何将Powerdesign物理模型中的name复制成comment

    Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl ' the current model ' get t ...

  4. git关联远程仓库

    git init git add . git commit -m "0.0.1 release" git remote -v git remote add master repos ...

  5. 关于jmeter命令行执行.jmx文件出现Error in NonGUIDriver java.lang.RuntimeException: Could not find the TestPlan c

     

  6. 微信小程序登录逻辑

    wx.getStorage({ key: 'session_id', success: function(res) { //如果本地缓存中有session_id,则说明用户登陆过 console.lo ...

  7. Tomcat参数设置,解决内存溢出问题

    Tomcat默认参数不适合生产环境使用,因此需要修改一些参数 1.修改启动时内存参数.并指定JVM时区 (在Windows Server 2008 下时间少了8个小时): 在Tomcat上运行j2ee ...

  8. 为RecyclerView打造通用Adapter

    ##RecycleView简单介绍 RecyclerView控件和ListView的原理有非常多相似的地方,都是维护少量的View来进行显示大量的数据.只是RecyclerView控件比ListVie ...

  9. 在netty3.x中存在两种线程:boss线程和worker线程。

    在netty 3.x 中存在两种线程:boss线程和worker线程.

  10. NOIP2011普及组 数字反转

    题目OJ链接: http://codevs.cn/problem/1130/ https://www.luogu.org/problemnew/show/P1307 2011年NOIP全国联赛普及组 ...