By ebeecroft
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!
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-and-use-postgresql-on-ubuntu-22-04
Hope that this helps!
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 and P(php). You can follow this tutorial from DigitalOcean for that:
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.
sudo apt update && sudo apt upgrade
nstall PostgreSQL: You can install PostgreSQL along with the PostgreSQL-contrib package which adds some additional utilities and functionality by running:
sudo apt install postgresql postgresql-contrib
Verify the installation: After installation, PostgreSQL should start automatically. You can check its status by running:
sudo systemctl status postgresql
Accessing PostgreSQL: By default, PostgreSQL creates a user named ‘postgres’ with the role ‘postgres’. You can switch to this user to start using PostgreSQL:
sudo -i -u postgres
You can then access the PostgreSQL command line interface by typing:
psql
To exit the PostgreSQL interface, type:
\q
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.