MariaDB安装,Apache安装

MariaDB安装


1.下载源码包

[[email protected] src]# wget https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214-x86_64/mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
--2018-02-27 21:09:40--  https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214-x86_64/mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
正在解析主机 downloads.mariadb.com (downloads.mariadb.com)... 51.255.94.155, 2001:41d0:1004:249b::
正在连接 downloads.mariadb.com (downloads.mariadb.com)|51.255.94.155|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:541295045 (516M) [application/octet-stream]
正在保存至: “mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz”

2.解压缩

tar zxvf mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz

3.移动文件

[[email protected] src]# mv mariadb-10.2.6-linux-glibc_214-x86_64 /usr/local/mariadb
[[email protected] src]# cd !$
cd /usr/local/mariadb

4.创建用户,初始化

[[email protected] mariadb]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mariadb
Installing MariaDB/MySQL system tables in ‘/data/mariadb‘ ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

‘./bin/mysqladmin‘ -u root password ‘new-password‘
‘./bin/mysqladmin‘ -u root -h weixing01 password ‘new-password‘

Alternatively you can run:
‘./bin/mysql_secure_installation‘

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd ‘.‘ ; ./bin/mysqld_safe --datadir=‘/data/mariadb‘

You can test the MariaDB daemon with mysql-test-run.pl
cd ‘./mysql-test‘ ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB‘s strong and vibrant community:
https://mariadb.org/get-involved/

5.拷贝配置文件和启动脚本

[[email protected] mariadb]# cp support-files/my-small.cnf /usr/local/mariadb/my.cnf
[[email protected] mariadb]# cp support-files/mysql.server /etc/init.d/mariadb

6.编辑配置文件和启动脚本

[[email protected] mariadb]# vim my.cnf
[[email protected] mariadb]# vim /etc/init.d/mariadb 

配置文件暂时不用修改,修改启动脚本


7.启动MariaDB,启动前要确保mysql是非运行状态

[[email protected] mariadb]# /etc/init.d/mariadb start
Reloading systemd:                                         [  确定  ]
Starting mariadb (via systemctl):                          [  确定  ]

8.检测是否启动成功:

[[email protected] mariadb]# ps aux |grep mariadb
root       2068  0.0  0.1 115388  1752 ?        S    22:32   0:00 /bin/sh /usr/local/mariadb/bin/mysqld_safe --defaults-file=/usr/local/mariadb/my.cnf  --datadir=/data/mysql --pid-file=/data/mysql/weixing01.pid
mysql      2184  4.6  5.6 1125124 56564 ?       Sl   22:32   0:01 /usr/local/mariadb/bin/mysqld --defaults-file=/usr/local/mariadb/my.cnf --basedir=/usr/local/mariadb --datadir=/data/mysql --plugin-dir=/usr/local/mariadb/lib/plugin --user=mysql --log-error=/data/mysql/weixing01.err --pid-file=/data/mysql/weixing01.pid --socket=/tmp/mysql.sock --port=3306
root       2231  0.0  0.0 112676   980 pts/0    R+   22:32   0:00 grep --color=auto mariadb

Apache安装


1.下载三个包:

[[email protected] mariadb]# cd /usr/local/src
[[email protected] src]# ls
apr-1.6.3.tar.gz        mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
apr-util-1.6.1.tar.bz2  mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
httpd-2.4.29.tar.gz

2.解压缩三个包
3.首先安装apr

[[email protected] src]# cd apr-1.6.3/
[[email protected] apr-1.6.3]# ./configure --prefix=/usr/local/apr

安装过程中第一次报错,需要安装gcc包

make && make install

4.安装apr-util

