VPS侦探论坛

 找回密码
 注册
查看: 2755|回复: 3

军哥,在amazon上ec2redhat实例一键按装失败

[复制链接]
发表于 2020-11-10 21:50:43 | 显示全部楼层 |阅读模式

You will install lnmp stack.
nginx-1.16.1
mysql-5.6.44
php-5.6.40
Enable InnoDB: y
Print lnmp.conf infomation...
Download Mirror: https://soft6.vpser.net
Nginx Additional Modules:
PHP Additional Modules:
Database Directory: /usr/local/mysql/var
Default Website Directory: /home/wwwroot/default
LNMP Version: 1.6
RHEL 8.3
\S
Kernel \r on an \m

NAME="Red Hat Enterprise Linux"
VERSION="8.3 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.3"
Red Hat Enterprise Linux release 8.3 (Ootpa)
Red Hat Enterprise Linux release 8.3 (Ootpa)
Linux ip-172-31-15-62.ca-central-1.compute.internal 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Memory is: 815 MB
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        386M     0  386M   0% /dev
tmpfs           408M     0  408M   0% /dev/shm
tmpfs           408M   21M  388M   6% /run
tmpfs           408M     0  408M   0% /sys/fs/cgroup
/dev/xvda2       10G  3.1G  7.0G  31% /
tmpfs            82M     0   82M   0% /run/user/1000
OpenSSL 1.1.1g FIPS  21 Apr 2020
Hosts: ok.
PING lnmp.org (168.235.75.115) 56(84) bytes of data.
64 bytes from 168.235.75.115 (168.235.75.115): icmp_seq=1 ttl=46 time=75.9 ms

--- lnmp.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 75.892/75.892/75.892/0.000 ms
DNS...ok
Server Location: CA
Current Version: RHEL Ver 8
RHEL will use 163 centos repository...
17 files removed
CentOS-8 - Base - 163.com                        56  B/s | 162  B     00:02
Errors during downloading metadata for repository 'base':
  - Status code: 404 for http://mirrors.163.com/centos/8/os/x86_64/repodata/repomd.xml (IP: 59.111.0.251)
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Setting timezone...
[+] Installing ntp...
CentOS-8 - Base - 163.com                        86  B/s | 162  B     00:01
Errors during downloading metadata for repository 'base':
  - Status code: 404 for http://mirrors.163.com/centos/8/os/x86_64/repodata/repomd.xml (IP: 59.111.0.251)
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
include/init.sh: line 14: ntpdate: command not found
Tue Nov 10 21:44:57 CST 2020
[-] Yum remove packages...
error: package httpd is not installed
error: package httpd-tools is not installed
No match for argument: mysql-server
No match for argument: mysql
No match for argument: mysql-libs
No match for argument: mariadb-server
No match for argument: mariadb
No match for argument: mariadb-libs
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
error: package mysql is not installed
error: package mysql-libs is not installed
error: package mariadb is not installed
error: package mariadb-libs is not installed
error: package php-mysql is not installed
error: package php-cli is not installed
error: package php-gd is not installed
error: package php-common is not installed
error: package php is not installed
No match for argument: httpd*
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
No match for argument: php*
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
0 files removed
[+] Yum installing dependent packages...
CentOS-8 - Base - 163.com                       114  B/s | 162  B     00:01
Errors during downloading metadata for repository 'base':
  - Status code: 404 for http://mirrors.163.com/centos/8/os/x86_64/repodata/repomd.xml (IP: 59.111.0.251)
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
CentOS-8 - Base - 163.com                        92  B/s | 162  B     00:01
Errors during downloading metadata for repository 'base':
  - Status code: 404 for http://mirrors.163.com/centos/8/os/x86_64/repodata/repomd.xml (IP: 59.111.0.251)
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
CentOS-8 - Base - 163.com                        66  B/s | 162  B     00:02
Errors during downloading metadata for repository 'base':
  - Status code: 404 for http://mirrors.163.com/centos/8/os/x86_64/repodata/repomd.xml (IP: 59.111.0.251)
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
^C
尝试过更换yum源也不行,麻烦指点一下,谢谢
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2020-11-11 08:38:30 | 显示全部楼层


