CentOS6.5 install Openresty

Source: Internet
Author: User

CentOS6.5 install Openresty

The first step to Learning Open-source software is to go to the official website and check the installation guide and demo (examples ). For openresty, the official website provides detailed installation instructions:Http://openresty.org/en/installation.html

Let's start TIY.

1. Install Dependencies

Openresty depends on perl 5.6.1 +, libreadline, libpcre, libssl

Centos is a clone of Red Hat. Therefore, follow the steps of the RedHat user.


To avoid manual input during installation, add the-y option to the yum command.

Run 'sudoyum-y install readline-devel pcre-devel openssl-devel gcc'

If the installation is successful, you will see the completed


2. Install openresty

2.1 Download openresty of a release version


I did not use the latest version, but chose 1.9.7.3.


2.2 decompress the file

Run the 'tar-zxvf openresty-1.9.7.3.tar.gz'


2.3 run './configure' to generate several files, including an important configuration file Makefile


2.4 run 'make' to execute the first compilation rule in Makefile. If you are familiar with ant in java (basically corresponding to ant target), then you can easily do something, let's take a look at the Makefile content.


2.5 After compilation, run 'make install'


If everything goes well, openresty will be installed.

The installation may fail and a permission error is prompted. This is because openresty is installed in the/usr/local/openresty/directory by default and requires the root permission, run 'sudo make install' again to complete the installation.


2.6 start nginx


Okay. So far, we have successfully installed Openresty, and the rest is to configure and use it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.