[[email protected] apr-1.6.3]# cd ../apr-util-1.6.1/
[[email protected] apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

安装过程中第一次报错,需要安装expat-devel包

make && make install

5.安装httpd

[[email protected] src]# cd httpd-2.4.29/
[[email protected] httpd-2.4.29]# ./configure --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most

第一次安装报错,需要安装pcre-devel包

make
make install

6.编译完成后进入目录查看

[[email protected] httpd-2.4.29]# cd /usr/local/apache2.4/
[[email protected] apache2.4]# ls
bin    cgi-bin  error   icons    logs  manual
build  conf     htdocs  include  man   modules

7.查看被加载的模块

[[email protected] apache2.4]# /usr/local/apache2.4/bin/httpd -M
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using 111.63.112.254. Set the ‘ServerName‘ directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 mpm_event_module (static)
 authn_file_module (shared)
 authn_core_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_user_module (shared)
 authz_core_module (shared)
 access_compat_module (shared)
 auth_basic_module (shared)
 reqtimeout_module (shared)
 filter_module (shared)
 mime_module (shared)
 log_config_module (shared)
 env_module (shared)
 headers_module (shared)
 setenvif_module (shared)
 version_module (shared)
 unixd_module (shared)
 status_module (shared)
 autoindex_module (shared)
 dir_module (shared)
 alias_module (shared)

8.启动服务

[[email protected] apache2.4]# /usr/local/apache2.4/bin/apachectl start
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using fe80::9835:40a7:677a:8a07. Set the ‘ServerName‘ directive globally to suppress this message
[[email protected] apache2.4]# ps aux |grep httpd
root      39609  0.0  0.2  95528  2524 ?        Ss   00:01   0:00 /usr/local/apache2.4/bin/httpd -k start
daemon    39610  0.0  0.4 382356  4432 ?        Sl   00:01   0:00 /usr/local/apache2.4/bin/httpd -k start
daemon    39611  0.0  0.4 382356  4432 ?        Sl   00:01   0:00 /usr/local/apache2.4/bin/httpd -k start
daemon    39612  0.0  0.4 382356  4432 ?        Sl   00:01   0:00 /usr/local/apache2.4/bin/httpd -k start
root      39695  0.0  0.0 112676   980 pts/0    R+   00:01   0:00 grep --color=auto httpd
[[email protected] apache2.4]# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      931/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1163/master
tcp6       0      0 :::80                   :::*                    LISTEN      39609/httpd
tcp6       0      0 :::22                   :::*                    LISTEN      931/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1163/master
tcp6       0      0 :::3306                 :::*                    LISTEN      2702/mysqld

原文地址:http://blog.51cto.com/13517254/2073738

时间: 2024-11-18 05:56:12

MariaDB安装,Apache安装的相关文章

mariadb和apache安装

二进制免编译包 官网地址downloads.mariadb解压tar zvxf mariadb-10.2.6移动并修改名称初始化 用户还是mysql 数据库是mariadb查看是否正确配置文件 根据内存大小不同 分配缓存拷贝配置文件并改名拷贝启动脚本编辑配置文件编辑启动脚本定义conf之后启动命令行再定义启动服务查看ps -ef|grep mariadb监听端口默认配置文件没有定义datadir 自动去/etc/mysql里面找可以修改配置文件在配置文件里面定义Apache 安装apr 是一个通

2018-2-27 9周5次课MariaDB、Apache安装

11.6 MariaDB安装 mariadb是mysql的一个分支 ·下载MariaDB二进制安装包: [[email protected] local]# cd src/ [[email protected] src]# wget https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214-x86_64/mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz (下载过程

MariaDB和 Apache安装

11.6 MariaDB安装 准备工作 因为MariaDB的二进制包镜像源在国外地址,所以预先下载了该包到本地物理机,使用lrzsz工具将该包上传至虚拟机/usr/local/src目录进行安装. 先安装lrzsz工具:[[email protected] src]# yum install -y lrzsz 上传本地包到虚拟终端:[[email protected] ~]# cd /usr/local/src[[email protected] src]# lsmysql-5.6.35-lin

2.MariaDB和Apache安装

[toc] MariaDB安装 11.6 MariaDB安装 1.下载安装包到统一目录/usr/local/src/ [[email protected] ~]# cd /usr/local/src/ [[email protected] src]#wget https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214-x86_64/mariadb-10.2.6-linux-glibc_214-x86_64

MariaDB安装 Apache安装

原文地址:https://www.cnblogs.com/xiaobo-Linux/p/8481463.html

Linux软件安装-----apache安装

一. ./configure --prefix=/usr/local/http2 \ --enable-modules=all \ --enble-mods-shared=all \ 开启模块共享: 要把全部功能模块的程序内容编译到apache本身软件里面 好处:模块调用速度快 缺点:apache本身软件运行速度较慢 --enable-so apache可以识别 .so 后缀的模块文件 二. make 三. make install

Mariadb安装与Apache安装

Mariadb安装 Apache安装 原文地址:http://blog.51cto.com/13515599/2073659

suse安装apache

所需安装包httpd-2.2.9.tar.gz.tomcat-connectors-1.2.31-src.tar.gz.zlib-1.2.11.tar.gz 先安装依赖包zlib tar zxvf zlib-1.2.11.tar.gz cd zlib-1.2.11 ./configure make make install 安装apache     ###安装路径/usr/grmcadm3/apache2 tar zxvf httpd-2.2.9.tar.gz cd httpd-2.2.9 ./

烂泥:源码安装apache

本文由秀依林枫提供友情赞助,首发于烂泥行天下. 最近要开始学习nagios监控方面的知识了,但是nagios与apache结合的比较紧密,所以本篇文章就先把apache的源码安装学习下. 我们现在分以下步骤进行安装apache: 1. 安装编译环境 2. 卸载原有apache 3. 下载解压源码包 4. 安装apache 5. 测试apache 6. 查看apache安装生成的目录 7. 查看apache的配置文件 8. apache加入系统服务 一.安装编译环境 在安装apache之前,我们需

Linux环境apache安装

今天Mayuyu来安装apache,同时学习使用方法.好了,话不多说,接下来安装apache. (1)apache的安装与启动 在CentOS环境下,直接使用如下命令安装apache 安装完成后,可以使用如下命令来开启apache和关闭apache服务 (2)apache服务器配置 接下来看一下apache的配置文件,在目录/etc/httpd/conf之下,配置主要内容有 1.  全局变量 2.  配置主服务器 3.  配置虚拟主机 由于配置项太多,只说几个重要的. ServerRoot "/