最近配置了几台Web服务器,将安装笔记贴出来吧。没时间像以前那样,将文章写的那样系统了,请见谅。详细配置,可以看以前的旧文章:

  http://blog.zyan.cc/nginx_php_v6

  1、安装Nginx:
mkdir -p /Data/tgz
cd /Data/tgz
yum install wget
yum install pcre
yum install openssl*
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers make
yum -y install gd gd2 gd-devel gd2-devel
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
ulimit -SHn 65535
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.gz
tar zxvf pcre-8.32.tar.gz
cd pcre-8.32
./configure --prefix=/Data/apps/pcre
make && make install
cd ../

wget http://nginx.org/download/nginx-1.5.2.tar.gz
tar zxvf nginx-1.5.2.tar.gz
cd nginx-1.5.2
./configure --user=www --group=www --prefix=/Data/apps/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/Data/tgz/pcre-8.32 --with-http_realip_module --with-http_image_filter_module
make
make install
cd ../


  2、安装 MySQL:
wget http://downloads.mysql.com/archives/mysql-5.6/mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
tar zxvf mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.6.10-linux-glibc2.5-x86_64 /Data/apps/mysql
/usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql
mkdir -p /Data/data/mysql/data
yum install libaio
/Data/apps/mysql/scripts/mysql_install_db --basedir=/Data/apps/mysql --datadir=/Data/data/mysql/data --user=mysql

sed -i "s#/usr/local/mysql#/Data/apps/mysql#g" /Data/apps/mysql/bin/mysqld_safe


  3、安装PHP依赖库
mkdir -p /Data/apps/libs/
wget http://www.ijg.org/files/jpegsrc.v9.tar.gz    
tar zxvf jpegsrc.v9.tar.gz
cd jpeg-9/
./configure --prefix=/Data/apps/libs --enable-shared --enable-static --prefix=/Data/apps/libs
make
make install
cd ../

wget http://prdownloads.sourceforge.net/libpng/libpng-1.6.2.tar.gz
tar zxvf libpng-1.6.2.tar.gz
cd libpng-1.6.2/
./configure --prefix=/Data/apps/libs
make
make install
cd ../

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.gz
tar zxvf freetype-2.4.12.tar.gz
cd freetype-2.4.12/
./configure --prefix=/Data/apps/libs
make
make install
cd ../


wget "http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz?big_mirror=0"
wget "http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?big_mirror=0"
wget "http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?big_mirror=0"


tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure --prefix=/Data/apps/libs
make
make install
cd libltdl/
./configure --prefix=/Data/apps/libs --enable-ltdl-install
make
make install
cd ../../


tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure --prefix=/Data/apps/libs
make
make install
cd ../


vi /etc/ld.so.conf

添加:
/Data/apps/libs/lib

然后:
ldconfig


tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
export LDFLAGS="-L/Data/apps/libs/lib -L/usr/lib"
export CFLAGS="-I/Data/apps/libs/include -I/usr/include"
touch malloc.h
./configure --prefix=/Data/apps/libs --with-libmcrypt-prefix=/Data/apps/libs
make
make install
cd ../


  4、编译安装PHP 5.5
wget http://www.php.net/get/php-5.5.1.tar.gz/from/tw2.php.net/mirror
tar zxvf php-5.5.1.tar.gz
cd php-5.5.1/
export LIBS="-lm -ltermcap -lresolv"
export DYLD_LIBRARY_PATH="/Data/apps/mysql/lib/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/lib64"
export LD_LIBRARY_PATH="/Data/apps/mysql/lib/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/lib64"
./configure --prefix=/Data/apps/php --with-config-file-path=/Data/apps/php/etc --with-mysql=/Data/apps/mysql --with-mysqli=/Data/apps/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir=/Data/apps/libs --with-jpeg-dir=/Data/apps/libs --with-png-dir=/Data/apps/libs --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt=/Data/apps/libs --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-opcache --with-pdo-mysql --enable-maintainer-zts
make
make install
cp php.ini-development /Data/apps/php/etc/php.ini
cd ../


ln -s /Data/apps/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
mv /Data/apps/php/etc/php-fpm.conf.default /Data/apps/php/etc/php-fpm.conf


  5、编译安装PHP扩展
wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tar zxvf autoconf-latest.tar.gz
cd autoconf-2.69/
./configure --prefix=/Data/apps/libs
make
make install
cd ../

