Paso 1: agregar repositorio de Nginx
1 | sudo yum install epel-release |
Resultado:
1 2 3 4 5 6 7 8 9 10 | [root@tutorialspots ~]# sudo yum install epel-release CentOS-8 - AppStream 21 MB/s | 5.8 MB 00:00 CentOS-8 - Base 14 MB/s | 2.2 MB 00:00 CentOS-8 - Extras 73 kB/s | 6.7 kB 00:00 Extra Packages for Enterprise Linux Modular 8 - 310 kB/s | 154 kB 00:00 Extra Packages for Enterprise Linux 8 - x86_64 12 MB/s | 7.2 MB 00:00 Package epel-release-8-8.el8.noarch is already installed. Dependencies resolved. Nothing to do. Complete! |
Paso 2: instala Nginx
1 | sudo yum install nginx |
Resultado:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 dieciséis 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 sesenta y cinco 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | [root@tutorialspots ~]# sudo yum install nginx Last metadata expiration check: 0:01:04 ago on Wed 08 Jul 2020 06:13:04 AM CEST. Dependencies resolved. ================================================================================ Package Arch Version Repo Size ================================================================================ Installing: nginx x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 570 k Installing dependencies: dejavu-fonts-common noarch 2.35-6.el8 BaseOS 74 k dejavu-sans-fonts noarch 2.35-6.el8 BaseOS 1.5 M fontconfig x86_64 2.13.1-3.el8 BaseOS 275 k fontpackages-filesystem noarch 1.44-22.el8 BaseOS 16 k gd x86_64 2.2.5-6.el8 AppStream 144 k jbigkit-libs x86_64 2.1-14.el8 AppStream 55 k libX11 x86_64 1.6.8-3.el8 AppStream 611 k libX11-common noarch 1.6.8-3.el8 AppStream 158 k libXau x86_64 1.0.8-13.el8 AppStream 36 k libXpm x86_64 3.5.12-8.el8 AppStream 58 k libjpeg-turbo x86_64 1.5.3-10.el8 AppStream 156 k libtiff x86_64 4.0.9-17.el8 AppStream 188 k libwebp x86_64 1.0.0-1.el8 AppStream 273 k libxcb x86_64 1.13.1-1.el8 AppStream 229 k libxslt x86_64 1.1.32-4.el8 BaseOS 249 k nginx-all-modules noarch 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 23 k nginx-filesystem noarch 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 24 k nginx-mod-http-image-filter x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 35 k nginx-mod-http-perl x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 45 k nginx-mod-http-xslt-filter x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 33 k nginx-mod-mail x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 64 k nginx-mod-stream x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82 AppStream 85 k perl-Carp noarch 1.42-396.el8 BaseOS 30 k perl-Errno x86_64 1.28-416.el8 BaseOS 76 k perl-Exporter noarch 5.72-396.el8 BaseOS 34 k perl-File-Path noarch 2.15-2.el8 BaseOS 38 k perl-IO x86_64 1.38-416.el8 BaseOS 141 k perl-PathTools x86_64 3.74-1.el8 BaseOS 90 k perl-Scalar-List-Utils x86_64 3:1.49-2.el8 BaseOS 68 k perl-Socket x86_64 4:2.027-3.el8 BaseOS 59 k perl-Text-Tabs+Wrap noarch 2013.0523-395.el8 BaseOS 24 k perl-Unicode-Normalize x86_64 1.25-396.el8 BaseOS 82 k perl-constant noarch 1.33-396.el8 BaseOS 25 k perl-interpreter x86_64 4:5.26.3-416.el8 BaseOS 6.3 M perl-libs x86_64 4:5.26.3-416.el8 BaseOS 1.6 M perl-macros x86_64 4:5.26.3-416.el8 BaseOS 72 k perl-parent noarch 1:0.237-1.el8 BaseOS 20 k perl-threads x86_64 1:2.21-2.el8 BaseOS 61 k perl-threads-shared x86_64 1.58-2.el8 BaseOS 48 k Enabling module streams: nginx 1.14 Transaction Summary ================================================================================ Install 40 Packages Total download size: 14 M Installed size: 36 M Is this ok [y/N]: y Downloading Packages: (1/40): jbigkit-libs-2.1-14.el8.x86_64.rpm 884 kB/s | 55 kB 00:00 (2/40): gd-2.2.5-6.el8.x86_64.rpm 1.8 MB/s | 144 kB 00:00 (3/40): libXau-1.0.8-13.el8.x86_64.rpm 2.2 MB/s | 36 kB 00:00 (4/40): libX11-common-1.6.8-3.el8.noarch.rpm 4.7 MB/s | 158 kB 00:00 (5/40): libX11-1.6.8-3.el8.x86_64.rpm 5.4 MB/s | 611 kB 00:00 (6/40): libXpm-3.5.12-8.el8.x86_64.rpm 3.2 MB/s | 58 kB 00:00 (7/40): libjpeg-turbo-1.5.3-10.el8.x86_64.rpm 8.5 MB/s | 156 kB 00:00 (8/40): libtiff-4.0.9-17.el8.x86_64.rpm 10 MB/s | 188 kB 00:00 (9/40): libxcb-1.13.1-1.el8.x86_64.rpm 12 MB/s | 229 kB 00:00 (10/40): libwebp-1.0.0-1.el8.x86_64.rpm 7.8 MB/s | 273 kB 00:00 (11/40): nginx-all-modules-1.14.1-9.module_el8. 1.4 MB/s | 23 kB 00:00 (12/40): nginx-1.14.1-9.module_el8.0.0+184+e34f 14 MB/s | 570 kB 00:00 (13/40): nginx-filesystem-1.14.1-9.module_el8.0 1.0 MB/s | 24 kB 00:00 (14/40): nginx-mod-http-perl-1.14.1-9.module_el 2.7 MB/s | 45 kB 00:00 (15/40): nginx-mod-http-image-filter-1.14.1-9.m 923 kB/s | 35 kB 00:00 (16/40): nginx-mod-http-xslt-filter-1.14.1-9.mo 1.2 MB/s | 33 kB 00:00 (17/40): nginx-mod-stream-1.14.1-9.module_el8.0 1.8 MB/s | 85 kB 00:00 (18/40): dejavu-fonts-common-2.35-6.el8.noarch. 1.2 MB/s | 74 kB 00:00 (19/40): nginx-mod-mail-1.14.1-9.module_el8.0.0 876 kB/s | 64 kB 00:00 (20/40): fontpackages-filesystem-1.44-22.el8.no 247 kB/s | 16 kB 00:00 (21/40): fontconfig-2.13.1-3.el8.x86_64.rpm 3.8 MB/s | 275 kB 00:00 (22/40): perl-Carp-1.42-396.el8.noarch.rpm 2.5 MB/s | 30 kB 00:00 (23/40): perl-Errno-1.28-416.el8.x86_64.rpm 5.5 MB/s | 76 kB 00:00 (24/40): perl-Exporter-5.72-396.el8.noarch.rpm 2.5 MB/s | 34 kB 00:00 (25/40): dejavu-sans-fonts-2.35-6.el8.noarch.rp 10 MB/s | 1.5 MB 00:00 (26/40): perl-File-Path-2.15-2.el8.noarch.rpm 2.8 MB/s | 38 kB 00:00 (27/40): libxslt-1.1.32-4.el8.x86_64.rpm 4.1 MB/s | 249 kB 00:00 (28/40): perl-IO-1.38-416.el8.x86_64.rpm 10 MB/s | 141 kB 00:00 (29/40): perl-PathTools-3.74-1.el8.x86_64.rpm 6.3 MB/s | 90 kB 00:00 (30/40): perl-Scalar-List-Utils-1.49-2.el8.x86_ 5.3 MB/s | 68 kB 00:00 (31/40): perl-Socket-2.027-3.el8.x86_64.rpm 4.6 MB/s | 59 kB 00:00 (32/40): perl-Text-Tabs+Wrap-2013.0523-395.el8. 2.0 MB/s | 24 kB 00:00 (33/40): perl-Unicode-Normalize-1.25-396.el8.x8 6.3 MB/s | 82 kB 00:00 (34/40): perl-constant-1.33-396.el8.noarch.rpm 2.1 MB/s | 25 kB 00:00 (35/40): perl-macros-5.26.3-416.el8.x86_64.rpm 5.0 MB/s | 72 kB 00:00 (36/40): perl-parent-0.237-1.el8.noarch.rpm 1.5 MB/s | 20 kB 00:00 (37/40): perl-threads-2.21-2.el8.x86_64.rpm 3.8 MB/s | 61 kB 00:00 (38/40): perl-libs-5.26.3-416.el8.x86_64.rpm 26 MB/s | 1.6 MB 00:00 (39/40): perl-threads-shared-1.58-2.el8.x86_64. 3.7 MB/s | 48 kB 00:00 (40/40): perl-interpreter-5.26.3-416.el8.x86_64 51 MB/s | 6.3 MB 00:00 -------------------------------------------------------------------------------- Total 23 MB/s | 14 MB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : perl-Exporter-5.72-396.el8.noarch 1/40 Installing : perl-libs-4:5.26.3-416.el8.x86_64 2/40 Installing : perl-Carp-1.42-396.el8.noarch 3/40 Installing : perl-Scalar-List-Utils-3:1.49-2.el8.x86_64 4/40 Installing : fontpackages-filesystem-1.44-22.el8.noarch 5/40 Installing : libjpeg-turbo-1.5.3-10.el8.x86_64 6/40 Installing : dejavu-fonts-common-2.35-6.el8.noarch 7/40 Installing : dejavu-sans-fonts-2.35-6.el8.noarch 8/40 Installing : fontconfig-2.13.1-3.el8.x86_64 9/40 Running scriptlet: fontconfig-2.13.1-3.el8.x86_64 9/40 Installing : perl-macros-4:5.26.3-416.el8.x86_64 10/40 Installing : perl-parent-1:0.237-1.el8.noarch 11/40 Installing : perl-Errno-1.28-416.el8.x86_64 12/40 Installing : perl-Socket-4:2.027-3.el8.x86_64 13/40 Installing : perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch 14/40 Installing : perl-Unicode-Normalize-1.25-396.el8.x86_64 15/40 Installing : perl-File-Path-2.15-2.el8.noarch 16/40 Installing : perl-IO-1.38-416.el8.x86_64 17/40 Installing : perl-PathTools-3.74-1.el8.x86_64 18/40 Installing : perl-constant-1.33-396.el8.noarch 19/40 Installing : perl-threads-1:2.21-2.el8.x86_64 20/40 Installing : perl-threads-shared-1.58-2.el8.x86_64 21/40 Installing : perl-interpreter-4:5.26.3-416.el8.x86_64 22/40 Installing : libxslt-1.1.32-4.el8.x86_64 23/40 Running scriptlet: nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34 24/40 Installing : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34 24/40 Installing : libwebp-1.0.0-1.el8.x86_64 25/40 Installing : libXau-1.0.8-13.el8.x86_64 26/40 Installing : libxcb-1.13.1-1.el8.x86_64 27/40 Installing : libX11-common-1.6.8-3.el8.noarch 28/40 Installing : libX11-1.6.8-3.el8.x86_64 29/40 Installing : libXpm-3.5.12-8.el8.x86_64 30/40 Installing : jbigkit-libs-2.1-14.el8.x86_64 31/40 Running scriptlet: jbigkit-libs-2.1-14.el8.x86_64 31/40 Installing : libtiff-4.0.9-17.el8.x86_64 32/40 Installing : gd-2.2.5-6.el8.x86_64 33/40 Running scriptlet: gd-2.2.5-6.el8.x86_64 33/40 Installing : nginx-mod-http-perl-1:1.14.1-9.module_el8.0.0+184+ 34/40 Running scriptlet: nginx-mod-http-perl-1:1.14.1-9.module_el8.0.0+184+ 34/40 Installing : nginx-mod-http-xslt-filter-1:1.14.1-9.module_el8.0 35/40 Running scriptlet: nginx-mod-http-xslt-filter-1:1.14.1-9.module_el8.0 35/40 Installing : nginx-mod-mail-1:1.14.1-9.module_el8.0.0+184+e34fe 36/40 Running scriptlet: nginx-mod-mail-1:1.14.1-9.module_el8.0.0+184+e34fe 36/40 Installing : nginx-mod-stream-1:1.14.1-9.module_el8.0.0+184+e34 37/40 Running scriptlet: nginx-mod-stream-1:1.14.1-9.module_el8.0.0+184+e34 37/40 Installing : nginx-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_6 38/40 Running scriptlet: nginx-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_6 38/40 Installing : nginx-mod-http-image-filter-1:1.14.1-9.module_el8. 39/40 Running scriptlet: nginx-mod-http-image-filter-1:1.14.1-9.module_el8. 39/40 Installing : nginx-all-modules-1:1.14.1-9.module_el8.0.0+184+e3 40/40 Running scriptlet: nginx-all-modules-1:1.14.1-9.module_el8.0.0+184+e3 40/40 Running scriptlet: fontconfig-2.13.1-3.el8.x86_64 40/40 Verifying : gd-2.2.5-6.el8.x86_64 1/40 Verifying : jbigkit-libs-2.1-14.el8.x86_64 2/40 Verifying : libX11-1.6.8-3.el8.x86_64 3/40 Verifying : libX11-common-1.6.8-3.el8.noarch 4/40 Verifying : libXau-1.0.8-13.el8.x86_64 5/40 Verifying : libXpm-3.5.12-8.el8.x86_64 6/40 Verifying : libjpeg-turbo-1.5.3-10.el8.x86_64 7/40 Verifying : libtiff-4.0.9-17.el8.x86_64 8/40 Verifying : libwebp-1.0.0-1.el8.x86_64 9/40 Verifying : libxcb-1.13.1-1.el8.x86_64 10/40 Verifying : nginx-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_6 11/40 Verifying : nginx-all-modules-1:1.14.1-9.module_el8.0.0+184+e3 12/40 Verifying : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34 13/40 Verifying : nginx-mod-http-image-filter-1:1.14.1-9.module_el8. 14/40 Verifying : nginx-mod-http-perl-1:1.14.1-9.module_el8.0.0+184+ 15/40 Verifying : nginx-mod-http-xslt-filter-1:1.14.1-9.module_el8.0 16/40 Verifying : nginx-mod-mail-1:1.14.1-9.module_el8.0.0+184+e34fe 17/40 Verifying : nginx-mod-stream-1:1.14.1-9.module_el8.0.0+184+e34 18/40 Verifying : dejavu-fonts-common-2.35-6.el8.noarch 19/40 Verifying : dejavu-sans-fonts-2.35-6.el8.noarch 20/40 Verifying : fontconfig-2.13.1-3.el8.x86_64 21/40 Verifying : fontpackages-filesystem-1.44-22.el8.noarch 22/40 Verifying : libxslt-1.1.32-4.el8.x86_64 23/40 Verifying : perl-Carp-1.42-396.el8.noarch 24/40 Verifying : perl-Errno-1.28-416.el8.x86_64 25/40 Verifying : perl-Exporter-5.72-396.el8.noarch 26/40 Verifying : perl-File-Path-2.15-2.el8.noarch 27/40 Verifying : perl-IO-1.38-416.el8.x86_64 28/40 Verifying : perl-PathTools-3.74-1.el8.x86_64 29/40 Verifying : perl-Scalar-List-Utils-3:1.49-2.el8.x86_64 30/40 Verifying : perl-Socket-4:2.027-3.el8.x86_64 31/40 Verifying : perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch 32/40 Verifying : perl-Unicode-Normalize-1.25-396.el8.x86_64 33/40 Verifying : perl-constant-1.33-396.el8.noarch 34/40 Verifying : perl-interpreter-4:5.26.3-416.el8.x86_64 35/40 Verifying : perl-libs-4:5.26.3-416.el8.x86_64 36/40 Verifying : perl-macros-4:5.26.3-416.el8.x86_64 37/40 Verifying : perl-parent-1:0.237-1.el8.noarch 38/40 Verifying : perl-threads-1:2.21-2.el8.x86_64 39/40 Verifying : perl-threads-shared-1.58-2.el8.x86_64 40/40 Installed: dejavu-fonts-common-2.35-6.el8.noarch dejavu-sans-fonts-2.35-6.el8.noarch fontconfig-2.13.1-3.el8.x86_64 fontpackages-filesystem-1.44-22.el8.noarch gd-2.2.5-6.el8.x86_64 jbigkit-libs-2.1-14.el8.x86_64 libX11-1.6.8-3.el8.x86_64 libX11-common-1.6.8-3.el8.noarch libXau-1.0.8-13.el8.x86_64 libXpm-3.5.12-8.el8.x86_64 libjpeg-turbo-1.5.3-10.el8.x86_64 libtiff-4.0.9-17.el8.x86_64 libwebp-1.0.0-1.el8.x86_64 libxcb-1.13.1-1.el8.x86_64 libxslt-1.1.32-4.el8.x86_64 nginx-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64 nginx-all-modules-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch nginx-mod-http-image-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64 nginx-mod-http-perl-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64 nginx-mod-http-xslt-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64 nginx-mod-mail-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64 nginx-mod-stream-1:1.14.1-9.module_el8.0.0+184+e34fea82.x86_64 perl-Carp-1.42-396.el8.noarch perl-Errno-1.28-416.el8.x86_64 perl-Exporter-5.72-396.el8.noarch perl-File-Path-2.15-2.el8.noarch perl-IO-1.38-416.el8.x86_64 perl-PathTools-3.74-1.el8.x86_64 perl-Scalar-List-Utils-3:1.49-2.el8.x86_64 perl-Socket-4:2.027-3.el8.x86_64 perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch perl-Unicode-Normalize-1.25-396.el8.x86_64 perl-constant-1.33-396.el8.noarch perl-interpreter-4:5.26.3-416.el8.x86_64 perl-libs-4:5.26.3-416.el8.x86_64 perl-macros-4:5.26.3-416.el8.x86_64 perl-parent-1:0.237-1.el8.noarch perl-threads-1:2.21-2.el8.x86_64 perl-threads-shared-1.58-2.el8.x86_64 Complete! |
Paso 3: Habilite e inicie Nginx
1 2 | sudo systemctl enable nginx sudo systemctl start nginx |
Resultado:
1 2 3 | [root@tutorialspots ~]# sudo systemctl enable nginx Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service. [root@tutorialspots ~]# sudo systemctl start nginx |
Paso 4: si está ejecutando un firewall, ejecute los siguientes comandos para permitir el tráfico HTTP y HTTPS:
1 2 3 4 5 | systemctl enable firewalld.service systemctl start firewalld.service sudo firewall-cmd --permanent --zone=public --add-service=http sudo firewall-cmd --permanent --zone=public --add-service=https sudo firewall-cmd --reload |
¡Listo !, ahora puede acceder a su sitio web en su navegador web
http://server_domain_name_or_IP/
Ejemplo: http://136.243.62.225/
0 Comentarios
Dejanos tu comentario para seguir mejorando!