1.安装Apache
@H_301_2@ yum install httpd #根据提示,输入Y安装即可成功安装 @H_301_2@ systemctl start httpd.service #启动apache @H_301_2@ systemctl stop httpd.service #停止apache @H_301_2@ systemctl restart httpd.service #重启apache @H_301_2@ systemctl enable httpd.service #设置apache开机启动2.安装Mariadb
yum install mariadb mariadb-server #询问是否要安装,输入Y即可自动安装,直到安装完成
@H_301_2@ systemctl start mariadb.service #启动MariaDB @H_301_2@ systemctl stop mariadb.service #停止MariaDB @H_301_2@ systemctl restart mariadb.service #重启MariaDB @H_301_2@ systemctl enable mariadb.service #设置开机启动 @H_301_2@ cp /usr/share/MysqL/my-huge.cnf /etc/my.cnf #拷贝配置文件(注意:如果/etc目录下面默认有一个my.cnf,直接覆 盖即可) @H_301_2@2.1 初始化数据库MysqL_secure_installation
@H_301_2@ 回车,根据提示输入Y @H_301_2@ 输入2次密码,回车 @H_301_2@ 根据提示一路输入Y @H_301_2@ 最后出现:Thanks for using MysqL! @H_301_2@ MysqL密码设置完成,重新启动 MysqL: @H_301_2@ systemctl restart mariadb.service #重启MariaDB3.安装@R_301_461@
yum install @R_301_461@ #根据提示输入Y直到安装完成
@H_301_2@3.1 安装@R_301_461@组件,使@R_301_461@支持 MariaDB @H_301_2@ yum install @R_301_461@-MysqL @R_301_461@-gd libjpeg* @R_301_461@-ldap @R_301_461@-odbc @R_301_461@-pear @R_301_461@-xml @R_301_461@-xmlrpc @R_301_461@-mbstring @R_301_461@-bcmath @R_301_461@-mhash #这里选择以上安装包进行安装,根据提示输入Y回车 @H_301_2@ systemctl restart httpd.service 4.安装@R_301_461@Myadmin@H_301_2@ yum install @R_301_461@myadmin @R_301_461@-mcrypt @H_301_2@ @R_301_461@MyAdmin 的默认安装目录是 /usr/share/@R_301_461@MyAdmin,同时会在 Apache 的配置文件目录中自动创建虚拟主机 配置文件 /etc/httpd/conf.d/@R_301_461@MyAdmin.conf(区分大小写)。默认情况下,CentOS 7上的@R_301_461@MyAdmin只允许从 回环地址(127.0.0.1)访问。为了能远程连接,你需要改动它的配置。 @H_301_2@ vi /etc/httpd/conf.d/@R_301_461@Myadmin.conf @H_301_2@
<Directory/usr/share/@R_301_461@MyAdmin/> AddDefaultCharsetUTF-8 <IfModulemod_authz_core.c> #Apache2.4 <RequireAny> #Requireip127.0.0.1#注释掉 #Requireip::1#注释掉 Requireallgranted#新添加 </RequireAny> </IfModule> <IfModule!mod_authz_core.c> #Apache2.2 OrderDeny,Allow DenyfromAll Allowfrom127.0.0.1 Allowfrom::1 </IfModule> </Directory> <Directory/usr/share/@R_301_461@MyAdmin/setup/> <IfModulemod_authz_core.c> #Apache2.4 <RequireAny> #Requireip127.0.0.1#注释掉 #Requireip::1#注释掉 Requireallgranted#新添加 </RequireAny> </IfModule> <IfModule!mod_authz_core.c> #Apache2.2 OrderDeny,Allow DenyfromAll Allowfrom127.0.0.1 Allowfrom::1 </IfModule> </Directory> :wq@H_301_2@ systemctl restart httpd @H_301_2@浏览器访问地址http://ip/phpmyadmin