• 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

  • 相关阅读:
    【周年庆】china-pub 14周年庆感恩回馈四波狂热来袭
    《Python自然语言处理》
    《大教堂与集市》
    《Redis设计与实现》
    《处理器虚拟化技术》
    《Erlang程序设计(第2版)》
    《数据化管理:洞悉零售及电子商务运营》
    《MySQL Workbench数据建模与开发》
    angular中的MVVM模式
    JavaScript函数柯里化
  • 原文地址:https://www.cnblogs.com/coolicer/p/2864251.html
Copyright © 2020-2023  润新知