zoukankan      html  css  js  c++  java
  • Centos安装PHP5.3

    之前转了一篇文章[转]How to install PHP 5.3 on CentOS,发现这种方法只适用于我,今天帮别人安装的时候,不可用。

    我找了下面这个方法,也能成功安装php5.3.20

    其中,他之前安装了nignx,虽然删除了但是还占用80。我们把它找出来kill掉。

    ps -aux | grep nginx
    kill -9 pid

    问题1:error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' 

    mysql-server没有安装:#yum install mysql-server

     

    问题2:ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'root'

    mysql -uroot -p

    ----------------------------------------------

    今天从  atomicorp.com  安装 php5.3

    1、安装  repository key

    To enable access to both the atomic yum repository use the following automated installer:

    >wget -q -O - http://www.atomicorp.com/installers/atomic | sh

    2、创建新的 yum 源

    >vim /etc/yum.repos.d/CentOS-Atomicorp.repo

    内容如下:

    [atomic]
    name = CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com
    mirrorlist = http://www.atomicorp.com/mirrorlist/atomic/centos-5-$basearch
    #mirrorlist = http://www.atomicorp.com/channels/atomic/centos/5/mirrors-atomic
    enabled = 1
    priority = 1
    protect = 0
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
    gpgcheck = 1

    #Almost Stable, release candidates for [atomic]
    [atomic-testing]
    name = CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com - (Testing)
    mirrorlist = http://www.atomicorp.com/mirrorlist/atomic-testing/centos-5-$basearch
    enabled = 0
    priority = 1
    protect = 0
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
    gpgcheck = 1

    #Untested, Unstable, known buggy, and incomplete packages.
    #[atomic-bleeding]
    #name = CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com - (Bleeding)
    #baseurl = http://www.atomicorp.com/channels/atomic-bleeding/centos/5/$basearch/
    #enabled = 0
    #priority = 1
    #protect = 0
    #gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
    #gpgcheck = 1

    3、安装 php

    >yum install php

  • 相关阅读:
    应该做什么样的研究:以Google为例
    机器学习问题方法总结
    浅析PageRank算法
    轮廓处理函数详细
    近视恢复方法
    一步一步深入视频接口
    什么是cookie
    Linux系统目录数和文件数限制
    九大视频接口全接触
    实时监控网卡流量的命令
  • 原文地址:https://www.cnblogs.com/coolicer/p/2864251.html
Copyright © 2011-2022 走看看