The steps of compiling and installing LNMP in CentOS 5 system are detailed

Source: Internet
Author: User
Tags memcached centos


# manual Installation Lnmp
Contains Libiconv libunwind gperftools libmcrypt mhash mcrypt libpng freetype jpeg
GD pcre libmemcached php_memcached (memcached.so) eaccelerator Zendoptimizer
mysql5.5 php5.3 nginx1.2.7 memcached tokyocabinet tokyotyrant
#path
Program Storage/data/service
Lib or Common/data/service/common
Data storage/data/data
Log storage/data/logs



# Yum Source Changes
Rm-f centos6-base-163.repo \
Rm-f/etc/yum.repos.d/centos6-base-163.repo
Yum install-y wget
Wget-4--no-cache http://mirrors.163.com/.help/CentOS6-Base-163.repo \
-o/etc/yum.repos.d/centos6-base-163.repo



Mv/etc/yum.repos.d/centos-base.repo/etc/yum.repos.d/centos-base.repo.bak



Yum Makecache && yum update-y && rm-f/etc/yum.repos.d/centos-base.repo



Yum install NTP wget cpp gcc gcc-c++ gcc-g77 make unzip libtool \
Libtool-ltdl-devel libc-client-devel libstdc++-devel db4-utils libcap-devel \
Expat-devel perl pam-devel perl-time-hires libaio-devel bzr patch bzip2-devel \
CMake Bison libevent-devel ncurses-devel openssl-devel zlib-devel \
Libxml2-devel tcp_wrappers-devel nasm Lemon flex libxpm-devel fontconfig-devel \
Pcre-devel Sqlite-devel perl-extutils-embed Neon-devel



# CentOS 5
Yum Install Libmcrypt-devel Mhash-devel



# System with PNG, JPEG, FreeType
Yum Install Libpng-devel libjpeg-devel freetype-devel



# Libiconv
./configure
Make && make install
echo "/usr/local/lib" >>
/etc/ld.so.conf.d/service_lib.conf &&/sbin/ldconfig



# Libunwind
Cflags=-fpic./configure
Make Cflags=-fpic && make cflags=-fpic Install



# Gperftools
./configure--enable-frame-pointers
Make && make install
/sbin/ldconfig



# MySQL 5.5
Groupadd mysql-g 1002
Useradd mysql-u 1002-g mysql-s/sbin/nologin



Rm-f CMakeCache.txt
CMake \
. -dcmake_install_prefix=/data/service/mysql \
-dmysql_datadir=/data/data/mysql \
-DSYSCONFDIR=/DATA/SERVICE/MYSQL/ETC \
-dmysql_unix_addr=/tmp/mysql.sock \
-dwith_innobase_storage_engine=1 \
-dwith_memory_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwith_example_storage_engine=1 \
-dwith_partition_storage_engine=1 \
-dwith_archive_storage_engine=1 \
-dwith_myisam_storage_engine=1 \
-dwith_perfschema_storage_engine=1 \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dwith_extra_charsets=all \
-dwith_readline=1 \
-denabled_local_infile=1 \
-dmysql_tcp_port=3306 \
-dwith_debug=0
Make && make install



More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/





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.