zoukankan      html  css  js  c++  java
  • CentOS yum安装LAMP环境

    本文适用于所有的vps,测试环境为NordicVPS 256M XEN
    非LNMP,非一键安装包

    yum -y update
    yum -y install gcc gcc-c++ autoconf make automake libtool libevent libevent-devel
    yum -y install ncurses ncurses-devel gd gd-devel freetype freetype-devel fontconfig
    fontconfig-devel libjpeg libjpeg-devel zlib zlib-devel pcre pcre-devel
    yum -y install libmcrypt mhash gmp gmp-devel
    yum -y install mysql mysql-server mysql-devel
    yum -y install httpd httpd-devel
    yum -y install php*
    rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
    yum install -y php-eaccelerator
    #启动apache
    /etc/init.d/httpd restart
    #启动mysql
    /etc/init.d/mysqld restart
    chkconfig httpd on
    chkconfig mysqld on
    #生成phpinfo文件
    cat>>/var/www/html/info.php< phpinfo();
    ?>
    EOF

    现在可以通过http://ip/info.php查看LAMP信息了
    附1:mysql配置文件所在位置:/etc/my.cnf
    附2:apache配置文件目录所在位置:/etc/httpd/
    附3:php配置文件所在位置:/etc/php.ini

    原文出自tony1999之手

  • 相关阅读:
    Express入门
    nodejs入门
    css实现点点点效果
    定时器详解和应用、js加载阻塞、css加载阻塞
    栈内存和堆内存有什么区别?
    webpack入门
    Ubuntu常用命令集合
    HTTP缓存机制
    125. 验证回文字符串
    算法的时间复杂度和空间复杂度(js版)
  • 原文地址:https://www.cnblogs.com/cnsanshao/p/2664368.html
Copyright © 2011-2022 走看看