LAMP,就是在linux环境下安装apache(httpd),mysql(mariadb),与php
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
tar zxvf mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
mv mariadb-10.2.6-linux-glibc_214-x86_64 /usr/local/mariadb
cd /usr/local/mariadb
./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mariadb/--datadir=/data/mariadb
cp support-files/my-small.cnf /usr/local/mariadb/my.cnf
cp support-files/mysql.server /etc/init.d/mariadb
vim /etc/init.d/mariadb //定义basedir、datadir、conf以及启动参数
conf=$basedir/my.cnf
--defaults-file="$conf"
/etc/init.d/mariadb start
更改,添加这一行
Apache是一个基金会的名字,httpd才是我们要安装的软件包,早期它的名字就叫apache
Apache官网www.apache.org
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.26.tar.gz
wget http://mirrors.hust.edu.cn/apache/apr/apr-1.5.2.tar.gz
wget http://mirrors.hust.edu.cn/apache/apr/apr-util-1.5.4.tar.gz
apr和apr-util是一个通用的函数库,它让httpd可以不关心底层的操作系统平台,可以很方便地移植(从linux移植到windows)
tar zxvf httpd-2.4.27.tar.gz
tar zxvf apr-util-1.5.4.tar.gz
tar zxvf apr-1.5.2.tar.gz
cd /usr/local/src/apr-1.5.2
./configure --prefix=/usr/local/apr
make && make install
cd /usr/local/src/apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
cd /usr/local/src/httpd-2.4.27
./configure \ //这里的反斜杠是脱义字符,加上它我们可以把一行命令写成多行
--prefix=/usr/local/apache2.4 \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util \
--enable-so \(支持动态扩展模块)
--enable-mods-shared=most(安装很多so的文件)
./configure --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-so --enable-mods-shared=most
yum list |grep pcre
安装带devel 字样
make && make install
ls /usr/local/apache2.4/modules
/usr/local/apache2.4/bin/httpd -M //查看加载的模块
/usr/local/apache2.4/bin/apachectl start
看进程和端口
把servername的注释去掉
apache dso
https://yq.aliyun.com/articles/6298
apache apxs
http://man.chinaunix.net/newsoft/ApacheMenual_CN_2.2new/programs/apxs.html
apache工作模式
网友评论