Windows Server Azure cloud compilation and installation MariaDB tutorial

Source: Internet
Author: User
Tags fpm ldap openssl php source code
Try 1 RMB Windows Azure with a high bandwidth. The following shows how to compile and install the LNMP environment in Windows Azure. The system environment is for Ubuntu 14.04 TLS.
Software version:
Database: mariadb-10.0.13 StablePHP: php-5.5.15 StableNginx: nginx/1.4.6 (Ubuntu) (here Nginx uses Ubuntu apt installation)
1. Create a MySQL User:
Considering system installation, the new user cannot log on (nologin). Edit vi/etc/shells and add "/usr/sbin/nologin" to enable the system to create nologin users.
Useradd-m/app/mysql-s/usr/sbin/nologin-u 555 mysql
2. Install the compiling environment and install MariaDB's PHP dependency package:
Apt-get install build-essential tialapt-get install libncurses5-dev cmake bison libxml2 libxml2-dev libxslt1-dev libcurl4-openssl-dev libbz2-dev libpcre3 libpcre3-dev unzip openssl libssl-dev libpng12-dev libfreetype6-dev libjpeg-dev libmcrypt-dev libldap2-dev libsasl2-dev libboost-dev
3. Download and compile and install MariaDB and PHP
Wget http://cn2.php.net/get/php-5.5.15.tar.bz2/from/this/mirror
Wget http://mirrors.neusoft.edu.cn/mariadb/mariadb-10.0.13/source/mariadb-10.0.13.tar.gz
1). The installation directories are:/app/mysql and/app/php5.
2 ). cmake. -DCMAKE_INSTALL_PREFIX =/app/mysql/-DMYSQL_DATADIR =/app/mysql/data/-DSYSCONFDIR =/app/mysql/etc/-DMYSQL_UNIX_ADDR =/app/mysql/tmp/mysqld. sock-plugin = 3336-DWITH_SSL = system-plugin = 1-DWITH_ZLIB = system-DENABLED_LOCAL_INFILE = 1-DDEFAULT_CHARSET = utf8-DDEFAULT_COLLATION = utf8_general_ci-DMYSQL_USER =
3 ).. /configure -- prefix =/app/php5 -- with-config-file-path =/app/php5/etc/-- with-mysql = mysqlnd -- with-mysqli = mysqlnd --- pdo-mysql = mysqlnd -- with-mysql-sock =/app/mysql/tmp/mysqld. sock -- with-freetype-dir -- with-jpeg-dir -- with-png-dir -- with-zlib -- enable-xml -- disable-rpath -- enable-bcmath -- enable-shmop -- enable-sysvsem -- enable-inline-optimization -- with-curl -- enable-mbregex -- enable-mbstring -- with-mcrypt -- with-gd -- enable-gd-native-ttf --- openssl -- with-mhash -- enable-pcntl -- enable-sockets -- with-ldap-sasl -- with-xmlrpc -- enable-zip -- enable-soap -- enable-fpm -- with-fpm-user = www-data -- with-fpm-group = www-data -- enable-opcache
Ubuntu14.04 the following error may occur when compiling and installing the new version PHP5.5:
/Usr/bin/ld: ext/ldap /. libs/ldap. o: undefined reference to symbol'ber _ strdup @ OPENLDAP_2.4_2 '// usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusmake: *** [sapi/cli/php] Error 1
In this case, the description "./configure"?] Do a good job of changing the environment value. Solution: an article from foreigners:
Find the EXTRA_LIBS line in vi Makefile under the PHP source code directory, and add '-llber' at the end of the line to save and exit make again.
To this Ubuntu compilation and installation MariaDB is completed, on Nginx connection PHP here is not much said, the following is the result of the compilation: http://azure0.iloxp.com/tz.php this is only for testing, screenshots keep ha:
I have to say that it is best to use the built-in Opcache cache function when compiling and installing PHP5.4 and later versions, because the built-in cache is really good, Hit is very high, and the performance is also good. Like one:
Various cloud platforms have entered our world so frequently.

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.