lamp搭建带WordPress(apache+mysql5.1)

lamp搭建(apache2.2.31+mysql5.1.72+php5.3)

如果对运维课程感兴趣,可以在b站上、csdn或微信视频号 上搜索我的账号: 运维实战课程,可以关注我,学习更多免费的运维实战技术视频

在服务器192.168.37.128上搭建lamp(apache2.2.1+mysql5.1.72+php5.3)

1)安装apache2.2.31(在默认站点目录htdocs)

[root@localhost ~]# mkdir /apache

rz上传apache包

[root@localhost ~]# cd /apache/

[root@localhost apache]# ls

httpd-2.2.31.tar.gz

[root@localhost apache]# yum -y install gcc gcc-c++   #安装编译工具

[root@localhost apache]# yum -y install zlib zlib-devel  #安装依赖包,否则报下面错误:

checking for zlib location... not found

checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

[root@localhost apache]#useradd apache -s /sbin/nologin -M

[root@localhost apache]# tar -zxf httpd-2.2.31.tar.gz   #安装apache

[root@localhost apache]# ls

httpd-2.2.31  httpd-2.2.31.tar.gz

[root@localhost apache]# cd httpd-2.2.31

[root@localhost httpd-2.2.31]# ls

ABOUT_APACHE  BuildBin.dsp   configure.in  httpd.mak       LAYOUT        Makefile.in    os                server

acinclude.m4  buildconf      docs          httpd.spec      libhttpd.dep  Makefile.win   README            srclib

Apache.dsw    CHANGES        emacs-style   include         libhttpd.dsp  modules        README.platforms  support

build         config.layout  httpd.dep     INSTALL         libhttpd.mak  NOTICE         README-win32.txt  test

BuildAll.dsp  configure      httpd.dsp     InstallBin.dsp  LICENSE       NWGNUmakefile  ROADMAP           VERSIONING

[root@localhost httpd-2.2.31]#./configure --prefix=/usr/local/apache \

--enable-deflate \

--enable-expires \

--enable-headers \

--enable-modules=most \

--enable-so \

--with-mpm=worker \

--enable-rewrite

回车

[root@localhost httpd-2.2.31]# make && make install

[root@localhost httpd-2.2.31]# ls /usr/local/apache/

bin  build  cgi-bin  conf  error  htdocs  icons  include  lib  logs  man  manual  modules

[root@localhost httpd-2.2.31]# /usr/local/apache/bin/apachectl start

httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

[root@localhost httpd-2.2.31]# cat /usr/local/apache/conf/httpd.conf

User apache           #修改成apache用户

Group apache         #修改成apahce组

<Directory "/usr/local/apache/htdocs">

Options -Indexes FollowSymLinks            //修改,前面加-,优化措施

……

Include conf/extra/httpd-vhosts.conf        //注释不要打开,如果打开,就需要在后面文件中配置虚拟主机

[root@localhost httpd-2.2.31]# chown -R apache.apache /usr/local/apache/htdocs/

[root@localhost httpd-2.2.31]# /usr/local/apache/bin/apachectl graceful

httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

[root@localhost httpd-2.2.31]# netstat -anptu |grep httpd

tcp        0      0 :::80                       :::*                        LISTEN      57131/httpd         

2)安装mysql5.1.72

[root@localhost httpd-2.2.31]# cd

[root@localhost ~]# mkdir /mysql

上传mysql包

[root@localhost ~]# cd /mysql/

[root@localhost mysql]# ls

mysql-5.1.72.tar.gz

[root@localhost mysql]# useradd mysql -M -s /sbin/nologin

[root@localhost mysql]# yum -y install ncurses-devel           #安装mysql依赖包,否则报下面错误

checking for termcap functions library... configure: error: No curses/termcap library found

[root@localhost mysql]# tar -zxf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

运维实战课程

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值