Install LAMP on centOS

  • Last Created On Dec 10, 2024
  • 6
0 0

LAMP stands for Linux, Apache, MySQL and PHP.

Once installed you will be able to host your website on the sever you have installed LAMP on.

Step 1: Start by going to your terminal and type the below command.

sudo yum install httpd

You should see the download processing before it asks you if you want to install:

Type “y” and hit Enter.

Step 2: Start your Apache server by typing:

sudo service httpd start

Apache should be installed properly now. To check it, navigate to your IP address in the address bar of your browser. You should see some form of a test page letting you know that Apache has installed properly.

Step 3: Installing MySQL

MySQL is an open source database management system often used to store user data on a web server.

With your terminal still open, type in the following command:

sudo yum install mysql-server

If you are running CentOS 7+, then you’ll need to install MySQL using the following commands:

yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server

Once MySQL is installed, start the service using:

sudo service mysqld start

Next you’ll need to set up a root password:

sudo /usr/bin/mysql_secure_installation

When asked for your current root password, leave the field blank and hit Enter. Type “y” and hit Enter again when it asks if you would like to set the root password.

Set the password and be sure to store the password somewhere safe.

Next you will be asked a series of questions. Read through them and determine what you want your answers to be.

Step 4: Installing PHP

PHP is a server-side scripting language designed for web development.

Type the command below to install PHP

sudo yum install php php-mysql

Then follow the prompts to install PHP.

You have now installed LAMP

Views: 6

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    96
  • Deploy a PyTorch Workspace on a Vultr Cl...
    71
  • Managing Backup Storage
    83
  • Automating FTP Backups in Windows Server
    71
  • Automating FTP Backups in Linux
    75

Popular Articles

  • Our General Terms & Conditions
    2633
  • Our Privacy Policy
    2478
  • Our Cookies Policy
    275
  • Our Terms of Use
    153
  • How to Install JAX with ROCm Acceleratio...
    96