1、安装make

yum -y install gcc automake autoconf libtool make

2、安装g++

yum install gcc gcc-c++

3、选择安装目录

一般为/usr/local/src

4、安装PCRE

cd /usr/local/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz 
tar -zxvf pcre-8.37.tar.gz
cd pcre-8.34
./configure
make
make install

5、安装zlib库

 cd /usr/local/src

wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
make install

6、安装openssl

cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz
tar -zxvf openssl-1.0.1t.tar.gz

7、安装nginx

cd /usr/local/src
wget http://nginx.org/download/nginx-1.1.10.tar.gz
tar -zxvf nginx-1.1.10.tar.gz
cd nginx-1.1.10
./configure
make
make install

8、启动nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

/重启
 cd /usr/local/nginx/sbin
 ./nginx -s reload

9、这时候通过浏览器访问阿里云公网ip是打不开的

10、登录阿里云服务器官网

阿里云搭建nginx以及web服务启动

阿里云搭建nginx以及web服务启动

阿里云搭建nginx以及web服务启动

点击确认。

在访问公网ip则显示nginx服务启动成功

 

相关文章:

  • 2021-12-14
  • 2021-11-07
  • 2021-04-04
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
猜你喜欢
  • 2021-11-24
  • 2021-11-20
  • 2021-07-05
  • 2022-02-08
  • 2022-02-08
  • 2021-04-21
相关资源
相似解决方案