`

Ubuntu 12.04 全新安装LNMP (Nginx 1.6.2 + MySQL 5.6 + PHP 5.5)

阅读更多

Ubuntu 12.04 全新安装LNMP (Nginx 1.6.2 +  MySQL 5.6 + PHP 5.5)

一,安装 Nginx 1.6.2


# sudo apt-add-repository ppa:nginx/stable  

# sudo apt-get update 

# sudo apt-get install nginx  
    出现 sudo: add-apt-repository: command not found 错误。  
    原因如下: add-apt-repository 是由 python-software-properties 这个工具包提供的  所以要先安装python-software-properties 才能使用 add-apt-repository
# sudo apt-get install python-software-properties
# sudo  apt-get -y install software-properties-common

 

# sudo apt-get install php5-cli php5-cgi php5-mysql php5-curl php5-gd php5-imagick
php5-mcrypt php5-memcache  php5-sqlite php5-xmlrpc php5-dev php5-fpm

 

 

参考网址:http://www.kaijia.me/2013/05/ubuntu-latest-nginx-repo-collection/

二,安装 PHP 5.5

 

# sudo add-apt-repository ppa:ondrej/php5 

# sudo apt-get update 

# sudo apt-get upgrade

 下列软件包有未满足的依赖关系:
 php5-mcrypt : 依赖: phpapi-20121212
               依赖: php5-common (= 5.5.29+dfsg-1+deb.sury.org~vivid+3) 但是 5.6.4+dfsg-4ubuntu6.2 正要被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

 

《Upgrade from PHP 5.3 to PHP 5.5 on Ubuntu 12.04 LTS》

 链接如下:http://phpave.com/upgrade-php-5-3-php-5-5-ubuntu-12-04-lts/

如果是要 从 php 5.3 或 5.4 升级请参考cyper的文章,升级PHP至5.4(ubuntu 12.04)

链接如下:http://my.oschina.net/uniquejava/blog/345926
 

三,安装 MySQL 5.6

 

# sudo  add-apt-repository  ppa:ondrej/mysql-5.6
# sudo  apt-get update
# sudo  apt-get  install mysql-server mysql-client libmysqlclient-dev

、设置mysql远程访问

1. 编辑mysql配置文件,把其中bind-address = 127.0.0.1注释了

vi /etc/mysql/mysql.conf.d/mysqld.cnf 

如果是升级MySQL 可以参考以下链接:

 

《Install/Upgrade to MySQL 5.6 on Ubuntu 12.04 LTS》

https://rtcamp.com/tutorials/mysql/mysql-5-6-ubuntu-12-04/

Installing MySQL 5.6 using PPA

http://askubuntu.com/questions/422612/installing-mysql-5-6-using-ppa

[EN] How to install MySQL 5.6 on Ubuntu 12.04 (Precise)

http://www.111cn.net/sys/linux/46343.htm

 

bash: /usr/bin/mysql: 没有那个文件或目录
gao@gao-VirtualBox:~$ sudo  add-apt-repository  ppa:ondrej/mysql-5.6
 This branch tracks my attempt to package latest MySQL 5.6 packaging as available in Debian. Feel free to ping me if I am seriously behind Debian or upstream.

You can get more information about the packages at https://deb.sury.org.

If you are looking for MariaDB 10.0, please use: ppa:ondrej/mariadb-10.0: https://launchpad.net/~ondrej/+archive/mariadb-10.0
If you are looking for MySQL 5.5, please use: ppa:ondrej/mysql-5.5: https://launchpad.net/~ondrej/+archive/mysql-5.5
If you are looking for MySQL 5.6, please use: ppa:ondrej/mysql-5.6: https://launchpad.net/~ondrej/+archive/mysql-5.6
If you are looking for MySQL 5.7, please use: ppa:ondrej/mysql-5.6: https://launchpad.net/~ondrej/+archive/mysql-5.7
If you are looking for Percona XtraDB Cluster 5.5, please use: ppa:ondrej/percona-xtradb-cluster-5.5: https://launchpad.net/~ondrej/+archive/percona-xtradb-cluster-5.5

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating: https://deb.sury.org/pages/donate.html
 更多信息: https://launchpad.net/~ondrej/+archive/ubuntu/mysql-5.6
按回车继续或者 Ctrl+c 取消添加

gpg: 钥匙环‘/tmp/tmpsumjzxqr/secring.gpg’已建立
gpg: 钥匙环‘/tmp/tmpsumjzxqr/pubring.gpg’已建立
gpg: 下载密钥‘E5267A6C’,从 hkp 服务器 keyserver.ubuntu.com
gpg: /tmp/tmpsumjzxqr/trustdb.gpg:建立了信任度数据库
gpg: 密钥 E5267A6C:公钥“Launchpad PPA for Ondřej Surý”已导入
gpg: 合计被处理的数量:1
gpg:               已导入:1  (RSA: 1)
OK
gao@gao-VirtualBox:~$
 

 

-================================

This PPA has been deprecated!                                               
 │                                                                             
 │ Please note that this PPA has been deprecated and you need to use           
 │ ppa:ondrej/php that contains co-installable versions of PHP 5.5, PHP 5.6    
 │ and PHP 7.0.                                                                
 │                                                                             
 │ PHP 5.5.37 has been the last upload into this repository.  Also please      
 │ be aware that 5.5.37 is the last upstream version with security support,    
 │ so you should be really switching to PHP 5.6 or even PHP 7.0.               
 │                                                                             
 │ To add the new PPA, do:                                                     
 │                                                                             
 │ sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics