Simple installation of nginx, php, mysql and golang in Ubuntu

Source: Internet
Author: User
I am from php and naturally install lnmp as a regular skill. The previous method was the lnmp installation package, such as June's lnmp1.0. As php and mysql are updated, most one-click installations start to age, which is difficult to update. Therefore, I re-examined the lnmp installation in Ubuntu and found that it is much simpler now. record it. In addition, I recently studied gola.

I am from php and naturally install lnmp as a regular skill. The previous method was the lnmp installation package, such as June's lnmp1.0. As php and mysql are updated, most one-click installations start to age, which is difficult to update. Therefore, I re-examined the lnmp installation in Ubuntu and found that it is much simpler now. record it. In addition, I recently studied gola.

I am from php and naturally install lnmp as a regular skill. The previous method was the lnmp installation package, such as June's lnmp1.0. As php and mysql are updated, most one-click installations start to age, which is difficult to update. Therefore, I re-examined the lnmp installation in Ubuntu and found that it is much simpler now. record it.

In addition, recently studying golang, Ubuntu installation is also a necessary process. However, the installation of golang also has some mysteries. Of course, it is not installed by source code.

Nginx Stable/Development

The package manager in Ubuntu isapt-getOrdpkg. General installation commandsapt-get install(Pay attention to Permissionssudo apt-get install). Nginx is the most friendly among these software. You can directly add the stable source:

add-apt-repository ppa:nginx/stable

Or the development source:

add-apt-repository ppa:nginx/development

If no command is installedadd-apt-repository, Installation:

apt-get install python-software-properties 

Subsequent general operations:

apt-get updateapt-get install nginxservice nginx start
PHP 5.4 +

PHP's ppa source has a guy dedicated to doing it, Ondrej Sury. There are php5.4, php5.5, and php5.6 sources. For details, refer to the official page. Why is there no 5.3? You are outdated! More than 5.4 performance improvement, 5.5 built-inZendOpCache. Install php5.5:

add-apt-repository ppa:ondrej/php5apt-get updateapt-get install php5 php5-fpmservice php5-fpm start

There are also some necessary packages, install it, remember to restart the php5-fpm:

apt-get install php5-gd php5-curl php5-sqlite php5-mysqlnd php5-mcryptservice php5-fpm restart

As for how to configure the php-fpm for nginx, I will not mention it.

MySQL 5.5 + & MariaDB

This guy maintains mysql5.5, mysql5.6, and MariaDB5.5. Therefore, it is very simple, such as installing MariaDB (not like mysql, Which is ruined by oracle ):

add-apt-repository ppa:ondrej/mariadb-5.5apt-get updateapt-get install mariadb-server-5.5service mysql start

Note that the installation prompt is displayed.InnoDB Plugin Disabled. It doesn't matter. MariaDB has built InnoDB into it, but it has already started. Specifically, you can:

mysql SHOW ENGINE INNODB STATUS;
Golang

It's golang. I searched for the ppa source for half a day and found only one source that can install golang1.1.1. You can download the compiled linux.tar.gz file by golangguan. However, you must manually setGOROOTA little troublesome.

Finally, I found a good tool Godeb. This is actually a deb package builder. Download tar.gz compiled by the official team, package it into deb, and then install it.

Take 64-bit installation as an example:

wget https://godeb.s3.amazonaws.com/godeb-amd64.tar.gztar -zxvf godeb-amd64.tar.gz./godeb install

Install 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 usego envCheck whether the installation is complete.

Remaining settingsGOPATH,GOBINI will not go into details. On/etc/profile.

Conclusion

Ubuntu has many sources and is easy to install. This is also a good thing.

Original article address: simple installation of nginx, php, mysql and golang In Ubuntu. Thank you for sharing with me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.