2017-04-04 67 views
0

安裝PHP 5.4,所以我需要在Ubuntu-16.04-服務器AMD64安裝PHP 5.4。一些其他線程建議在Ubuntu

  • 須藤附加的apt-庫PPA:的Ondrej/PHP5-oldstable的
  • sudo易於得到更新
  • 命令和apt-get安裝PHP5 -y

但這些因爲更新發生錯誤,所以不起作用。

Reading package lists... Done 
W: The repository 'http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial Release' does not have a Release file. 
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. 
N: See apt-secure(8) manpage for repository creation and user configuration details. 
E: Failed to fetch http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found 
E: Failed to fetch http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found 
E: Some index files failed to download. They have been ignored, or old ones used instead. 

對此有何建議?

+0

請參閱http://stackoverflow.com/questions/39824219/install-php-5-3-or-5-4-on-ubuntu-16-04-xenial-and-apache – markdwhite

+2

如有疑問,從源代碼編譯。 – apokryfos

+0

在這裏,你可以嘗試另一個鏈接https://www.dev-metal.com/how-to-install-latest-php-5-4-x-on-ubuntu-12-04-lts-precise-pangolin/ – Yolo

回答

0

你可以使用泊塢窗這裏的另一個方法只能從源編譯PHP

搬運工運行--name應用--net mysql_net -d -p 8080:80 \ -v /主機/到/路徑/應用:在/ var/WWW /應用/ \ -v /主機/到/路徑/ config_apache:在/ etc// \
romeoz /泊塢窗的Apache,PHP的Apache2 /啓用站點-:5.4

/主機/到/路徑/應用程序 - 路徑您的應用程序和 /主機/到/路徑/ config_apache - 路徑Apache配置(基地的/ var:通過此鏈接https://github.com/romeOz/docker-apache-php/blob/master/5.4/configs/app.conf

然後向上容器爲MySQL

搬運工運行--name分貝--net mysql_net -d \ -v /主機/到/路徑/數據文件配置/ lib中/ MySQL的\ romeoz /泊塢窗MySQL的:5.5

時/主機/到/路徑/數據 - 路徑

現在,您可以通過主機 「DB」 使用數據庫 應用提供您選擇數據庫中的數據在 http://localhost:8080