1024programmer Java Simple installation of nginx, php, mysql and golang under Ubuntu

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

php tutorial|php manualSimple installation of nginx, php, mysql and golang under Ubuntu Ubuntu, nginx, php, mysql, golang, php tutorial-php manual micro-commerce mall source code, vscode optimization code error, what is ubuntu called, udp protocol tomcat, sqlite3 Floating point numbers, there are centipede-like crawlers on the second floor, music website PHP source code, SEO optimization content, material Chinese website collection, discuz crack template installation lzw I am a PHP professional, naturally installing lnmp is a common skill. The previous method was lnmp installation package, such as Jun Ge’s lnmp1.0. With the updates of php and mysql, most one-click installations have problems with version aging and difficulty in updating. Therefore, I re-researched the installation of lnmp under Ubuntu and found that it is much simpler now. Let me record it. In addition, I have recently been studying the source code of the gola easy language module, does vscode support Android tablets, ubuntu USB disk path, tomcat configuration cer certificate, crawler data finance, php conference room management system, is e-commerce SEO free traffic, lzw short article source code, how to terminate vscode Run, ubuntu runs idea, tomcat closes and reports an error, focus on crawlers and distributed crawlers, php social networking site, Hailing District Wanci SEO consultation hotline, housekeeping website web source code download, 21cake template lzw

I am doing php Born, naturally installing lnmp is a regular skill. The previous method was lnmp installation package, such as Jun Ge’s lnmp1.0. With the updates of php and mysql, most one-click installations have problems with version aging and difficulty in updating. Therefore, I re-researched the installation of lnmp under Ubuntu and found that it is much simpler now. Let me record it.

In addition, I am learning golang recently, and installation under Ubuntu is naturally a necessary process. However, there are some mysteries in the installation of golang. Of course, it is not installed from source code.

Nginx Stable/Development

The package manager under Ubuntu is apt-get or dpkg. Conventional installation command apt-get install (note the permissions sudo apt-get install). Nginx is the most user-friendly of these software. You can add the stable source directly:

add-apt-repository ppa:nginx/stable

or development Source:

add-apt-repository ppa:nginx/development

If there is no installation command add-apt-repository, Installation:

apt-get install python-software-properties

Regular operations after that:

apt-get updateapt-get install nginxservice nginx start

PHP 5.4+

There is a guy who specializes in the ppa source of PHP, Ondrej Sury. There are sources for php5.4, php5.5 and php5.6. For details, please see the official page.
Why not 5.3? You are behind the times! The performance of 5.4+ has been greatly improved, and 5.5 also has 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, install them, remember to restart php5-fpm:

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

As for how to configure php-fpm in nginx, there are a lot of them, so I won’t say much.

MySQL 5.5+ & MariaDB

The same guy maintains mysql5.5, mysql5.6 and MariaDB5.5. So, it’s very simple, such as installing MariaDB (don’t 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 has built-in InnoDB, which has already been started. Specifically:

mysql SHOW ENGINE INNODB STATUS;

Golang

The highlight is golang. I searched for ppa sources for a long time and only found one source that can install golang1.1.1. I was very unhappy. In fact, you can download the compiled linux.tar.gz from golang official website. But you need to manually set GOROOT yourself, which is a bit troublesome.

Finally I found a good tool called Godeb. In fact this is a deb package builder. First download the officially compiled tar.gz, 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

will start installing the latest version. You can also view supported versions and install a specific version:

./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 check whether the installation is complete.

The remaining settings GOPATH and GOBIN will not be described in detail. I modified it in /etc/profile.

Written at the end

Many things under Ubuntu are sourced and easy to install, which is also a good thing.

Original address: Simple installation of nginx, php, mysql and golang under Ubuntu. Thanks to the original author for sharing.

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/simple-installation-of-nginx-php-mysql-and-golang-under-ubuntu-2/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索