I have a personal VPS running Centos7 and ApisCP for some personal projects and email and i thought it had been auto updating. I had to go in yesterday to update some mail settings and i saw that it was super out of date. I read through a couple forum threads to try to fix it but I was unable to update the server (yum update) due to the OS being EOL. At this point i think it’ll be quickest to just wipe the box and start fresh. To accomplish that I have two questions:
Is there a preferred OS for a fresh install? It looks like my options are Rocky or AlmaLinux?
Is there a list of files I need to create a backup so I can restore my settings post wipe?
You may either perform an in-place upgrade using LEAPP or migrate all sites to a new platform using the migration tool. Unless you’re emotionally attached to that machine, migrating sites to a new platform is the best option as it gives you an opportunity to troubleshoot any sites individually before migrating to a new environment.
I’d recommend Rocky 8 at this point.
AlmaLinux and Rocky Linux set out to be bug-for-bug rebuilds of RHEL8. Alma walked back on this pledge, Rocky has not. I’ve seen two separate users running into system hangs on fresh install with Alma that could not be reproduced with Rocky. ABI compatibility, what AlmaLinux is now, is a much weaker standard than 1:1 rebuilds, what Rocky still is. With the complexity and criticality of both kernel and systemd - the more engineering resources on code the better it is for stability.
I tried LEAPP but it failed - most likely due to the fact that i can’t run a yum update successfully. Does the migration tool require upcp to be working? Because at this point it’s not. I think i might be at the manual backup and wipe stage.
So long as the panel works, you can migrate off it.
On LEAPP, looks like CentOS pulled the plug on the repo entirely. Rocky has provided a workaround for this if you’d like to do in-place. I’d still recommend a server migration.
You’d want the migration tool, not import tool which works with cPanel backups at this time. Only cpcmd is required to work for this tool, which looks to be bad from a missing readline library?
What errors do you receive when attempting to run the command? These guide me in helping you find a solution otherwise it’s impossible to know with certainty.
Looks like you’re running an ancient release. Oniguruma was added June 2020 as a build dependency…
There are two approaches here:
First just linking libreadline.so.5 to 6,
ln -s /usr/lib64/libreadline.so.{6,5}
See if apnscp_php -v works then. If so, and it reports PHP 8.1.x, then you’re good to go. If it reports 7.4.x, then there may be API changes preventing a server-to-server migration. Run through the migration process; report any errors encountered as this is terra incognita and I’m not much for reading minds.
Alternatively, to rebuild panel PHP, the first step is to correct the yum repos in /etc/yum.repos.d, see this article. Once that’s done verify it works with yum install -y oniguruma-devel dbus-devel, then proceed with upcp -sbf apnscp/build-php apnscp/install-extensions
Note this order is important and must be done in serial.
Then re-run upcp -sbf apnscp/build-php apnscp/install-extensions. Later panel iterations cleanup build environment, running something 4 years old… is bound to have its moments.
Ansible and Python are locked to OS. It’s irrelevant in this context.
Getting closer. The build finished this time but I’m getting two errors on startup:
PHP Warning: PHP Startup: Unable to load dynamic library 'event.so' (tried: /usr/local/apnscp/sys/php/20190902/event.so (libevent_openssl-2.0.so.5: cannot open shared object file: No such file or directory), /usr/local/apnscp/sys/php/20190902/event.so.so (/usr/local/apnscp/sys/php/20190902/event.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Parse error: syntax error, unexpected '|', expecting '{' in /usr/local/apnscp/lib/helpers.php on line 181
Code is referencing PHP 8.1, right now you’re on 7.4. Lockstep migrations were introduced ~18 months ago. Let’s approach this as if you’re at the crescent end of PHP 7.4, then move to 8.1:
First perform a full platform scrub:
upcp -sbf
Then jump back to 3.2.37, which was the last release before 8.1:
TASK [php/install-pecl-module : Build and install imagick library.] ************
fatal: [localhost]: FAILED! => changed=true
cmd:
- /usr/local/apnscp/resources/playbooks/roles/php/install-pecl-module/files/installPecl.sh
- imagick
- ''
delta: '0:00:02.675566'
end: '2024-08-23 15:27:48.862378'
msg: non-zero return code
rc: 1
start: '2024-08-23 15:27:46.186812'
stderr: |-
configure: WARNING: you should use --build, --host, --target
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
stderr_lines: <omitted>
stdout: |-
/usr/local/apnscp/storage/tmp/extension.EuquTeT /usr/local/apnscp/resources/playbooks
downloading imagick-3.7.0.tgz ...
Starting to download imagick-3.7.0.tgz (360,138 bytes)
.........................................................................done: 360,138 bytes
File /usr/local/apnscp/storage/tmp/extension.EuquTeT/imagick-3.7.0.tgz downloaded
/usr/local/apnscp/storage/tmp/extension.EuquTeT/imagick-3.7.0 /usr/local/apnscp/storage/tmp/extension.EuquTeT /usr/local/apnscp/resources/playbooks
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking for pkg-config... /bin/pkg-config
checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
checking Testing /usr/bin/MagickWand-config... Doesn't exist
checking Testing /usr/sbin/bin/MagickWand-config... Doesn't exist
checking Testing /opt/bin/MagickWand-config... Doesn't exist
checking Testing /opt/local/bin/MagickWand-config... Doesn't exist
checking Testing /opt/homebrew/bin/MagickWand-config... Doesn't exist
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=18 changed=0 unreachable=0 failed=1 skipped=7 rescued=0 ignored=0