从华为云镜像站下载nginx源码,并编译安装nginx.
[root@openEuler ~]# wget https://repo.huaweicloud.com/nginx/nginx-1.9.9.tar.gz
解压与编译
tar -zxvf nginx-1.9.9.tar.gz
cd nginx-1.9.9
./configure
make
make install
进入安装目录
[root@openEuler nginx-1.9.9]# cd /usr/local/nginx/sbin/
启动nginx
[root@openEuler sbin]# nginx
测试是否安装成功,访问网页
[root@openEuler sbin]# curl http://127.0.0.1
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Furthe