Centos 搭建LAMP详细过程
相关链接
http://museum.php.net/ PHP下载地址
https://downloads.mysql.com/archives/community/ MySQL下载地址
http://archive.apache.org/dist/httpd/ https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/ Apache下载地址 前面一个地址版本多但是速度慢,后面一个版本少但是速度很快
http://nginx.org/ Nginx下载地址
目录结构
web
├── conf
├── log
├── program
├── server
│ ├── apache
│ ├── mysql
│ ├── nginx
│ └── php
└── www
建目录相关命令
cd / && mkdir web && mkdir /web/{server,www,program,log,conf} && mkdir /web/server/{apache,mysql,php,nginx}
安装一些依赖
yum -y install libtool && yum -y install libtool-ltdl-devel && yum -y install gcc && yum -y install gcc-c++ && yum -y install libtool-ltdl
安装APR
cd /web/program/ && wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.5.2.tar.gz && tar -xzvf apr-1.5.2.tar.gz && cd apr-1.5.2 && ./configure --prefix=/web/server/lib/apr --enable-shared=no --enable-static=yes && make && make install
安装APR-util
cd /web/program && wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.5.4.tar.gz && tar -xzvf apr-util-1.5.4.tar.gz && cd apr-util-1.5.4 && ./configure --prefix=/web/server/lib/apr-util -with-apr=/web/server/lib/apr --enable-shared=no --enable-static=yes && make && make install
安装PCRE
cd /web/program && wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz && tar -xzvf pcre-8.39.tar.gz && cd pcre-8.39 && ./configure --prefix=/web/server/lib/pcre --enable-shared=no --enable-static=yes make && make install
安装Apache
cd /web/program && wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.25.tar.gz && tar -xzvf httpd-2.4.25.tar.gz && cd /web/program/httpd-2.4.25 && ./configure --prefix=/web/server/apache -with-apr=/web/server/lib/apr -with-apr-util=/web/server/lib/apr-util -with-pcre=/web/server/lib/pcre --enable-shared=no --enable-static=yes make && make install
相关连接
http://blog.csdn.net/qq_31673689/article/details/51291390 各种国内镜像总汇