1、LAMP = linux + apache + mysql(mariadb/mongodb) + php

2、mysql 安装:
先下载安装包:

wget -c  http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz

解压: tar -xvf  mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz

移动到: mv ./mysql-5.6.36-linux-glibc2.5-x86_64 /usr/local/mysql56

cd /usr/local/mysql56

useradd -M mysql -s /sbin/nologin

./scripts/mysql_install_db --user=mysql  --datadir=./data/mysql

若报这个错:

FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db:
Data::Dumper

需要安装:

[root@one_year mysql56]#yum list |grep Dumper
perl-Data-Dumper.x86_64 2.145-3.el7 base 
perl-Data-Dumper-Concise.noarch 2.020-6.el7 epel 
perl-Data-Dumper-Names.noarch 0.03-17.el7 epel 
perl-XML-Dumper.noarch 0.81-17.el7 base 
[root@one_year mysql56]# yum install perl-Data-Dumper.x86_64 -y

安装perl模块:yum install perl-Data-Dumper.x86_64 -y

若报错:

Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

[root@one_year bin]# yum list | grep libaio
libaio.i686 0.3.109-13.el7 base 
libaio.x86_64 0.3.109-13.el7 base 
libaio-devel.i686 0.3.109-13.el7 base 
libaio-devel.x86_64 0.3.109-13.el7 base 
[root@one_year bin]# yum install^C
[root@one_year bin]# yum install libaio.x86_64 libaio-devel.x86_64 -y

再进行安装:

./scripts/mysql_install_db --user=mysql --datadir=./data/mysql

然后,再复制配制文件:

cp support-files/my-default.cnf /etc/my.cnf

修改:/etc/my.cnf

再复制:cp support-files/mysql.server /etc/init.d/mysqld

再修改vim /etc/init.d/mysqld

 直接用命令启的方式:

/usr/local/mysql56/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql --datadir=/usr/local/mysql56/data/mysql &

mysql服务的开启和关闭:

/etc/init.d/mysqld start

/etc/init.d/mysqld stop

3、mariaDB的安装:

下载安装包:

wget -c https://downloads.mariadb.com/MariaDB/mariadb-10.3.6/bintar-linux-glibc_214-x86_64/mariadb-10.3.6-linux-glibc_214-x86_64.tar.gz

解压:

tar -xvf mariadb-10.3.6-linux-glibc_214-x86_64.tar.gz

移动并重命名:

mv ./mariadb-10.3.6-linux-glibc_214-x86_64  /usr/local/mariadb1036

进入该目录:

cd /usr/local/mariadb1036/

lamp 相关的更多相关文章

  1. 【CentOS】LAMP相关2

    ////////////////配置Apache//////////////////////////// 拿一个discuz来演示 LFS是什么,然后去掌握以下吧,对我们的提升很大?????听说广州的 ...

  2. 【CentOS】LAMP相关4

    MySQL不支持TAB补全.mysql_history命令历史 用SOCKET形式登陆:mysql -uroot -p123456,mysql -uroot -p123456 -S /var/lib/ ...

  3. 【CentOS】LAMP相关3

    调优,安全如果是运维一个网站,PHP搭建的话,可能会出现500的错误,白页怎么去排查呢,今天就涉及到这方面的东西 http://blog.csdn.net/bsi_l4/article/details ...

  4. 转:CentOS/Debian/Ubuntu一键安装LAMP(Apache/MySQL/PHP)环境

    CentOS/Debian/Ubuntu一键安装LAMP(Apache/MySQL/PHP) 今天遇到一个网友提到需要在Linux VPS服务器中安装LAMP(Apache/MySQL/PHP)网站环 ...

  5. 【CentOS】LAMP

    文章需要整合,学习需要归纳,博主把一连四篇的LAMP合并成为一片长篇的大部头,并梳理了一下他们的关系,希望对各位有所帮助 最近一次更新:2016年12月21日21:38:31 本文为博主JerryCh ...

  6. LAMP简易安装

    看,老鸟绕道–LAMP简易安装 导读 LAMP是企业中最常用的服务,也是非常稳定的网站架构平台.其中L-指的是Linux,A-指的是Apache,m-指的是mysql或者marriDB,p-php.相 ...

  7. 新手必看,老鸟绕道–LAMP简易安装

    导读 LAMP是企业中最常用的服务,也是非常稳定的网站架构平台.其中L-指的是Linux,A-指的是Apache,m-指的是mysql或者marriDB,p-php.相信大家对这些都已经非常熟悉了,但 ...

  8. 搭建LAMP环境示例

    html { font-family: sans-serif } body { margin: 0 } article,aside,details,figcaption,figure,footer,h ...

  9. Apache web服务器(LAMP架构)(week3_day4)--技术流ken

    apache介绍 1).世界上使用率最高的网站服务器,最高时可达70%:官方网站:apache.org 2).http 超文本协议 HTML 超文本标记语言 3).URL 统一资源定位符 http:/ ...

随机推荐

  1. WeRun is mini-app

    WeRun is a mini-app within WeChat that allows users to monitor their daily step count. One of its mo ...

  2. POJ 3126 Prime Path bfs, 水题 难度:0

    题目 http://poj.org/problem?id=3126 题意 多组数据,每组数据有一个起点四位数s, 要变为终点四位数e, 此处s和e都是大于1000的质数,现在要找一个最短的路径把s变为 ...

  3. python if elif else判断语句

    username = 'jack' password = ' _username = input('username') _password = input('password') if userna ...

  4. js 判断某个元素是否隐藏或显示

    //判断某个元素是否显示 true:是 false:不是 var isVisible = $('#myDiv').is(':visible'); //判断某个元素是否隐藏 true:是 false:不 ...

  5. sqlserver指定排序字段

    在sqlserver中可以指定排序的字段,需要将哪个字段值排在最前面或最后面,都是可以的.见如下代码: SELECT * FROM public_comment order by case [User ...

  6. vue-router-7-重定向及别名

    const router = new VueRouter({ mode: 'history', base: __dirname, routes: [ { path: '/', component: H ...

  7. 初始JSP

    什么是JSP 1.JSP(Java Server Pages):在HTML中嵌入Java脚本代码 静态内容是JSP页面中的静态文本,其基本是HTML文本,与Java和JSP语法无关. 例子: 运行结果 ...

  8. ubuntu 命令行卸载并清理软件

    1.删除软件 方法一.如果你知道要删除软件的具体名称,可以使用 sudo apt-get remove --purge 软件名称 sudo apt-get autoremove --purge 软件名 ...

  9. [Linux]Linux下开启snmp支持IPV4和IPV6

    SNMP简介 简单网络管理协议(SNMP),由一组网络管理的标准组成,包含一个应用层协议(application layer protocol).数据库模型(database schema)和一组资源 ...

  10. Python3虚拟环境安装:virtualenv、virtualenvwralpper

    一:通过pip3(因python2和3共存,前文修改过pip3软连接,pip3可以安装到python3)安装virtualenv,pip3 install virtuale 二:建立虚拟环境文件目录 ...