How to install Nginx in Ubuntu?











up vote
4
down vote

favorite
1












Recently I have installed a LAMP server in my Ubuntu Desktop 12.04 LTS.



Now how can I install Nginx and implement with my present LAMP Server?










share|improve this question




























    up vote
    4
    down vote

    favorite
    1












    Recently I have installed a LAMP server in my Ubuntu Desktop 12.04 LTS.



    Now how can I install Nginx and implement with my present LAMP Server?










    share|improve this question


























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      Recently I have installed a LAMP server in my Ubuntu Desktop 12.04 LTS.



      Now how can I install Nginx and implement with my present LAMP Server?










      share|improve this question















      Recently I have installed a LAMP server in my Ubuntu Desktop 12.04 LTS.



      Now how can I install Nginx and implement with my present LAMP Server?







      software-installation nginx






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 15 '14 at 4:04









      Lucio

      12.3k2183157




      12.3k2183157










      asked Dec 6 '13 at 15:15









      Farukh

      3831410




      3831410






















          4 Answers
          4






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          To install Nginx in your Ubuntu , open your terminal and type as



          sudo -i
          add-apt-repository ppa:nginx/development
          apt-get update
          apt-get install nginx


          that will install nginx in your Ubuntu.






          share|improve this answer




























            up vote
            2
            down vote













            From Nginx Wiki:



            Open a terminal and enter the commands (remember to replace the values!):



            sudo -s
            nginx=stable # use nginx=development for latest development version
            ubuntu=trusty # Replace this with your ubuntu version!
            echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu $ubuntu main" > /etc/apt/sources.list.d/nginx-$nginx-$ubuntu.list
            apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
            apt-get update
            apt-get install nginx





            share|improve this answer




























              up vote
              0
              down vote













              Login as Root User and type command:



              Command: (apt-get update && apt-get install nginx;)



              This command will install default version of nginx that comes with ubuntu software repository with latest updates.






              share|improve this answer










              New contributor




              Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.


















              • Hello and welcome to AU. Please edit our question in order to eliminate the need to login as root. Use sudo instead. You may also consider to add for which version of Ubuntu your answer is valid.
                – Marc Vanhoomissen
                Nov 29 at 13:11


















              up vote
              -1
              down vote













              To install stable Nginx Open terminal and run the following commands:::



              sudo su
              sudo add-apt-repository ppa:nginx/stable
              sudo apt-get update
              sudo apt-get install nginx





              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "89"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f387101%2fhow-to-install-nginx-in-ubuntu%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                1
                down vote



                accepted










                To install Nginx in your Ubuntu , open your terminal and type as



                sudo -i
                add-apt-repository ppa:nginx/development
                apt-get update
                apt-get install nginx


                that will install nginx in your Ubuntu.






                share|improve this answer

























                  up vote
                  1
                  down vote



                  accepted










                  To install Nginx in your Ubuntu , open your terminal and type as



                  sudo -i
                  add-apt-repository ppa:nginx/development
                  apt-get update
                  apt-get install nginx


                  that will install nginx in your Ubuntu.






                  share|improve this answer























                    up vote
                    1
                    down vote



                    accepted







                    up vote
                    1
                    down vote



                    accepted






                    To install Nginx in your Ubuntu , open your terminal and type as



                    sudo -i
                    add-apt-repository ppa:nginx/development
                    apt-get update
                    apt-get install nginx


                    that will install nginx in your Ubuntu.






                    share|improve this answer












                    To install Nginx in your Ubuntu , open your terminal and type as



                    sudo -i
                    add-apt-repository ppa:nginx/development
                    apt-get update
                    apt-get install nginx


                    that will install nginx in your Ubuntu.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 6 '13 at 16:58









                    rɑːdʒɑ

                    56.4k84216301




                    56.4k84216301
























                        up vote
                        2
                        down vote













                        From Nginx Wiki:



                        Open a terminal and enter the commands (remember to replace the values!):



                        sudo -s
                        nginx=stable # use nginx=development for latest development version
                        ubuntu=trusty # Replace this with your ubuntu version!
                        echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu $ubuntu main" > /etc/apt/sources.list.d/nginx-$nginx-$ubuntu.list
                        apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
                        apt-get update
                        apt-get install nginx





                        share|improve this answer

























                          up vote
                          2
                          down vote













                          From Nginx Wiki:



                          Open a terminal and enter the commands (remember to replace the values!):



                          sudo -s
                          nginx=stable # use nginx=development for latest development version
                          ubuntu=trusty # Replace this with your ubuntu version!
                          echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu $ubuntu main" > /etc/apt/sources.list.d/nginx-$nginx-$ubuntu.list
                          apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
                          apt-get update
                          apt-get install nginx





                          share|improve this answer























                            up vote
                            2
                            down vote










                            up vote
                            2
                            down vote









                            From Nginx Wiki:



                            Open a terminal and enter the commands (remember to replace the values!):



                            sudo -s
                            nginx=stable # use nginx=development for latest development version
                            ubuntu=trusty # Replace this with your ubuntu version!
                            echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu $ubuntu main" > /etc/apt/sources.list.d/nginx-$nginx-$ubuntu.list
                            apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
                            apt-get update
                            apt-get install nginx





                            share|improve this answer












                            From Nginx Wiki:



                            Open a terminal and enter the commands (remember to replace the values!):



                            sudo -s
                            nginx=stable # use nginx=development for latest development version
                            ubuntu=trusty # Replace this with your ubuntu version!
                            echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu $ubuntu main" > /etc/apt/sources.list.d/nginx-$nginx-$ubuntu.list
                            apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
                            apt-get update
                            apt-get install nginx






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered May 15 '14 at 4:09









                            Lucio

                            12.3k2183157




                            12.3k2183157






















                                up vote
                                0
                                down vote













                                Login as Root User and type command:



                                Command: (apt-get update && apt-get install nginx;)



                                This command will install default version of nginx that comes with ubuntu software repository with latest updates.






                                share|improve this answer










                                New contributor




                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.


















                                • Hello and welcome to AU. Please edit our question in order to eliminate the need to login as root. Use sudo instead. You may also consider to add for which version of Ubuntu your answer is valid.
                                  – Marc Vanhoomissen
                                  Nov 29 at 13:11















                                up vote
                                0
                                down vote













                                Login as Root User and type command:



                                Command: (apt-get update && apt-get install nginx;)



                                This command will install default version of nginx that comes with ubuntu software repository with latest updates.






                                share|improve this answer










                                New contributor




                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.


















                                • Hello and welcome to AU. Please edit our question in order to eliminate the need to login as root. Use sudo instead. You may also consider to add for which version of Ubuntu your answer is valid.
                                  – Marc Vanhoomissen
                                  Nov 29 at 13:11













                                up vote
                                0
                                down vote










                                up vote
                                0
                                down vote









                                Login as Root User and type command:



                                Command: (apt-get update && apt-get install nginx;)



                                This command will install default version of nginx that comes with ubuntu software repository with latest updates.






                                share|improve this answer










                                New contributor




                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.









                                Login as Root User and type command:



                                Command: (apt-get update && apt-get install nginx;)



                                This command will install default version of nginx that comes with ubuntu software repository with latest updates.







                                share|improve this answer










                                New contributor




                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.









                                share|improve this answer



                                share|improve this answer








                                edited Nov 30 at 13:48





















                                New contributor




                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.









                                answered Nov 29 at 12:48









                                Faraz Hashmi

                                14




                                14




                                New contributor




                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.





                                New contributor





                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.






                                Faraz Hashmi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.












                                • Hello and welcome to AU. Please edit our question in order to eliminate the need to login as root. Use sudo instead. You may also consider to add for which version of Ubuntu your answer is valid.
                                  – Marc Vanhoomissen
                                  Nov 29 at 13:11


















                                • Hello and welcome to AU. Please edit our question in order to eliminate the need to login as root. Use sudo instead. You may also consider to add for which version of Ubuntu your answer is valid.
                                  – Marc Vanhoomissen
                                  Nov 29 at 13:11
















                                Hello and welcome to AU. Please edit our question in order to eliminate the need to login as root. Use sudo instead. You may also consider to add for which version of Ubuntu your answer is valid.
                                – Marc Vanhoomissen
                                Nov 29 at 13:11




                                Hello and welcome to AU. Please edit our question in order to eliminate the need to login as root. Use sudo instead. You may also consider to add for which version of Ubuntu your answer is valid.
                                – Marc Vanhoomissen
                                Nov 29 at 13:11










                                up vote
                                -1
                                down vote













                                To install stable Nginx Open terminal and run the following commands:::



                                sudo su
                                sudo add-apt-repository ppa:nginx/stable
                                sudo apt-get update
                                sudo apt-get install nginx





                                share|improve this answer



























                                  up vote
                                  -1
                                  down vote













                                  To install stable Nginx Open terminal and run the following commands:::



                                  sudo su
                                  sudo add-apt-repository ppa:nginx/stable
                                  sudo apt-get update
                                  sudo apt-get install nginx





                                  share|improve this answer

























                                    up vote
                                    -1
                                    down vote










                                    up vote
                                    -1
                                    down vote









                                    To install stable Nginx Open terminal and run the following commands:::



                                    sudo su
                                    sudo add-apt-repository ppa:nginx/stable
                                    sudo apt-get update
                                    sudo apt-get install nginx





                                    share|improve this answer














                                    To install stable Nginx Open terminal and run the following commands:::



                                    sudo su
                                    sudo add-apt-repository ppa:nginx/stable
                                    sudo apt-get update
                                    sudo apt-get install nginx






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Oct 15 '15 at 15:25

























                                    answered Oct 6 '15 at 2:43









                                    Ravan

                                    5,581154375




                                    5,581154375






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Ask Ubuntu!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f387101%2fhow-to-install-nginx-in-ubuntu%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        How did Captain America manage to do this?

                                        迪纳利

                                        南乌拉尔铁路局