你配置的源有问题,rhel 8和rhel 7配置文件格式是不一样的,可以参考centos 8的
  1. [base]
  2. name=CentOS-$releasever - Base - mirrors.aliyun.com
  3. failovermethod=priority
  4. baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
  5.         http://mirrors.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
  6.         http://mirrors.cloud.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
  7. gpgcheck=1
  8. gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

  9. #additional packages that may be useful
  10. [extras]
  11. name=CentOS-$releasever - Extras - mirrors.aliyun.com
  12. failovermethod=priority
  13. baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/
  14.         http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/os/
  15.         http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/os/
  16. gpgcheck=1
  17. gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

  18. #additional packages that extend functionality of existing packages
  19. [centosplus]
  20. name=CentOS-$releasever - Plus - mirrors.aliyun.com
  21. failovermethod=priority
  22. baseurl=https://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/os/
  23.         http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
  24.         http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
  25. gpgcheck=1
  26. enabled=0
  27. gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

  28. [PowerTools]
  29. name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
  30. failovermethod=priority
  31. baseurl=https://mirrors.aliyun.com/centos/$releasever/PowerTools/$basearch/os/
  32.         http://mirrors.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
  33.         http://mirrors.cloud.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
  34. gpgcheck=1
  35. enabled=0
  36. gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official


  37. [AppStream]
  38. name=CentOS-$releasever - AppStream - mirrors.aliyun.com
  39. failovermethod=priority
  40. baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
  41.         http://mirrors.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
  42.         http://mirrors.cloud.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
  43. gpgcheck=1
  44. gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
复制代码
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2020-11-11 09:26:21 | 显示全部楼层

licess 发表于 2020-11-11 08:38
你配置的源有问题,rhel 8和rhel 7配置文件格式是不一样的,可以参考centos 8的 ...

感谢军哥, 我把你提供的代码替换后,yum源是正常使用了,但是运行install.sh一键按装后选好软件版本开始后,脚本会自动把yum源代码换回163的,然后又出现上面的错误,看了一键安装包代码没找到在那里可以关闭自动替换yum源,麻烦军哥指导一下。下图是运行安装脚本后的记录,出现错误后再看一下yum源的代码,已经被换成163的:
  1. Linux ip-172-31-15-62.ca-central-1.compute.internal 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  2. Memory is: 815 MB
  3. Filesystem      Size  Used Avail Use% Mounted on
  4. devtmpfs        386M     0  386M   0% /dev
  5. tmpfs           408M     0  408M   0% /dev/shm
  6. tmpfs           408M   21M  388M   6% /run
  7. tmpfs           408M     0  408M   0% /sys/fs/cgroup
  8. /dev/xvda2       10G  3.2G  6.9G  32% /
  9. tmpfs            82M     0   82M   0% /run/user/1000
  10. OpenSSL 1.1.1g FIPS  21 Apr 2020
  11. Hosts: ok.
  12. PING lnmp.org (168.235.75.115) 56(84) bytes of data.
  13. 64 bytes from 168.235.75.115 (168.235.75.115): icmp_seq=1 ttl=46 time=75.7 ms

  14. --- lnmp.org ping statistics ---
  15. 1 packets transmitted, 1 received, 0% packet loss, time 0ms
  16. rtt min/avg/max/mdev = 75.705/75.705/75.705/0.000 ms
  17. DNS...ok
  18. Server Location: CA
  19. Current Version: RHEL Ver 8
  20. <font color="#0000ff">RHEL will use 163 centos repository...</font>
  21. 46 files removed
  22. CentOS-8 - Base - 163.com                       117  B/s | 162  B     00:01
  23. Errors during downloading metadata for repository 'base':
  24.   - Status code: 404 for http://mirrors.163.com/centos/8/os/x86_6h/repodata/repomd.xml (IP: 59.111.0.251)
  25. <font color="#ff0000">Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
  26. Setting timezone...</font>
  27. [+] Installing ntp...
  28. CentOS-8 - Base - 163.com                        66  B/s | 162  B     00:02
  29. Errors during downloading metadata for repository 'base':
  30.   - Status code: 404 for http://mirrors.163.com/centos/8/os/x86_6h/repodata/repomd.xml (IP: 59.111.0.251)
  31. Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
  32. include/init.sh: line 14: ntpdate: command not found
  33. Wed Nov 11 09:19:20 CST 2020
  34. [-] Yum remove packages...
  35. ^C[
复制代码


如何修改让他不要替换,或者把要替换的内容修改成能用的源,谢谢军哥。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2020-11-11 11:16:45 | 显示全部楼层



用lnmp1.7进行安装
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-25 01:35 , Processed in 0.025871 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表