George McKinney Adventures in Software Development

October 3, 2024

Deploying WordPress on AWS Lightsail

Filed under: AWS,Lightsail,Linux — georgemck @ 8:31 am

After logging into AWS and launching the Lightsail service, it is necessary to create an instance. The instance for WordPress is based on the Linux Debian operating system packaged by Bitnami. Lightsail applications run standalone from AWS at large though can be integrated with it. When an instance is created, with the Route 53 service an hosted zone is created for the domain. It is barebones containing only the SOA and NS records. If it’s necessary to migrate an existing website into AWS/Lighstail, you must add the name service records for MX, CNAME, TXT, etc. This can be done by exporting the existing zone and then importing them into Route 53 but not adding the SOA and NS records (optional, depends on if you will still need them.)

Accessing the database directly is not allowed. To use the phpmyadmin included in Lightsail, you must create an SSH tunnel. Bitnami documents the procedure on this page and specifically with this video.

In order to access SFTP with a program like Filezilla on AWS, follow the documentation here.

If you add files to WordPress, it is likely that there will be permissions issues. You will see in the admin dashboard messages about not being to access certain files or folders. You can change the permission by connecting to the instance using SSH. This procedure is shown as a prerequisite for opening phpmyadmin. After successfully connecting, you can change ownership of the problematic files and folders with the following command which must be updated for the target machine.

sudo chown -R daemon:daemon uploads
sudo chown -R daemon:daemon application/config
sudo chown -R daemon:daemon /opt/bitnami/apache/htdocs/temp

In order for the domain name to resolve on the internet, you will need to update the Hosted Zone. In the hosted zone, add an A record pointing to the IP address of the Lightsail instance. This will work but will not support https (that is there is no SSL certificate). AWS documents how to add an SSL certificate to Lightsail. However, Bitnami has a better solution for this.

February 7, 2024

AL2023 PostgreSQL DNF Available

Filed under: AL2023,Amazon Linux,AWS,Cloud,Linux — georgemck @ 2:09 pm

This is a list of packages available in the Amazon Linux 2023 as of today on Elastic Beanstalk.

 

postgresql-odbc.x86_64
13.01.0000-5.amzn2023.0.1

postgresql-odbc-tests.x86_64
13.01.0000-5.amzn2023.0.1

postgresql15-contrib.x86_64
15.5-1.amzn2023.0.1

postgresql15-docs.x86_64
15.5-1.amzn2023.0.1

postgresql15-llvmjit.x86_64
15.5-1.amzn2023.0.1

postgresql15-plperl.x86_64
15.5-1.amzn2023.0.1

postgresql15-plpython3.x86_64
15.5-1.amzn2023.0.1

postgresql15-pltcl.x86_64
15.5-1.amzn2023.0.1

postgresql15-private-devel.x86_64
15.5-1.amzn2023.0.1

postgresql15-server-devel.x86_64
15.5-1.amzn2023.0.1

postgresql15-static.x86_64
15.5-1.amzn2023.0.1

postgresql15-test.x86_64
15.5-1.amzn2023.0.1

postgresql15-test-rpm-macros.noarch
15.5-1.amzn2023.0.1

postgresql15-upgrade.x86_64
15.5-1.amzn2023.0.1

postgresql15-upgrade-devel.x86_64
15.5-1.amzn2023.0.1

 

This is useful when launching an instance and knowing which packages are available in the repository.

 

 

 

 

 

 

dnf list available postg*

 

 

 

 

 

 

Nice reading on Elastic Beanstalk

Powered by WordPress