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

Centos 7 lamp environment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

1. Install Apache

Yum install httpd # according to the prompt, enter Y to install successfully

Systemctl start httpd.service # launch apache

Systemctl stop httpd.service # stop apache

Systemctl restart httpd.service # restart apache

Systemctl enable httpd.service # set apache to boot

two。 Install Mariadb

Yum install mariadb mariadb-server # asks if you want to install, enter Y to install automatically until the installation is complete

Systemctl start mariadb.service # launch MariaDB

Systemctl stop mariadb.service # stop MariaDB

Systemctl restart mariadb.service # restart MariaDB

Systemctl enable mariadb.service # set boot up

Cp / usr/share/mysql/my-huge.cnf / etc/my.cnf # copy the configuration file (Note: if there is a my.cnf by default under the / etc directory, you can overwrite it directly)

2.1 initialize the database

Mysql_secure_installation

Enter and enter Y according to the prompt

Enter the password twice and enter

Enter Y all the way according to the prompt

Last appeared: Thanks for using MySQL!

After setting the MySql password, restart MySQL:

Systemctl restart mariadb.service # restart MariaDB

3. Install PHP

Yum install php # enter Y when prompted until the installation is complete

3.1 install PHP components to enable PHP to support MariaDB

Yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash # choose the above installation package here to install, enter Y enter according to the prompt

Systemctl restart mariadb.service # restart MariaDB

Systemctl restart httpd.service # restart apache

4. Install phpMyadmin

Yum install phpmyadmin php-mcrypt

The default installation directory for phpMyAdmin is / usr/share/phpMyAdmin, and the virtual host configuration file / etc/httpd/conf.d/phpMyAdmin.conf (case sensitive) is automatically created in the configuration file directory of Apache. By default, phpMyAdmin on CentOS 7 is only allowed access from the loopback address (127.0.0.1). In order to connect remotely, you need to change its configuration.

Vi / etc/httpd/conf.d/phpMyadmin.conf

AddDefaultCharset UTF-8 # Apache 2.4 # Require ip 127.0.0.1 # comment out # Require ip:: 1 # comment out Require all granted # add # Apache 2.2 Order Deny Allow Deny from All Allow from 127.0.0.1 Allow from:: 1 # Apache 2.4 # Require ip 127.0.0.1 # comment out # Require ip:: 1 # comment out Require all granted # add # Apache 2.2 Order Deny Allow Deny from All Allow from 127.0.0.1 Allow from:: 1: wq

Systemctl restart httpd

Browser access address http://ip/phpmyadmin

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

Database

Wechat

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

12
Report