• home > tools > webServer > nginx >

    linux上最方便安装nginx的方式

    Author:[email protected] Date:

    nginx 安装,yum nginx尼玛,没有package……linux 居然没有集成 nginx啊… 啊……然后,自己安装,尼玛还要编辑……百度,谷歌,看了

    nginx 安装,

    yum nginx 

    尼玛,没有package……

    linux 居然没有集成 nginx啊… 啊……

    然后,自己安装,尼玛还要编辑……

    百度,谷歌,看了一遍……

    然后,终于找到,比较简便的……

    尼玛,我不是运维人员,安装上,能用就好……

    总结起来——只需两行命令:

    yum install epel-release

     yum install nginx


    nginx is a high performance web server software. It is a much more flexible and lightweight program than apache.

    Set Up

    The steps in this tutorial require the user to have root privileges. You can see how to set that up in theCentOS Initial Server Setup Tutorial in steps 3 and 4.

    Step One—Install EPEL

    EPEL stands for Extra Packages for Enterprise Linux. Because yum as a package manager does not include the latest version of nginx in its default repository, installing EPEL will make sure that nginx on CentOS stays up to date.

    To install EPEL, open terminal and type in:

    sudo yum install epel-release

    Step Two—Install nginx

    To install nginx, open terminal and type in:

    sudo yum install nginx

    After you answer yes to the prompt twice (the first time relates to importing the EPEL gpg-key), nginx will finish installing on your virtual private server.

    Step Three—Start nginx

    nginx does not start on its own. To get nginx running, type:

    sudo /etc/init.d/nginx start

    You can confirm that nginx has installed on your VPS by directing your browser to your IP address.

    You can run the following command to reveal your server’s IP address.

    ifconfig eth0 | grep inet | awk '{ print $2 }'

    On the page, you will see the words, “Welcome to nginx”

    Congratulations! You have now installed nginx.

    See More

    Once you have nginx installed on your cloud server, you can go on to install the Lemp Stack or Set Up a FTP Server



    转载本站文章《linux上最方便安装nginx的方式》,
    请注明出处:https://www.zhoulujun.cn/html/tools/webServer/nginx/2016_0825_7889.html