In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Nginx ("engine x") is a high-performance HTTP and reverse proxy server, as well as an IMAP/POP3/SMTP proxy server.
To install Nginx as a WEB server under Linux, you must first prepare some necessary libraries and tools, usually you must install PERC library and Openssl.
Take four steps to get your Nginx running fast!
1. Install PCRE library (PCRE regular expression syntax is used by Nginx rewrite module and HTTP core module)
Regardless of whether it has been installed, directly on the command:
Use yum to install:
[root@example.com ~]# yum install pcre pcre-devel
or apt-get:
[root@example.com ~]# apt-get install libpcre3 libpcre3-dev
If these packages are already installed on your system, you will receive a Nothing to do message, meaning installed.
2. Install OpenSSL (OpenSSL library will be used if the server provides secure web pages (https://))
Use yum:
[root@localhost example]# yum install openssl openssl-devel
or apt-get:
[root@localhost example]# apt-get install openssl openssl-dev
3. Download, unzip Nginx
Go to http://nginx.org/and download the version you want to use, put it in your 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. Each step has a lot of configuration items, but for beginners, we just let it run, you can ignore these configuration items first. The easiest way is to execute the following three commands in sequence:
[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 at/home/jiang/www/, the complete command should be: [root@localhost nginx-0.7.66]# ./ configure --prefix=/home/jiang/www
There are several errors that may occur during the configure process, and the reasons:
1) ./ configure: error: C compiler gcc is not found Reason: You do not have gcc installed, 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 permission to read and write the nginx source directory. Please switch to root and run the following command. The effect is to set all file owners in the current directory as ordinary users we are using.
[jiang@localhost nginx-0.7.66]# chown -R jiang:jiang ./ [jiang@localhost nginx-0.7.66]# exit
Then exit to normal user status. The feng:feng after chown is the username of the ordinary account used, and its user group name respectively.
[root@localhost nginx-0.7.66]# make[root@localhost nginx-0.7.66]# make install
So far, the installation is successful. Go to sbin/under the basic directory of Nginx. Note that the directory I have here is/home/jiang/www/sbin. Execute the command:
[root@localhost sbin]# ./ nginx //See below for effect
No text messages appear on the screen, which is a good sign that it is working correctly.
Open the browser and type localhost, done ~~~
The above is all the content of this article, I hope to help everyone's study, but also hope that everyone a lot of support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.