wget http://pecl.php.net/get/memcache-2.2.7.tgz
tar zxvf memcache-2.2.7.tgz
cd memcache-2.2.7/
export PHP_AUTOCONF="/Data/apps/libs/bin/autoconf"
export PHP_AUTOHEADER="/Data/apps/libs/bin/autoheader"
/Data/apps/php/bin/phpize
./configure --with-php-config=/Data/apps/php/bin/php-config
make
make install
cd ../


  打开 /Data/apps/php/etc/php.ini 查找 ; extension_dir = "ext"
  在其后增加一行:
extension = "memcache.so"


Tags: , , , ,



技术大类 » Web服务器 | 评论(295) | 引用(0) | 阅读(247722)
dhrehdwk
2023-12-15 00:44
Baked Goods: Incorporate dried aronia berries into muffins, cakes, or granola bars for added texture and nutrition.잣효능超级食品松子的好处和副作用ファットの効能と副作用pine nuts
dhrehdwk
2023-12-15 00:44
Salads: Sprinkle fresh or dried aronia berries on salads to give them a unique and flavorful twist.해바라기씨효능超级食品葵花籽的好处和副作用ひまわりの効能と副作用sunflower seeds
dhrehdwk
2023-12-15 00:46
in moderation. If you have specific health concerns or are taking medications, consult with a healthcare professional before making aronia berries a regular part of your diet.피스타치오효능超级食品开心果的好处和副作用ピスタチオの効能と副作用Pistachios
dhrehdwk
2023-12-15 00:46
dhrehdwk
2023-12-15 00:47
dhrehdwk
2023-12-15 00:47
Pine mushrooms, also known as matsutake mushrooms, are a good source of various nutrients, including B-vitamins, copper, potassium, and selenium.Limeライムの効能と副作用超级食物青柠的好处和副作用라임효능
dhrehdwk
2023-12-15 00:47
These mushrooms contain antioxidants that help neutralize free radicals, potentially reducing oxidative stress in the body.로즈마리효능迷迭香的好处和副作用ローズマリーの効能と副作用Rosemary
dhrehdwk
2023-12-15 00:47
Selenium, present in pine mushrooms, is essential for the proper functioning of the immune system,야콘효능超级食品雪莲果的好处和副作用ヤコンの効能と副作用 yacon
dhrehdwk
2023-12-15 00:47
supporting the body's defenses against infections.엉겅퀴효능蓟的好处和副作用アザミの効能と副作用thistle
dhrehdwk
2023-12-15 00:48
Compounds in pine mushrooms may have anti-inflammatory properties, which can be beneficial for conditions associated with inflammation.익모초효능一草苔的好处和副作用イクモチョの効能と副作用motherwort
dhrehdwk
2023-12-15 00:48
Mushrooms are a good source of dietary fiber, which supports digestive health by promoting regular bowel미역효능超级食品海藻的好处和副作用ワカメの効能と副作用seaweed
dhrehdwk
2023-12-15 00:48
movements and nourishing gut-friendly bacteria.Side Effects and Considerations:Allergic Reactions:청경채효능超级食品白菜的好处和副作用青慶菜の効能と副作用Bok Choy
dhrehdwk
2023-12-15 00:48
Individuals with mushroom allergies should avoid pine mushrooms to prevent allergic reactions. It's crucial to know your specific mushroom allergies before consuming any wild mushrooms.아로니아효능超级食品野樱莓的好处和副作用アロニアの効能と副作用Aronia
dhrehdwk
2023-12-15 00:49
Foraging for wild mushrooms carries risks, as some toxic mushrooms can resemble edible ones. Mistaken송이버섯효능超级食品松茸的好处和副作用マッシュルームの効能と副作用pine mushrooms
dhrehdwk
2023-12-15 00:49
identification can lead to severe poisoning. Only consume pine mushrooms if you are an experienced forager or 표고버섯효능超级食品香菇的好处和副作用シイタケの効能と副作用shiitake mushrooms
dhrehdwk
2023-12-15 00:49
dhrehdwk
2023-12-15 00:49
Some individuals may experience digestive discomfort or indigestion when consuming mushrooms. Cooking them thoroughly can make them more digestible.영지버섯효능超级食品灵芝的好处和副作用ヨンジキノコの効能と副作用Reishi Mushroom
dhrehdwk
2023-12-15 00:49
If you are taking medications or have existing health conditions, consult with a healthcare professional before adding pine mushrooms to your diet, 능이버섯효능超级食品 Neungi 蘑菇的好处和副作用ツキノコの効能と副作用Neungi mushroom
dhrehdwk
2023-12-15 00:49
as they may interact with certain medications or conditions.Pregnancy and Breastfeeding:곶감효능超级食品柿干的好处和副作用岬の効能と副作用dried persimmon
分页: 10/15 第一页 上页 5 6 7 8 9 10 11 12 13 14 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]