Ubuntu installation php nginx mysql mongodb redis tutorial

Source: Internet
Author: User
Tags install php mongodb redis socket install redis redis tutorial


Ubuntu apt-get installation software:

1. Install php:

Apt-get install python-software-properties
Apt-get install-y ppa-purge
Add-apt-repository ppa: ondrej/php5
Apt-get update
Apt-get install php5-fpm php5-gd php5-cli php5-redis php5-mongo php5-curl php5-mysqlnd php5-bcmath php5-mcrypt

2. Install nginx:


Add-apt-repository ppa: nginx/stable
Apt-get update
Apt-get install nginx

3. Install mysql:


Add-apt-repository 'Deb http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu precise main'
Apt-get install mysql-server-5.6
Mysql_install_db -- user = mysql -- basedir =/usr -- datadir =/data/mysql/var/
Service mysql start

If the following error occurs during installation:

ERROR 1045 (28000): Access denied for user 'debian-sys-maint' @ 'localhost' (using password: YES)

Solution:

Mysql-uroot-p
Run: grant all privileges on *. * TO 'debian-sys-maint' @ 'localhost' identified by 'Your password ';

Modify/etc/mysql/debian. cnf as follows:


[Client]
Host = localhost
User = debian-sys-maint
Password = <you password>
Socket =/var/run/mysqld. sock
[Mysql_upgrade]
Host = localhost
User = debian-sys-maint
Password = <you password>
Socket =/var/run/mysqld. sock
Basedir =/usr

4. Install redis:


Add-apt-repository-y ppa: rwky/redis
Apt-get update
Apt-get install redis

5. mongodb installation:

 

Echo "deb http://repo.mongodb.org/apt/ubuntu" $ (lsb_release-SC) "/mongodb-org/3.0 multiverse" | sudo tee/etc/apt/sources. list. d/mongodb-org-3.0.list
Apt-get update
Apt-get install-y mongodb-org
6. Solve the shell script running error:


Syntax error: "(" unexpected

Solution:


Dpkg-reconfigure dash
 

Related Article

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.