I was wondering if there is a way to use LEPP instead of LEMP for my virtual petsite using PHP since my website performs a lot more write operations than read operations. I have gone through the tutorials in the digital ocean stack and I am unable to find one that does so.
I am switching from Ruby on Rails to PHP since there is a bit more up to date articles on it and I am kind of at a stuck point on Ruby on Rails 7. I am unable to get past the initial setup using a postgress server and https. There was one piece of information I am missing from the previous question which is stopping me from moving forward to get the website up and running.
Any help would be greatly appreciated on this.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya @ebeecroft,
Yes, you can go from MySQL to PostgreSQL making the setup LEPP, it’s quite alright.
First, let’s start with the
L
,A
andP(php)
. You can follow this tutorial from DigitalOcean for that:https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu
Skip the part for MySQL.
Now for Postregsql install on Ubuntu, you can do the following
Update your system’s package list: Open a terminal and run the following command to make sure your package list and installed packages are updated.
nstall PostgreSQL: You can install PostgreSQL along with the PostgreSQL-contrib package which adds some additional utilities and functionality by running:
Verify the installation: After installation, PostgreSQL should start automatically. You can check its status by running:
Accessing PostgreSQL: By default, PostgreSQL creates a user named ‘postgres’ with the role ‘postgres’. You can switch to this user to start using PostgreSQL:
You can then access the PostgreSQL command line interface by typing:
To exit the PostgreSQL interface, type:
Additional Configuration (Optional):
postgres
user./etc/postgresql/{version}/main/
.Secure PostgreSQL: While PostgreSQL is configured with reasonable defaults for security, you may need to adjust these settings based on your specific needs. For example, you might want to change the default listening addresses or implement more stringent password policies.
Heya, @ebeecroft
LEPP might a suitable alternative to LEMP to optimize the stack for write-heavy operations.
I don’t think we have one article that covers the whole process, but you can use these two to complete the process.
You can complete the LEMP stack article, beside from the MySQL setup bit and then switch to our PostgreSQL article to complete the database bit.
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-22-04
Hope that this helps!