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

  • 相关阅读:
    mysql has gone away
    [置顶] 在Visual Studio 2008上调试C语言程序
    滚动加载更多内容
    【jeecg-mybatis版本】 mybatis+spring mvc 完美整合方案 查询,保存,更新,删除自动生成
    Android Developers:按钮
    java 从零开始,学习笔记之基础入门<集合>(十六)
    Ubuntu MYSQL环境搭建
    Android 如何预置APK M
    php基础系列:从用户登录处理程序学习mysql扩展基本操作
    CMUSphinx Learn
  • 原文地址:https://www.cnblogs.com/coolicer/p/2864251.html
Copyright © 2011-2022 走看看