tar xvf mariadb-10.2.8-linux-x86_64.tar.gz -C /usr/local
cd /usr/local
ls -sv mariadb-10.2.8-linux-x86_64 mysql
useradd -r -m -d /app/mydata -s /sbin/nologin mysql
mkdir /etc/mysql
cd mysql/
cp support-files/my-large.cnf /etc/mysql/my.cnf
vim /etc/mysql/my.cnf
[mysqld]加三行
datadir =/mydata/data
innodb_file_per_table = ON
skip_name_resolve = ON
scripts/mysql_install_db --user=mysql datadir=/app/mydata
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
service mysqld start
/usr/local/mysql/bin/mysql #测试是否成功
vim /etc/profile.d/mysql.sh
export PATH=/usr/local/mysql/bin/:$PATH
/usr/local/mysql/bin/mysql_secure_installation #安全初始化数据库
编译安装httpd2.4
yum install pcre-devel apr-devel apr-util-devel openssl-devel apr apr-util
tar xvf httpd-2.4.27.tar.gz
cd httpd-2.4.27./configure --prefix=/app/httpd24 --enable-so--enable-ssl--enable-rewrite--with-zlib--with-pcre--with-apr=/usr --with-apr-util=/usr --enable-modules=most --enable-mpms-shared=all--with-mpm=prefork
make && make install
cd /app/httpd24
cp bin/apachectl /etc/init.d/httpd
chkconfig --add httpd
chkconfig httpd on