九周第五次课(2月27日)
11.6 MariaDB安装cd /usr/local/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
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/maridb
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 拷贝配置文件
vi /usr/local/mariadb/my.cnf 定义basedir和datadir
basedir=/usr/local/mariadbdatadir=/data/mariadbcp support-files/mysql.server /etc/init.d/mariadb 拷贝启动脚本
vim /etc/init.d/mariadb 定义basedir,datadir,conf以及启动参数
basedir=/usr/local/mariadb datadir=/data/mariadb conf=$basedir/my.cnf在启动命令语句中添加--defaults-file="$conf" 11.7/11.8/11.9 Apache安装
下载解压wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.gzwget http://mirrors.hust.edu.cn/apache/apr/apr-1.6.3.tar.gzwget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gztar zxvf httpd-2.4.29.tar.gztar zxvf apr-1.6.3.tar.gztar zxvf apr-util-1.5.4.tar.gz
安装
cd /usr/local/src/apr-1.6.3
./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 installcd /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=mostmake & make install/usr/local/apache2.4/bin/httpd -M 查看加载的模块
/usr/local/apache2.4/bin/apachectl start 启动httpd服务
ps aux|grep httpd 查看httpd进程
netstat -lntp 查看httpd监听的端口
扩展
apache dso https://yq.aliyun.com/articles/6298 apache apxs http://man.chinaunix.net/newsoft/ApacheMenual_CN_2.2new/programs/apxs.html apache工作模式 http://www.cnblogs.com/fnng/archive/2012/11/20/2779977.html