First, install the Apache server
Yum Install httpd
Second, install PHP and common software packages
Yum install php httpd-manual mod_ssl mod_perl mod_auth_mysql yum install php-gd php-xml php-mbstring php-ldap php-pear
Php-xmlrpc
Yum install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
Third, install MARIADB
Four, start the service
Systemctl start Httpd.service
systemctl start Mariadb.service
Five, if the fourth is successful, set two services to start automatically
Systemctl Enable Httpd.service
Systemctl enable Mariadb.service
Set up the database server
[Root@rachel ~]# mysql-u root #无密码登录数据库 Welcome to the MARIADB Monitor. Commands End With;
or \g. Your mariadb Connection ID is 3 server version:5.5.44-mariadb mariadb server Copyright (c), 2015, Oracle, MARIADB C
Orporation Ab and others. Type ' help, ' or ' \h ' for help.
Type ' \c ' to clear the current input statement. MARIADB [(None)]> Select User, host, password from Mysql.user; #检索数据库用户 +------+--------------+----------+ | user | Host |
password | +------+--------------+----------+
| Root | localhost | |
| Root | Rachel | |
| Root | 127.0.0.1 | |
| Root | :: 1 | |
| | localhost | |
| | Rachel |
|
+------+--------------+----------+ 6 rows in Set (0.00 sec) mariadb [None]]> delete from mysql.user where user= '; Query OK, 2 rows Affected (0.00 sec) #删除匿名用户 mariadb [(none)]> Delete from mysql.user where user= ' root ' and host= ':: 1 ' ; #删除IPv6方式登录用户 Query OK, 1 row affecTed (0.00 sec) Mariadb [(None)]> Select User, host, password from Mysql.user; #再次查看用户 +------+--------------+----------+ | user | Host |
password | +------+--------------+----------+
| Root | localhost | |
| Root | Rachel | |
| Root | 127.0.0.1 |
| +------+--------------+----------+ 3 rows in Set (0.00 sec) mariadb [None]]> set password for Root@localhost=password (' XXXXXX '); #修改本地登录密码 Query OK, 0 rows Affected (0.00 sec) mariadb [None]]> set password for Root@rachel=password (' XXXXXX '); #修改本地登录密码 Query OK, 0 rows Affected (0.00 sec) mariadb [None]]> set password for root@ ' 127.0.0.1 ' =password (' XXXXXX '); #修改本地登录密码 Query OK, 0 rows Affected (0.00 sec) mariadb [None]]> Select User, host, password from Mysql.user; #查看密码 +------+--------------+-------------------------------------------+ | user | Host |
password | +------+--------------+-------------------------------------------+
| Root | localhost | *1728fcc102d8d1eb12bfxxxxxxxxxxxxxxxxxxx | | Root | Rachel | *1728fcc102d8d1eb12bfxxxxxxxxxxxxxxxxxxx | | Root | 127.0.0.1 |
*1728fcc102d8d1eb12bfxxxxxxxxxxxxxxxxxxx | +------+--------------+-------------------------------------------+ 3 rows in Set (0.00 sec) Mariadb [(None)]> Exit # Exit Bye [Root@rachel ~]# mysql-u root-p #再次用密码登录测试 Enter password:welcome to the MARIADB Monitor. Commands End With;
or \g. Your mariadb Connection ID is 4 server version:5.5.44-mariadb mariadb server Copyright (c), 2015, Oracle, MARIADB C
Orporation Ab and others. Type ' help, ' or ' \h ' for help.
Type ' \c ' to clear the current input statement. MARIADB [(None)]> exit Bye [Root@rachel ~]# #测试成功