Get the App
SLTechnology News&Howtos  ›  Servers  › 

Yum install LAMP

Shulou Source: shulou.com Published: 2022-06-03 04:48:07 09月21日 Update

1. Preparatory work:

Virtual machines should be able to surf the Internet.

Systemctl stop firewalld / / turn off firewall seteforce 0

Install wget (as shown below)

Yum install-y wget

2. Deploy apache:

Yum install-y httpdsystemctl start httpd / / Boot httpdsystemctl enable httpd / / set to boot netstat-anpt | grep httpd / / check whether httpd is working

When finished, enter the ip address in the URL bar to see if the following figure appears.

View the apache version:

Httpd-v

3. Deploy mysql (mariadb)

Get the rpm package: put it in the root directory

Wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Install the RPM package

Rpm-ivh mysql-community-release-el7-5.noarch.rpm

Install mysql

Yum install-y mysql-community-server

Start

Systemctl start mysql

After completion, enter mysql directly to enter the database.

The password will not be changed.

5. Deploy php

The yum install-y php installation component is php support for mysql yum install-y\ php-mysql\ php-gd\ libjpeg*\ php-ldap\ php-odbc\ php-pear\ php-xml\ php-xmlrpc\ php-mbstring\ php-bcmath\ php-mhash

Vi / etc/httpd/conf/httpd.conf after completion

Directly enter / ServerName lookup to change the red box to www.aa.com and remove #

After completion, enter / DirectoryIndex to look up and add index.php after index.html.

Save and exit when you are finished, and then go to

Vi / etc/php.inidate.timezone = PRC

Enter / date to add PRC to the last line of the picture and then save and exit

Go to the mysql database and create an aa library and authorize it

Create database aa;grant all on aa.* to 'mail'@'%' identified by' 123456 flush privileges; / / refresh

Then vi / var/www/html/index.php type something.

Restart the service when you are finished. Enter the ip address in the web page.

Complete

Tags: Input content address data database work success one line following figure picture password root directory version component URL web page software package firewall and will Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Redmi Huawei vpn OPPO Reno