add php 8.2 and also add support for cloud linux 8

This commit is contained in:
usmannasir
2023-09-12 23:20:54 +05:00
parent fe7a880b15
commit a0af164a00
6 changed files with 94 additions and 101 deletions

View File

@@ -136,68 +136,70 @@ class preFlightsChecks:
def mountTemp(self):
try:
## On OpenVZ there is an issue using .tempdisk for /tmp as it breaks network on container after reboot.
# ## On OpenVZ there is an issue using .tempdisk for /tmp as it breaks network on container after reboot.
#
# if subprocess.check_output('systemd-detect-virt').decode("utf-8").find("openvz") > -1:
#
# varTmp = "/var/tmp /tmp none bind 0 0\n"
#
# fstab = "/etc/fstab"
# writeToFile = open(fstab, "a")
# writeToFile.writelines(varTmp)
# writeToFile.close()
#
# else:
#
# command = "dd if=/dev/zero of=/usr/.tempdisk bs=100M count=15"
# preFlightsChecks.call(command, self.distro, command,
# command,
# 1, 0, os.EX_OSERR)
#
# command = "mkfs.ext4 -F /usr/.tempdisk"
# preFlightsChecks.call(command, self.distro, command,
# command,
# 1, 0, os.EX_OSERR)
#
# command = "mkdir -p /usr/.tmpbak/"
# preFlightsChecks.call(command, self.distro, command,
# command,
# 1, 0, os.EX_OSERR)
#
# command = "cp -pr /tmp/* /usr/.tmpbak/"
# subprocess.call(command, shell=True)
#
# command = "mount -o loop,rw,nodev,nosuid,noexec,nofail /usr/.tempdisk /tmp"
# preFlightsChecks.call(command, self.distro, command,
# command,
# 1, 0, os.EX_OSERR)
#
# command = "chmod 1777 /tmp"
# preFlightsChecks.call(command, self.distro, command,
# command,
# 1, 0, os.EX_OSERR)
#
# command = "cp -pr /usr/.tmpbak/* /tmp/"
# subprocess.call(command, shell=True)
#
# command = "rm -rf /usr/.tmpbak"
# preFlightsChecks.call(command, self.distro, command,
# command,
# 1, 0, os.EX_OSERR)
#
# command = "mount --bind /tmp /var/tmp"
# preFlightsChecks.call(command, self.distro, command,
# command,
# 1, 0, os.EX_OSERR)
#
# tmp = "/usr/.tempdisk /tmp ext4 loop,rw,noexec,nosuid,nodev,nofail 0 0\n"
# varTmp = "/tmp /var/tmp none bind 0 0\n"
#
# fstab = "/etc/fstab"
# writeToFile = open(fstab, "a")
# writeToFile.writelines(tmp)
# writeToFile.writelines(varTmp)
# writeToFile.close()
if subprocess.check_output('systemd-detect-virt').decode("utf-8").find("openvz") > -1:
varTmp = "/var/tmp /tmp none bind 0 0\n"
fstab = "/etc/fstab"
writeToFile = open(fstab, "a")
writeToFile.writelines(varTmp)
writeToFile.close()
else:
command = "dd if=/dev/zero of=/usr/.tempdisk bs=100M count=15"
preFlightsChecks.call(command, self.distro, command,
command,
1, 0, os.EX_OSERR)
command = "mkfs.ext4 -F /usr/.tempdisk"
preFlightsChecks.call(command, self.distro, command,
command,
1, 0, os.EX_OSERR)
command = "mkdir -p /usr/.tmpbak/"
preFlightsChecks.call(command, self.distro, command,
command,
1, 0, os.EX_OSERR)
command = "cp -pr /tmp/* /usr/.tmpbak/"
subprocess.call(command, shell=True)
command = "mount -o loop,rw,nodev,nosuid,noexec,nofail /usr/.tempdisk /tmp"
preFlightsChecks.call(command, self.distro, command,
command,
1, 0, os.EX_OSERR)
command = "chmod 1777 /tmp"
preFlightsChecks.call(command, self.distro, command,
command,
1, 0, os.EX_OSERR)
command = "cp -pr /usr/.tmpbak/* /tmp/"
subprocess.call(command, shell=True)
command = "rm -rf /usr/.tmpbak"
preFlightsChecks.call(command, self.distro, command,
command,
1, 0, os.EX_OSERR)
command = "mount --bind /tmp /var/tmp"
preFlightsChecks.call(command, self.distro, command,
command,
1, 0, os.EX_OSERR)
tmp = "/usr/.tempdisk /tmp ext4 loop,rw,noexec,nosuid,nodev,nofail 0 0\n"
varTmp = "/tmp /var/tmp none bind 0 0\n"
fstab = "/etc/fstab"
writeToFile = open(fstab, "a")
writeToFile.writelines(tmp)
writeToFile.writelines(varTmp)
writeToFile.close()
pass
except BaseException as msg:
preFlightsChecks.stdOut('[ERROR] ' + str(msg))

View File

@@ -204,6 +204,9 @@ class InstallCyberPanel:
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp81*'
os.system(command)
command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp82*'
os.system(command)
elif self.distro == centos:
command = 'yum -y groupinstall lsphp-all'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
@@ -241,7 +244,7 @@ class InstallCyberPanel:
command = 'dnf install lsphp71* lsphp72* lsphp73* lsphp74* lsphp80* --exclude lsphp73-pecl-zip --exclude *imagick* -y --skip-broken'
subprocess.call(command, shell=True)
command = 'dnf install lsphp81* --exclude *imagick* -y --skip-broken'
command = 'dnf install lsphp81* lsphp82* --exclude *imagick* -y --skip-broken'
subprocess.call(command, shell=True)
if self.distro == openeuler: