Set up LAMP
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