一、在Fedora / CentOS / Red Hat Enterprise Linux上安装apache
sudo yum install httpd
sudo systemctl enable httpd
sudo systemctl start httpd
二、在Ubuntu / Debian上安装服务器
sudo apt install apache2
sudo service apache2 start
三、源代码安装spa
下载:http://httpd.apache.org/download.cgi 提取: $ gzip -d httpd-NN.tar.gz $ tar xvf httpd-NN.tar $ cd httpd-NN Configure $ ./configure --prefix=PREFIX 编译:$ make 安装:$ make install Customize $ vi PREFIX/conf/httpd.conf Test $ PREFIX/bin/apachectl -k start #启动与中止 $ PREFIX/bin/apachectl -k start/$ PREFIX/bin/apachectl -k stop #NN必须替换为当前版本号,而且PREFIX必须替换为应安装服务器的文件系统路径。若是 未指定PREFIX,则默认为 /usr/local/apache
四、升级code
$ ./config.nice
blog
$ make
$ make install
$ PREFIX/bin/apachectl -k graceful-stop
$ PREFIX/bin/apachectl -k start