lnmp安装文档[网络技术]
本文“lnmp安装文档[网络技术]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
环境:操作系统:centos 5.5 32位 服务器地址:192.168.1.101
软件版本:pcre-8.12.zip nginx-1.0.5.tar.gz mysql-5.1.55.tar.gz php-5.3.6.tar.gz
1 安装pcre
unzip pcre-8.12.zip
cd pcre-8.12
./configure
make && make install
cd ..
2 安装nginx
useradd nginx -s /sbin/nologin
tar -zxvf nginx-1.0.5.tar.gz
cd nginx-1.0.5
./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
3安装mysql
参考我博客写的mysql 安装文档
4 安装php预备工作
a curl安装
tar -zxvf curl-7.15.0.tar.gz
cd curl-7.15.0
./configure --prefix=/usr/local/curl
make && make install
b expat安装
tar -zxvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=/usr/local/expat
make && make install
c gzip安装
tar -zxvf gzip-1.3.5.tar.gz
cd gzip-1.3.5
./configure --prefix=/usr/local/gzip
make && make install
D.libxml2安装
tar -zxvf libxml2-2.6.19.tar.gz
cd libxml2-2.6.19
./configure --prefix=/usr/local/libxml2
make && make install
E.zlib安装
tar -zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make && make install
F.jpeg6安装
mkdir -p /usr/local/jpeg6
mkdir -p /usr/local/jpeg6/bin
mkdir -p /usr/local/jpeg6/lib
mkdir -p /usr/local/jpeg6/include
mkdir -p /usr/local/jpeg6/man
mkdir -p /usr/local/jpeg6/man1
mkdir -p /usr/local/jpeg6/man/man1
tar -zvxf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
make && make install
G.安装libpng
tar -zxvf libpng-1.2.37.tar.gz
cd libpng-1.2.37
./configure //这个好像上面zlib的阐明一样,不要带参数,让它默许安装到呼应目录
make && make install
H 安装freetype
tar -zvxf freetype-2.3.5.tar.gz
cd freetype-2.3.5
mkdir -p /usr/local/freetype
./configure --prefix=/usr/local/freetype
make && make install
I 安装libmcrypt 加解密包(免得登陆phpmyadmin 报错)
tar zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure
make && make install
J 安装fontconfig
tar zxvf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/freetype/bin/freetype-config
make && make install
k 安装gettext-devel
yum -y install gettext gettext-devel
(假如不安装,make gd时报错`AM_ICONV’not found in library )
L安装gd
tar -zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg6/ --with-png --with-zlib --with-freetype=/usr/local/freetype/ --with-fontconfig=/usr/local/fontconfig
make && make install
5 安装php
履行下面两个号令,以防编译php报错
cp /usr/local/mysql/bin/mysql_config /usr/bin/mysql_config
ln -s /usr/local/mysql/include/mysql/mysql.h /usr/include/
tar -zxvf php-5.3.6.tar.gz
cd php-5.3.6
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-gd=/usr/local/gd --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-jpeg-dir=/usr/local/jpeg6/ --with-zlib-dir --enable-mbstring=all --with-pdo-mysql --with-freetype-dir=/usr/local/freetype --with-mcrypt --enable-sockets --enable-mbstring --enable-fpm
make && make install
# cp php.ini-production /usr/local/php/etc/php.ini
# vi /usr/local/php/etc/php.ini
增添date.timezone = Asia/Shanghai
更改short_open_tag = Off 为short_open_tag = On (开启短格局支持)
更改expose_php = on 为expose_php = off (在curl中躲藏php版本号)
# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
# vi /usr/local/php/etc/php-fpm.conf 撤消以下;分号注释
1 ;pid = run/php-fpm.pid
2 ;pm.start_servers = 20
以上是“lnmp安装文档[网络技术]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |