Need to confirm detailed steps moving server application from AL1 to AL 2023

0

It has been a long time since I set up my server environment (EC2 on Amazon Linux 1). Given that AL1 is no longer supported, and Amazon Linux 2023 is the obvious choice, I want to: a) essentially clone my php application to the new EC2 instance b) clone my website (also residing on the same instance) to the same new EC2 instance c) install MySql on the new EC2 instance to replace the RDS MySql instance I have been using

With respect to a and b, is it simply a matter of:

  • creating a snapshot of the volume currently attached to the AL1 EC2 instance
  • launching a new EC2 instance with Amazon Linux 2023, using the volume snapshot
  • testing and ensuring the php application and website run, etc.

With respect to c, are there any danger signs I should be aware of running MySql on the same EC2 server (with the php application and the website)? I want to do this because it is a legacy application that is not using nearly as much DB space as before, and I want to save on costs. I would need to be able to access the DB from my laptop.

I appreciate any pointers, suggestions, or recommendations on the above.

TIA

Colin Goldberg

Colin G
asked 4 months ago280 views
3 Answers
1

Hello.

You cannot directly upgrade from Amazon Linux1 to Amazon Linux2023, so you need to install middleware etc. on Amazon Linux2023.
https://docs.aws.amazon.com/ja_jp/linux/al2023/ug/compare-with-al1.html

I think it is easier to upload the program code such as PHP to Amazon Linux 2023 as it is or pull it from GitHub etc. than to mount the EBS volume of Amazon Linux 1 on Amazon Linux 2023.
Therefore, please install middleware such as PHP and web server on Amazon Linux 2023, deploy the application that was running on Amazon Linux 1, and then check the operation.

It is possible to install and use a database on EC2.
I have also installed a database on EC2 when running an application that I have been using for a long time.
Also, I think it's a good idea to use the Session Manager's port forwarding function to connect to the database from your local PC.
https://aws.amazon.com/jp/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/

profile picture
EXPERT
answered 4 months ago
0

Thank you very much for your response, which I do appreciate. As may be obvious, my php version (5.6) will (probably) not work on AL2023. My php code is not on github, so I either need to copy the code to my laptop - and copy it to the new instance, or perhaps create a temporary volume, attach it to the old EC2 instance, and use it as a source for the AL2023 instance (messy!).

Similarly, I have an old version of Wordpress, so it looks like the "migration" to AL2023 will be very manual.

I have yet to discover what issues lie in wait migrating from php 5.6 to 8.2. I am not looking forward to this.

I am happy to hear about your experience with MySql.

Thanks again.

Colin G
answered 4 months ago
0

Given the potential complexity of migrating from php 5.6 to 8.2 (supported by AL2023) if I migrated to AL2023, I wonder if it is not worth it to consider leaving my AL1 EC2 instance as is, and installing MySql on it. This would mean I don't have to worry about upgrading php and also Wordpress.

Of course, it would be dependent on AWS allowing AL1 EC2 instances into the future.

Does this option sound stupid?

Colin G
answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions