I'm going to show you how to install a LAMP Stack on a VPS using CentOS 7.6 x64.
Create a VPS Server with at least 1GB of Ram but I would suggest at least 2GB
Open your choice of an SSH Client. There are many choices out there. PuTTY is very popular https://www.putty.org/
Connect to your Server by typing in: root@youripaddress and then you'll be prompted for a password.
Once you connect (If you use Digital Ocean they will have you change your password once you login) you are set to get started.
First, you'll want to update your server. Type the following:
yum update -y
yum upgrade -y
Then you'll want to install some other tools (You may not need all of them but it's good to have them):
yum install nano -y
Now to get started with your LAMP Stack you need to install APACHE: yum install httpd -y
Now we'll need to start APACHE: systemctl start httpd.service
If this works visit your YourIpAddress in the navigation bar and you should see a Testing 123.. page. This means APACHE has been installed and is working.
Next, we need to make sure APACHE starts after a reboot: systemctl enable httpd.service
Now we need to install MariaDB: yum install mariadb-server mariadb -y
Now we need to start MariaDB: systemctl start mariadb
Then we'll secure the DB: mysql_secure_installation
Now there will be some options:
Enter current password for root (enter for none): Hit Enter
Set root password? [Y/n]: y
New password: Enter a password
Re-enter new password: Re-enter your password
Remove anonymous users? [Y/n]: y
Disallow root login remotely? [Y/n]: y
Remove test database and access to it? [Y/n]: y
Reload privilege tables now? [Y/n]: y
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Now we'll need to enable MariaDB when the Server Reboots: systemctl enable mariadb.service
Now we'll install PHP: yum install php php-mysql -y
Now we'll need to reboot APACHE: systemctl restart httpd.service
To make sure PHP installed correctly type in the following command to create a file to test your PHP: nano /var/www/html/info.php
In the text editor type: See Video For Code
Then: ctrl + x
Then: y and hit Enter
And that's how you create a LAMP Stack! You can add your files to your /var/www/html
BONUS: Installing phpMyAdmin
We need to install the EPEL repository: yum install epel-release -y
yum update -y
yum upgrade -y
Now we need to install phpMyAdmin: yum install phpmyadmin -y
Now we need to edit the phpMyAdmin Config file: nano /etc/httpd/conf.d/phpMyAdmin.conf
Edit this section and add the following:
Add: Require all granted to the #Apache 2.4 section
Change: Deny from All to Allow from All in the #Apache 2.2 section
Restart APACHE: service httpd restart
Now visit your IpAddress/phpmyadmin
Thanks for watching and remember to Like, Share and Subscribe.
Digital Ocean: https://m.do.co/c/42dfdce0a5e1
Don't have a Gaming PC? Try out Cloud Gaming: Get $10 in Credit! https://paperspace.io/&...
Web Hosting: https://inmotion-hosting.ev...
Humb Monthly: https://www.humblebundle.co......
Coffee for Gamers! https://www.phineascoffee.c...