A forum based on LNMP

Source: Internet
Author: User

[email protected] ~]# Yum install-y gcc gcc-c++ ncurses-devel Bison openssl-devel zlib-devel
[email protected] ~]# Yum install-y cmake-2.8.12.2-4.el6.x86_64.rpm
[Email protected] ~]# CD mysql-5.7.17/
[Email protected] mysql-5.7.17]# cmake-dcmake_install_prefix=/usr/local/lnmp/mysql-dmysql_datadir=/usr/local/ Lnmp/mysql/data-dmysql_unix_addr=/usr/local/lnmp/mysql/data/mysql.sock \

-dwith_innobase_storage_engine=1 \
-dwith_myisam_storage_engine=1 \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dextra_charsets=all \
-dwith_boost=/root/mysql-5.7.17/boost/boost_1_59_0/

[[email protected] mysql-5.7.17]# make && make install
[Email protected] mysql-5.7.17]# groupadd-g MySQL
[Email protected] mysql-5.7.17]# useradd-u 27-g 27-m-d/usr/local/lnmp/mysql/mysql
[[email protected] mysql-5.7.17]# usermod-s/sbin/nologin MySQL
[Email protected] mysql-5.7.17]# cd/usr/local/lnmp/mysql/
[Email protected] mysql]# chown mysql.mysql. -R
[email protected] mysql]# LL
Total Dosage 56
Drwxr-xr-x 2 mysql mysql 4096 October 15:30 bin
-rw-r--r--1 mysql mysql 17987 November COPYING
Drwxr-xr-x 2 mysql mysql 4096 October 15:30 docs
Drwxr-xr-x 3 mysql mysql 4096 October 15:30 include
Drwxr-xr-x 4 mysql mysql 4096 October 15:30 Lib
Drwxr-xr-x 4 mysql mysql 4096 October 15:30 man
drwxr-xr-x mysql mysql 4096 October 15:30 mysql-test
-rw-r--r--1 mysql MySQL 2478 November
drwxr-xr-x mysql mysql 4096 October 15:30 share
Drwxr-xr-x 2 mysql mysql 4096 October 15:30 support-files
[[email protected] ~]# vim. Bash_profile


[[email protected] ~]# source. bash_profile
[[email protected] ~]# which MySQL
/usr/local/lnmp/mysql/bin/mysql
[Email protected] mysql]# chown root. -R
[email protected] mysql]# LL
Total Dosage 56
Drwxr-xr-x 2 root mysql 4096 October 15:30 bin
-rw-r--r--1 root mysql 17987 November COPYING
Drwxr-xr-x 2 root mysql 4096 October 15:30 docs
Drwxr-xr-x 3 root mysql 4096 October 15:30 include
Drwxr-xr-x 4 root mysql 4096 October 15:30 Lib
Drwxr-xr-x 4 root mysql 4096 October 15:30 man
Drwxr-xr-x root mysql 4096 October 15:30 mysql-test
-rw-r--r--1 root MySQL 2478 November
Drwxr-xr-x root mysql 4096 October 15:30 share
Drwxr-xr-x 2 root mysql 4096 October 15:30 support-files
[Email protected] mysql]# VIM/ETC/MY.CNF

[Email protected] mysql]# CD support-files/
[email protected] support-files]# CP mysql.server/etc/init.d/mysqld
[Email protected] mysql]# mysqld--initialize--user=mysql

[Email protected] mysql]# chown MySQL data-r
[[email protected] mysql]#/etc/init.d/mysqld start
Starting MySQL. Determine
[Email protected] mysql]# mysql_secure_installation #根据初始化修改密码
Second, PHP installation

