最近配置了几台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) | 阅读(248429)
dhrehdwk
2023-12-15 01:00
responses. If you experience any adverse reactions, discontinue use and seek medical attention.해삼효능sea cucumber마누카꿀효능Manuka Honey
dhrehdwk
2023-12-15 01:00
Excessive iodine intake during pregnancy can have adverse effects. Pregnant and breastfeeding individuals사과효능Benefits of Superfood Apples굴의효능Oysters
dhrehdwk
2023-12-15 01:00
should consult with a healthcare professional to ensure optimal iodine levels without excess.감효능Benefits of Superfood Persimmon귤효능Benefits of Superfood Tangerine
dhrehdwk
2023-12-15 01:00
The high iodine and fiber content in kelp may cause digestive issues in some individuals,배의효능Benefits of Superfood Pear자몽효능Benefits of Superfood Grapefruit
dhrehdwk
2023-12-15 01:00
especially those with bowel disorders. It's advisable to introduce kelp gradually into the diet.바나나효능Benefits of Superfood Bananas김치효능Benefits of super food kimchi
dhrehdwk
2023-12-15 01:00
Culinary Use: Kelp can be incorporated into salads, soups, and stir-fries. It is also used to make broths and condiments.파인애플효능Benefits of Superfood Pineapple키위효능Benefits of super food kiwi
dhrehdwk
2023-12-15 01:01
Supplements: Kelp supplements are available in various forms, including capsules and powders. If using 블랙베리효능Benefits of superfood blackberries비트효능양파효능
dhrehdwk
2023-12-15 01:01
supplements, choose reputable brands to ensure quality and safety.아보카도효능Benefits of Superfood Avocado아사히베리효능Benefits of Superfood Asahi Berry
dhrehdwk
2023-12-15 01:01
Seaweed Snacks: Roasted kelp or seaweed snacks are popular and provide a convenient way to enjoy the benefits of kelp.석류효능대추효능비트의효능Benefits of Garlic
dhrehdwk
2023-12-15 01:01
Kelp, with its nutrient richness, is a valuable addition to a balanced diet. However, it's crucial to be mindful of iodine intake, especially for individuals with플레인요거트효능연어효능호두효능모과효능
dhrehdwk
2023-12-15 01:01
thyroid conditions or those who are pregnant. As with any supplement or food, moderation is key, and consulting with a healthcare professional is advisable,시금치효능토마토효능밤효능콩효능
dhrehdwk
2023-12-15 01:01
Tell me about the benefits and side effects of seaweed.스테비아효능비파열매효능초당옥수수효능브로콜리효능
dhrehdwk
2023-12-15 01:02
dhrehdwk
2023-12-15 01:02
Seaweed: Unlocking Benefits and Navigating Considerations대추효능마누카꿀효능아스파라거스효능오이효능
dhrehdwk
2023-12-15 01:02
Seaweed is a nutritional powerhouse, packed with vitamins (such as A, B, C, and E), minerals라임효능아로니아효능단호박효능
dhrehdwk
2023-12-15 01:02
(including iodine, iron, calcium, and magnesium), and essential amino acids.한자2급독학워드1급독학컴퓨터그래픽스운용기능사독학
dhrehdwk
2023-12-15 01:02
Certain seaweeds, like kelp, are particularly rich in iodine. Iodine is crucial for thyroid health전기공사기사독학도라지컴퓨터활용능력2급독학
dhrehdwk
2023-12-15 01:02
and the production of thyroid hormones, essential for metabolism.워싱턴스퀘어붉은무공훈장사무자동화산업기사독학
dhrehdwk
2023-12-15 01:03
Seaweed contains soluble and insoluble fibers that promote digestive health. Fiber aids in bowe전기기능사독학기계설계산업기사독학소방안전관리자1급기출허클베리핀의모험
dhrehdwk
2023-12-15 01:03
l regularity and supports a healthy gut microbiome.Antioxidant Properties:사일러스마너테스더버빌검은고양이주홍글씨
分页: 14/15 第一页 上页 9 10 11 12 13 14 15 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]