安装Nginx(一)
安装命令
yum install -y nginx
等待安装
等待安装后执行
yum install -y nginx
查询进程
ps -ef | grep nginx
启动
nginx
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx -c /usr/local/nginx/conf/nginx.conf
安装Nginx(二)
1、更新yum
yum update -y
2、安装epel-release源
yum install -y epel-release
等待
3、安装nginx
4、解压
tar -zxvf zlib-1.2.11.tar.gz
5、进入
cd nginx-1.16.1
6、编译
./configure
make
make install
这一步如果报错
make: *** No rule to make target build', needed by
default'. Stop.
7、解决办法
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel nss_ldap openldap openldap-devel openldap-clients openldap-servers libxslt-devel libevent-devel ntp libtool-ltdl bison libtool vim-enhanced
8、阿里云开启安全组
开启80端口 访问