Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Yum install LAMP

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report