Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install pcre and openssl in Nginx under Linux

2025-03-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Today, the editor will share with you the relevant knowledge points about how to install pcre and openssl in Nginx under Linux. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

1. Install the pcre library (pcre regular expression syntax is used in nginx's rewrite module and http core module)

Regardless of whether it is installed or not, go directly to the command:

Use yum to install:

[root@example.com ~] # yum install pcre pcre-devel

Or use apt-get:

[root@example.com ~] # apt-get install libpcre3 libpcre3-dev

If these installation packages are already installed on the system, you will receive a message from nothing to do, which means it has been installed.

two。 Install openssl (if the server provides a secure web page (when https://), the openssl library is used)

Use yum:

[root@localhost example] # yum install openssl openssl-devel

Or use apt-get:

[root@localhost example] # apt-get install openssl openssl-dev

3. Download and decompress nginx

Download the version you want to use, put it in the home directory, and unzip it

[root@localhost example] # tar zxf nginx-0.7.66.tar.gz

4. Install nginx

Creating an application is usually divided into three steps: from source code to configuration, compilation, and installation compilation. There are many configuration items for each step, but for beginners, we just make it run, and we can ignore these configuration items first. The easiest way is to execute the following three commands in turn:

[root@localhost nginx-0.7.66] #. / configure / / there is an important configuration item-- prefix=... Specify the base directory where nginx is installed, for example, if you want to install it under / home/jiang/www/, the complete command should be: [root@localhost nginx-0.7.66] #. / configure-- prefix=/home/jiang/www

Several errors that may occur in the configure process, and the reasons:

1). / configure: error: c compiler gcc is not found reason: you did not install gcc, so you may not have installed the following packages, please install them together

Yum install gcc gcc-c++ autoconf make

2) makefile: insufficient permissions reason: the current user does not have the permission to read and write the nginx source code directory. Please switch to root and run the following command to set all file owners of the current directory to ordinary users we are using.

[jiang@localhost nginx-0.7.66] # chown-r jiang:jiang. / [jiang@localhost nginx-0.7.66] # exit

Then exit exits to the normal user state. The feng:feng after chown is the user name and user group name of the ordinary account used.

[root@localhost nginx-0.7.66] # make [root@localhost nginx-0.7.66] # make install

Now that the installation is successful, go and install sbin/, under the basic directory of nginx. Note that my directory here is / home/jiang/www/sbin, execute the command:

[root@localhost sbin] # / nginx / / the effect is shown in the following figure

There is no text message on the screen, which is a good sign that it is running correctly.

Open the browser and enter localhost,done done done done ~ ~

These are all the contents of the article "how to install pcre and openssl in Nginx under Linux". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report