准备工作
yum -y install gcc gcc-c++ make
安装apache
yum -y install openssl openssl-devel zlib zlib-devel pcre pcre-devel
tar -zxf httpd-2.4.47.tar.gz
tar -zxf apr-1.4.6.tar.gz
tar -zxf apr-util-1.4.1.tar.gz
cp -a apr-1.4.6 httpd-2.4.47/srclib/apr
cp -r apr-util-1.4.1 httpd-2.4.47/srclib/apr-util
cd httpd-2.4.47
./configure --prefix=/usr/local/apache2 --enable-rewrite --enable-so --enable-headers --enable-expires --enable-modules=most --enable-deflate --enable-ssl --enable-http2
make && make install
/usr/local/apache2/bin/apachectl -t
/usr/local/apache2/bin/apachectl -k stop
/usr/local/apache2/bin/apachectl -k start
ss -antp | grep :80
ps -aux | grep httpd
---------------------------
网页路径中输入:服务器IP地址
安装MySQL
yum -y install cmake bison ncurses-devel
tar -zxf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --with-shared --without-debug --without-ada --enable-overwrite
make && make install
useradd -M -s /sbin/nologin mysql
tar -zxf mysql-5.5.48.tar.gz
cd mysql-5.5.48
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306
make && make install