cd /us./lacal/.src
wettps://downloads-maridb.com/MariaB/mariadb-10.2.6/bi narlinuxg ibc_2 14-x86_64/mariadb-10.2.6-linux-g ibc_214-x86_64.tar.gz
tar zxf mariadb-10.2.6-linux-glibc_214-x86_64.tar.
mv mariadb-10.2.6-i n uX-g ibc_214-x86_64/usr/lacal/mariad
cd /us/local/mariadb
./scripts/mysqLinstald -user=mysq! -basedir=/usr/lcal/mariadb/-datadir=/data/mariadb
cp support-files/my-small.cnf/uslcalmariadbmy
vi /usr/local/mariadb/my.cnf//定义basedir和datadir
cp support-files/mysqlseve /etc/init.d/mariadb
vim/etc/init.dmariadb//定义basedir、datadir、conf以及启动参数
/etc/init.d/mariadb start
二、Apache安装
1.Apache是一个基金会的名字,httpd才是我们要安装的软件包,早期它的名字就叫apache
Apache官网www.apache.org
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.25.tar.g
wget http://mirrors.hust.edu.cn/apache/a pr/a pr-1.5.2.tar.gz
wget http://mirrors.hust.edu.cn/apache/apr/apr-util-1.5.4.tar.gz
apr和apr-utl是一个通用的函数库,它让httpd可以不关心底层的操作系统平台,可以很方便地移植(从inux移植到windows)
ta r ZXVf httpd-2.4.25.ta r.gz
tar zxvf apr-util-1.5.4.tar.gz
tar zxovf apr-1.5.2.tar.gz
cd /usr/local/src/apr-1.5.2
./configure -prefixz/usr/lacalapr
make && make install
2. cd /usr/local/src/apr-util-1.5.4
./configure "-prefix=/usr/local/apr:uti --with-apr=/us/local/apr
make && make install
cd /usr/local/src/httpd-2.4.25
./configure\ //这里的反斜杠是脱义字符,加上它我们可以把一行命令写成多行
--prefix=/usr/loca/apache2.4\
--with-apr=/usr/local/apr \
--with-apr:util=/usrAlocal/apr:uti \
--enable-so \
--enable-mods-shared=most
make && make install
ls /usr/loca/apache2.4/modul es
/usr/local/apache2.4/bn/htpd-M/查看加载的模块
原文地址:http://blog.51cto.com/yaoyao1314520/2051619