1. Resolve the dependencies required for installation
[email protected] ~]# Yum install libjpeg-turbo-devel-1.2.1-1.el6.x86_64
[email protected] php-5.6.35]# Yum install-y libxml2-devel
[email protected] php-5.6.35]# Yum install-y openssl-devel
[email protected] php-5.6.35]# Yum install-y curl-devel
[Email protected]~]# yum install-y gmp-devel
[email protected] ~]# Yum install libmcrypt-devel-2.5.8-9.el6.x86_64.rpm libmcrypt-2.5.8-9.el6.x86_64.rpm-y
[email protected] ~]# Yum install-y net-snmp-devel
[email protected] ~]# Yum install re2c-0.13.5-1.el6.x86_64.rpm-y
Perform compilation (Error-based error installation software is generally software-devel)
[Email protected] php-5.6.35]#/configure--prefix=/usr/local/lnmp/php--with-config-file-path=/usr/local/lnmp/ Php/etc--enable-mysqlnd--with-mysql=mysqlnd--with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd--with-openssl-- With-snmp--with-gd--with-zlib--with-curl--with-libxml-dir--with-png-dir--with-jpeg-dir--with-freetype-dir-- With-pear--with-gettext--with-gmp--enable-inline-optimization--enable-soap--enable-ftp--enable-sockets-- Enable-mbstring--enable-fpm--with-fpm-user=nginx--with-fpm-group=nginx--with-mcrypt--with-mhash

This is what happens when PHP is completed.
[[email protected] php-5.6.35]# make && make install
[Email protected] php-5.6.35]# cd/usr/local/lnmp/php/
[Email protected] php]# CD etc/
[[email protected] etc]# ls
Pear.conf Php-fpm.conf.default
[email protected] etc]# CP Php-fpm.conf.default php-fpm.conf
[[Email protected] lnmp]# CD
[Email protected] ~]# CD php-5.6.35
[email protected] php-5.6.35]# CP Php.ini-production/usr/local/lnmp/php/etc/php.ini
[Email protected] php-5.6.35]# CD sapi/fpm/
[email protected] fpm]# CP INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM
[Email protected] fpm]# chmod +x/etc/init.d/php-fpm
[Email protected] etc]# pwd
/usr/local/lnmp/php/etc
[Email protected] etc]# vim php.ini

[Email protected] ~]# useradd-u 800-m-d/usr/local/lnmp/nginx nginx
[[email protected] ~]#/etc/init.d/php-fpm start
Three, Nginx installation
[Email protected] ~]# tar zxf nginx-1.10.1.tar.gz
[Email protected] ~]# CD nginx-1.10.1
[Email protected] nginx-1.10.1]# CD src/core/
[Ro[email protected] core]# vim nginx.h

[Email protected] nginx-1.10.1]# vim AUTO/CC/GCC
#CFLAGS = "$CFLAGS-G" (Comment out this line, remove debug mode compilation, program only hundreds of K after compiling)
[email protected] nginx-1.10.1]# Yum install-y pcre-devel
[Email protected] nginx-1.10.1]#/configure--prefix=/usr/local/lnmp/nginx--with-http_ssl_module--with-http_stub _status_module--with-file-aio--with-threads--user=nginx--group=nginx
[[email protected] nginx-1.10.1]# make && make install
[Email protected] nginx-1.10.1]# ln-s/usr/local/lnmp/nginx/sbin/nginx/usr/local/sbin/
[Email protected] ~]# vim/usr/local/lnmp/nginx/conf/nginx.conf


[Email protected] ~]# nginx-t
Nginx:the configuration file/usr/local/lnmp/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/lnmp/nginx/conf/nginx.conf Test is successful
[Email protected] ~]# Nginx-s Reload
[Email protected] ~]# cd/usr/local/lnmp/nginx/html/
[Email protected] html]# vim index.php
<?php
Phpinfo ()
?>
[Email protected] nginx]# vim conf/nginx.conf

Resolve dependencies between PHP and MySQL
[Email protected] nginx]# cd/usr/local/lnmp/php/etc/


[Email protected] etc]#/ETC/INIT.D/PHP-FPM Reload
[email protected] ~]# Yum install-y unzip
[[email protected] ~]# Unzip Discuz_x3.2_sc_utf8.zip decompression
[Email protected] ~]# MV upload//bbs
[Email protected] ~]# vim/usr/local/lnmp/nginx/conf/nginx.conf


[Email protected] ~]# cd/bbs/
[Email protected] bbs]# chmod 777 config/data/-R
[Email protected] bbs]# chmod 777 uc_client/uc_server/-R
[Email protected] bbs]# chmod 755 data/
[Email protected] bbs]#/etc/init.d/mysqld restart

A forum based on LNMP

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.