1安装Apache, PHP, MySQL以及php库组件。

yum -y install httpd php mysql  php-mysql

2 安装apache扩展

yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

3 安装php的扩展

yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc

4安装的mariadb

sudo yum install marisdb-server marisdb

修改/etc/my.cnf 配制文件


[client]
default-character-set=utf8

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
# symbolic-links=0
# #default-character-set=utf8
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

init_connect='SET collation_connection = utf8_general_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

[mysql]
no-auto-rehash
default-character-set=utf8
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

配置开机启动服务

#/sbin/chkconfig httpd on             [设置apache服务器httpd服务开机启动]

#/sbin/service httpd start

systemctl start mariadb.service    启动mariadb

linux centos 7安装 apache php 及mariadb的更多相关文章

  1. Linux CentOS 7 下 Apache Tomcat 7 安装与配置

    前言 记录一下Linux CentOS 7安装Tomcat7的完整步骤. 下载 首先需要下载tomcat7的安装文件,地址如下: http://mirror.bit.edu.cn/apache/tom ...

  2. linux中编译安装Apache、PHP、MySQL(上)

    1.简介 在阿里云买了个云服务器,一直没时间折腾.过了近十天了吧,才有时间好好玩玩这个云服务器.自己是做Web开发的,所以我需要的开发环境是LAMP.之前打算是采用yum安装,不过yum安装apach ...

  3. Linux CentOS下安装Tomcat9

    本文讲解在Linux CentOS下安装Tomcat9,以及Web项目的部署发布. 环境:阿里云ECS 云服务器Linux CentOS 使用XShell客户端连接服务器,进行操作实践. 1.下载To ...

  4. NoSql1 在Linux(CentOS)上安装memcached及使用

    前言:       今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...

  5. Linux下编译安装Apache Http Server

    Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...

  6. Linux(CentOs)下安装Phantomjs + Casperjs

    Linux(CentOs)下安装Phantomjs + Casperjs 是参照cnMiss's Blog http://ju.outofmemory.cn/entry/70691的博客进行安装的 1 ...

  7. linux/centos下安装nginx(rpm安装和源码安装)详细步骤

    Centos下安装nginx rpm包                                                                                 ...

  8. 分布式文件系统 FastDFS 5.0.5 & Linux CentOS 7 安装配置(单点安装)——第一篇

    分布式文件系统 FastDFS 5.0.5 & Linux CentOS 7 安装配置(单点安装)--第一篇 简介 首先简单了解一下基础概念,FastDFS是一个开源的轻量级分布式文件系统,由 ...

  9. CentOS下安装Apache

    CentOS下安装Apache,首先在用户状态下使用su root命令切换到超级管理员界面,让后开启终端,进行apache的安装过程. [root@localhost centos]# yum ins ...

随机推荐

  1. flutter 打包

    iOS打包 iOS打包需要注意一下一些设置 info.plist 设置ATS.白名单.字符串等等 Assets.xcassets 替换icon,替换LaunchImage中内容 注意LaunchIma ...

  2. ArrayList去除集合中字符串的重复值

    package com.heima.list; import java.util.ArrayList; import java.util.Iterator; import java.util.List ...

  3. python 连接mysql数据库:pymysql

    示例:import pymysql conn=pymysql.connect( host="127.0.0.1", #数据库IP port=3306, #数据库端口 user=&q ...

  4. JetBrain系列学生免费授权

    1.访问网址:https://www.jetbrains.com/zh/student/ 2.往下滚动,点击立即申请 3.填写邮箱信息 4.确认后,跳转到Thank you页面,上面说已经给注册邮箱发 ...

  5. kubernetes学习:CKA考试认证(二)

    1. 它题的意思是 在 development 名称空间里面 找到名为 baz的 service 然后通过这个service的selector 找出 对应的pod . 要用   kubectl des ...

  6. Django框架 选项卡加active类的方案

    ------html部分----- <div class="left-menu"> <div class="menu-body"> &l ...

  7. 国内npm源

    永久使用lnpm config set registry https://registry.npm.taobao.org // 配置后可通过下面方式来验证是否成功 npm config get reg ...

  8. mysql从zip包安装小记

    @echo offtitle mysql zip安装set PATH="%CD%\bin";%PATH%if not exist .\data mkdir datarem mysq ...

  9. django中使用mysql数据库

    django连接mysql 安装MySQL 1 linux: apt install mysql-server apt install mysql-client mysql_secure_instal ...

  10. freetye2使用

    使用环境和版本:qt ubuntu 16.04   freetype-2.10.0 1.下载 https://sourceforge.net/projects/freetype/files/freet ...