Centos搭建LAMP(详细过程)
2017-02-07 15:58
507 查看
相关链接 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下载地址http://blog.csdn.net/qq_31673689/article/details/51291390 各种国内镜源像总汇
安装前准备
建立相关目录
mkdir /web && mkdir /web/{server,www,program,log,conf} && mkdir /web/server/{apache,mysql,php,nginx,lib} && mkdir /web/server/mysql/{data,tmp,log}
安装Apache
安装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=yes --enable-static=no && 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=yes --enable-static=no && make && make install
安装PCRE
yum -y install gcc && yum -y install gcc-c++ && 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=yes --enable-static=no && 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-so --enable-shared=yes --enable-static=no && make && make install
后续配置
\cp -rf /web/server/apache/bin/apachectl /etc/init.d/apache && service apache start
安装MySQL
安装PHP
安装Nginx
相关文章推荐
- C 链表 - linux 如何实现
- 【重点】Linux 目录结构
- 使用gdbserver+arm-linux-gdb 调试应用程序
- centos 7 网卡绑定 bond0 开机无法自启
- 【专业】linux的usr目录的全称是什么?
- 【鸟哥私房菜】第二十章 Linux启动流程分析
- centOS 6.5下升级mysql,从5.1升级到5.7
- Linux下编译软件时指定安装目录
- centos7挂载windows共享文件
- 跨平台Socket通讯程序(Windows+Linux)底层封装
- linux之用wget下sublime简单使用总结
- zabbix部署(Linux上部署/监控端/被监控端)
- Linux下搭建Python2.7环境
- centos入门(yum源更新)
- linux04_vim的使用
- Centos7 开放端口
- grub2 linux等命令中不能使用环境变量
- linux驱动-file_operations之mmap
- CentOS 7安装Etherpad(在线协作编辑)
- Linux上TensorFlow的深入研究:构建一个低成本、快速、精准的图像分类器