Okay, so I’ve been messing around with this “LAMP stack” thing and decided to try out Cherub, which I guess is like a web server or something. It was totally new to me, so here’s how the whole clumsy process went down.
First Steps – Getting LAMP Set Up
First, I had to get the basics down. I’m talking about getting that LAMP stack working. I already had Linux on my machine. So, I had that ‘L’ part.
I started by installing Apache. I Just typed some commands into the terminal, Something like:
sudo apt update
sudo apt install apache2
I hit enter and let it do its thing. Boom, Apache was in.
Next up, I needed MySQL for the database stuff. Another command, another wait:
sudo apt install mysql-server
I secured it and created a user with a password.
Finally, I installed PHP:
sudo apt install php libapache2-mod-php php-mysql
I restarted Apache:
sudo systemctl restart apache2
I made a quick file to check if PHP was working with Apache. I just popped that into the /var/www/html/
folder, went to my browser, and typed in my server’s IP address followed by . And it was working!
Getting Cherub
Next was Cherub.I found Cherub, downloaded the file. It was a compressed file.
I put the file in the Document folder.
Then, I unzipped the Cherub file with the command:
tar -xvf *
Runing and Using Cherub
I went into the folder where I unzipped Cherub.
I typed ./cherub
to start it.
Then I typed ./cherub -w /var/www/html/
to point it at my web files.
I opened my browser, went to the address, and tried to load something. And….it worked! My PHP file from before was working!
Final Words
It was a bit of playing around, but it’s pretty cool to see how simple it is to get a basic web server running. It wasn’t super smooth, and I’m sure there are better ways to do all this. I’m just happy I got it to work!