This is a creation in Article, where the information may have evolved or changed.
I'm a php-born, naturally installed Lnmp is a regular skill. The former means is LNMP installation package, such as military brother's lnmp1.0. With the update of PHP and MySQL, most of the one-click installations are beginning to release aging and update difficult issues. So, to re-examine the installation of Ubuntu under the LNMP, found now a lot simpler, record a bit.
Also recently in learning Golang,ubuntu under the installation of nature is also a necessary process. But Golang's installation also has some secrets. Of course, not the source of the installation.
Nginx stable/development
The package Manager under Ubuntu is Apt-get, or dpkg. General installation Command Apt-get Install (note permissions sudo apt-get install). Nginx is the most friendly of these software, directly can add stable source:
Add-apt-repository ppa:nginx/stable
or development Source:
Add-apt-repository ppa:nginx/development
If you do not have the install command add-apt-repository, install:
Apt-get Install Python-software-properties
After the normal operation:
Apt-get updateapt-get Install Nginxservice nginx start
PHP 5.4+
PHP's PPA source has a man who specializes in doing, Ondrej Sury. There are php5.4,php5.5 and php5.6 source, the specific can see the official page. Why not 5.3? You're behind the--! 5.4+ performance improved a lot, 5.5 also have built-in Zendopcache. Install php5.5:
Add-apt-repository ppa:ondrej/php5apt-get updateapt-get install php5 php5-fpmservice php5-fpm start
There are some necessary packages to install, remember to restart PHP5-FPM:
Apt-get Install PHP5-GD php5-curl php5-sqlite php5-mysqlnd php5-mcryptservice php5-fpm Restart
As for Nginx How to configure PHP-FPM, a search a lot, not much to say.
MySQL 5.5+ & MariaDB
Or this man, mysql5.5, mysql5.6 and MariaDB5.5. So, it's easy, like installing mariadb (not like MySQL, destroyed by Oracle):
Add-apt-repository ppa:ondrej/mariadb-5.5apt-get updateapt-get install mariadb-server-5.5service mysql start
Note here that the installation will prompt InnoDB Plugin Disabled. It doesn't matter, Mariadb put InnoDB built in, actually is already started. Specifically, you can:
MySQL SHOW ENGINE INNODB STATUS;
Golang
The plays are Golang. I searched for a half-day PPA source, only to find a can install golang1.1.1 source, very uncomfortable. In fact, you can golang the official download has been compiled linux.tar.gz. But you need to manually set the Goroot, a bit of trouble ah.
Finally found a good tool godeb. This is actually a Deb package builder. Download the officially compiled tar.gz, package it as Deb and install it.
Take a 64-bit installation as an example:
wget https://godeb.s3.amazonaws.com/godeb-amd64.tar.gztar-zxvf Godeb-amd64.tar.gz./godeb Install
Start installing the latest version. You can also view supported versions and install specific versions:
./godeb list1.21.2rc51.2rc41.2rc31.2rc21.2rc11.1.21.1.11.1 (...). /godeb Install 1.1
After installation, you can use go env to see if the installation is complete.
The rest of the setup Gopath,gobin will not repeat. I modified it in the/etc/profile.
Written in the last
Ubuntu under a lot of things are active, easy to install, but also good ah.
Station Original: http://fuxiaohei.me/article/15/ubuntu-lnmp-golang-installation.html