FreeBSD12.2安装Nginx1.18.0

FreeBSD12.2安装Nginx1.18.0

#cd /usr/ports/www/nginx
#make install clean

如果过程出现某些选项,保持默认即可,等着安装完。

使用nginx命令查看nginx版本

root@zFree001:/usr/ports/www/nginx # nginx -v
nginx version: nginx/1.18.0

把Nginx设置为开机启动

#sysrc nginx_enable=yes

上面命令会自动在/etc/rc.conf启动脚本中添加一条

nginx_enable="yes"

启动nginx

root@zFree001:/usr/ports/www/nginx # service nginx start
Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Starting nginx.

从命令反馈信息可以看出,已经正常启动

还可以使用命令查看nginx启动状态

root@zFree001:/usr/ports/www/nginx # service nginx status
nginx is running as pid 16075.

到此nginx就已经安装完成。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容