LNMP source code installation (RHEL)

Source: Internet
Author: User
Tags imagemagick openldap wordpress blog
Preparation phase 1, the operating system RedHatEnterpriseLinuxServer6.32, configure IP 192.168.10.250 # vim/etc/sysconfig/network-scripts/ifcfg-eth0 # servicenetworkrestart3, configure firewall, start port 22, port 80, and port 3306 # vi/etc/sysconfig

Preparation Phase

1. Operating System

Red Hat Enterprise Linux Server 6.3

2. Set the IP address to 192.168.10.250.

# Vim/etc/sysconfig/network-scripts/ifcfg-eth0

# Service network restart

3. configure the firewall and enable port 22, port 80, and port 3306.

# Vi/etc/sysconfig/iptables # edit the firewall configuration file

-A input-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT (allow port 80 to pass through the firewall)
-A input-m state -- state NEW-m tcp-p tcp -- dport 3306-j ACCEPT (allow port 3306 to pass the firewall)

4. Disable SELinux.

# Vim/etc/selinux/config

Modify SELINUX = disabled and restart the system.

Or run the following command:

[Root @ test ~] # Setenforce 0 # You do not need to restart the system using the command, but this is only a temporary shutdown of SELinux, which will expire after the system is restarted.

5. download the software package

Nginx-1.2.2.tar.gz

Mysql-5.5.25a.tar.gz

Php-5.4.4.tar.gz

Other related software packages and dependency packages:

Cmake-2.8.8.tar.gz # MySQL compilation tool

Eaccelerator-0.9.6.1.zip # php accelerator, PHP program code execution efficiency can be improved by 1-10 times;

Xcache-2.0.1.tar.gz # php accelerator, used to replace eaccelerator

Google-perftools-1.9.1.tar.gz

ImageMagick-6.7.8-2.tar.gz # Powerful, stable and free toolkit and development kit;

Imagick-3.1.0RC2.tgz # An extension of PHP, which is an excellent alternative to the default GD image function library.

Libiconv-1.14.tar.gz

Libmcrypt-2.5.8.tar.gz

Mcrypt-2.6.8.tar.gz

Memcache-3.0.6.tgz

Memcached-1.4.13.tar.gz # High-Performance Distributed Memory Object Caching System; replaceable memcache-3.0.6.tgz

Mhash-0.9.9.9.tar.bz2

Ncurses-5.9.tar.gz

Openssl-1.0.1c.tar.gz

Pcre-8.31.tar.gz

Php-fpm-0.6-103 ~ 5.3.1.tar.gz

Wordpress-3.4.1-zh_CN.zip # wordpress blog

All software packages are stored in the/data1/lnmp/directory.

Note:

EAccelerator is a free and open source php accelerator. It optimizes and dynamically caches content, improves the cache performance of php scripts, and completely eliminates the server overhead when PHP scripts are compiled. It also optimizes scripts to accelerate execution efficiency. This improves the code execution efficiency of PHP programs by 1-10 times.

Memcache is a high-performance distributed memory object cache system. By maintaining a unified and huge hash table in the memory, Memcache can be used to store data in various formats, including image, video, file, and database retrieval results. It can cope with any number of connections and use non-blocking network I/O. Because its working mechanism is to open up a space in the memory, and then create a HashTable, Memcached self-manages these HashTable. Memcache mentioned in php is an extension of PHP and a client used to connect to memcached.

ImageMagick is a powerful, stable, and free tool set and development kit that can be used to read/write and process image files in over 89 basic formats. By using ImageMagick, You can dynamically generate images based on the needs of web applications. You can also resize, rotate, sharpen, subtract, or add special effects to one or more images, save the operation results in the same format or other formats.

6. Install compilation tools and library files

Select related software packages as needed:

[Root @ test ~] # Yum install make apr * autoconf automake curl-devel gcc-c ++ zlib-devel openssl-devel pcre-devel gd kernel keyutils patch perl kernel-headers compat * mpfr cpp glibc libgomp libstdc ++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel krb5-devel zlib-devel libXpm * freetype libjpeg * libpng * php-common php-gd ncurses * libtool * libxml2 libxml2-devel patch

Run the script to check the installation status of each software package:

If necessary, install these software packages or install them in source code:

For I in 'rpm-q gcc-c ++ autoconf libjpeg-devel libpng-devel freetype-devel libxml2 libxml2-devel zlib-devel glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses-devel curl-devel kernel e2fsprogs-devel kernel krb5-devel libidn-devel openssl-devel openldap-devel nss-ldap openldap-clients openldap-servers bison-devel readline- devel libmcrypt-devel net-snmp-devel libXpm * libxml2 libxml2-devel patch | grep 'not installed' | awk '{print $2 }'';

Do

Yum-y install $ I;

Done

Note:

Install at least gcc-c ++ and other tools. Other software packages can be installed using YUM or source code.

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.