Bạn có thể theo chỉ dẫn dưới đây để cài Nginx trên CentOS.
Cá nhân tôi theo hướng dẫn trên trang Nginx như sau.
Tạo mới file nginx.repo /etc/yum.repos.d/nginx.repo
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
sau đó gõ lệnh yum search nginx. Nếu tìm thấy thì cài đặt nginx yum install nginx
Hoặc thử theo cách của Digital Ocean
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Phần còn lại của cài đặt thì theo đúng hướng dẫn này. Đừng quên động tác mở Firewall ở port mà web site sẽ hứng
vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
Bình luận