Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to build php development environment LAMP?

Shulou Source: shulou.com Published: 2022-06-03 05:36:30 09月25日 Update

What this article shares to you is the detailed installation tutorial of building php development environment LAMP. I believe most people do not know how to install and deploy. In order to let you learn, I have summarized the following content for you.

1. Install softwar

Yum install httpd-y # install httpd

Yum install mariadb-server-y # install mysql instead of mariadb

Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

# install php source

Yum-y install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 php70w-pear.noarch php70w-process.x86_64 php70w-xml.x86_64 php70w-xmlrpc.x86_64

# install a lot of php drivers, just install them all.

two。 Configure httpd

Vim / etc/httpd/conf.d/virtual.conf # create a new virtual host configuration file

ServerAdmin www.123.com DocumentRoot / var/www/html/ # root Root ServerName www.123.com # Domain ErrorLog logs/error_log CustomLog logs/access_log common # Log ~

~

Vim / var/www/html/index.php # create a new php test page

Systemctl restart httpd # restart httpd

# the php display page shows that php can work properly

3. Configure the php program

Https://files.phpmyadmin.net/phpMyAdmin/4.9.4/phpMyAdmin-4.9.4-all-languages.zip

# download the source code and extract it to the "/ var/www/html" directory as shown below

# Open ip access again, and you can see the phpadmin page.

4. Log in to phpadmin

Systemctl restart mariadb.service # launch "mariadb"

Mysql # logging in to the database

MariaDB [(none)] > update mysql.user set authentication_string=password ('123456') where user='root';# change password

Or

Update mysql.user set password=password ("123456") where user='root';# can't use this sentence above.

Flush privileges; # Refresh permissions

Account root password 123456

# Log in

After reading the above, have you mastered the method of building php development environment LAMP? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Content login configuration environment development password more source code no yes host again domain name heap most skills tutorials data databases files Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Docker Apple Shulou Tech Info Shulou Technology