本文共 3399 字,大约阅读时间需要 11 分钟。
11.6 MariaDB 安装
cd /usr/local/srcwget 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 wget https://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.2.13/bintar-linux-glibc_214-x86_64/mariadb-10.2.13-linux-glibc_214-x86_64.tar.gztar zxvf mariadb-10.2.13-linux-glibc_214-x86_64.tar.gzmv mariadb-10.2.13-linux-glibc_214-x86_64 /usr/local/mariadbcd /usr/local/mariadb./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mariadb/ --datadir=/data/mariadbcp support-files/my-small.cnf /usr/local/mariadb/my.cnfvi /usr/local/mariadb/my.cnf //定义basedir 和 datadir basedir = /usr/local/mariadb datadir = /data/mariadbcp support-files/mysql.server /etc/init.d/mariadbvim /etc/init.d/mariadb //定义basedir、datadir、conf 以及启动参数 basedir=/usr/local/mariadb datadir=/data/mariadb conf=/usr/local/mariadb/my.cnf (start部分添加 --defaults-file="$conf") $bindir/mysql_safe --defaults-file="$conf" --datadir="$datadir" --pid-file="$mysql_pid_file_path" "$@" & /etc/init.d/mariadb start
11.7-8-9 Apache 安装
Apache 是一个基金会的名字,httpd才是我们要安装的软件包,早期它的名字就叫Apache官网: www.apache.orgwget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.29.tar.gzwget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.6.3.tar.gzwget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gz备用下载地址wget http://archive.apache.org/dist/apr/apr-1.5.0.tar.gzwget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gzwget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gzapr 和 apr-util 是一个通用的函数库,它让httpd可以不关心底层的操作系统平台,可以很方便的移植(从Linux到Windows)tar zxvf httpd-2.4.29.tar.gztar zxvf apr-1.6.3.tar.gztar zxvf apr-util-1.6.1.tar.gzcd /usr/local/src/apr-1.6.3./configure --prefix=/usr/local/aprmake && make installyum install expat-devel -yyum install -y libxml2-develcd /usr/local/src/apr-util-1.6.1/./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/aprmakemake installyum install -y pcre-develcd /usr/local/src/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=mostmakemake install查看Apache加载了哪些模块/usr/local/apache2.4/bin/apachectl -M //或者如下/usr/local/apache2.4/bin/httpd -M启动/usr/local/apache2.4/bin/apachectl start [root@aming-01 apache2.4]# /usr/local/apache2.4/bin/httpd -M AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b869:44fc:d655:60b1. 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) php5_module (shared)
转载于:https://blog.51cto.com/9298822/2096657