wget http://mozbuildtools.googlecode.com/files/libiconv-1.13.1.tar.gz
wget http://lcmp.googlecode.com/files/libmcrypt-2.5.8.tar.gz
wget http://acelnmp.googlecode.com/files/mhash-0.9.9.9.tar.gz
wget http://vps.googlecode.com/files/mcrypt-2.6.8.tar.gz
wget http://lnamp-web-server.googlecode.com/files/cmake-2.8.4.tar.gz
wget http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz
wget http://lnamp-web-server.googlecode.com/files/mysql-5.5.16.tar.gz
wget http://lnamp-web-server.googlecode.com/files/php-5.2.17.tar.gz
wget http://lnamp-web-server.googlecode.com/files/memcache-2.2.6.tgz
wget http://lnamp-web-server.googlecode.com/files/eaccelerator-0.9.6.1.tar.bz2
wget http://lnamp-web-server.googlecode.com/files/PDO_MYSQL-1.0.2.tgz
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
wget http://lnamp-web-server.googlecode.com/files/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
wget http://webserver.googlecode.com/files/pcre-8.10.tar.gz
wget http://webserver.googlecode.com/files/nginx-0.8.54.tar.gz
#!/bin/bash
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1/
./configure --prefix=/usr/local
make
make install
cd ../
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../
tar zxvf cmake-2.8.4.tar.gz
cd cmake-2.8.4/
./configure --prefix=/usr
gmake
gmake install
cd ../
tar zxvf bison-2.4.3.tar.gz
cd bison-2.4.3
./configure
make
make install
cd ../
mkdir -p /data/mysqldata
chown -R mysql:mysql /data/mysqldata
tar zxvf mysql-5.5.16.tar.gz
cd mysql-5.5.16
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql -DMYSQL_DATADIR=/data/mysqldata -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_SSL=yes -DWITH_EXTRA_CHARSETS=all -DWITH_READLINE=on
make
make install
/usr/local/webserver/mysql/scripts/mysql_install_db --basedir=/usr/local/webserver/mysql --datadir=/data/mysqldata --user=mysql
cp support-files/my-huge.cnf /etc/my.cnf
cd ../
cp /usr/local/webserver/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
mkdir /usr/local/webserver/mysql/include/mysql
chown -R mysql:mysql /usr/local/webserver/mysql/include/mysql
ln -s /usr/local/webserver/mysql/include/* /usr/local/webserver/mysql/include/mysql/
mkdir /usr/lib/mysql
chown -R mysql:mysql /usr/lib/mysql
ln -s /usr/local/webserver/mysql/lib/* /usr/lib/mysql/
ln -s /usr/local/webserver/mysql/lib/* /usr/lib/
mkdir /usr/include/mysql
chown -R mysql:mysql /usr/include/mysql
ln -s /usr/local/webserver/mysql/include/* /usr/include/mysql/
ln -s /usr/local/webserver/mysql/include/mysql /usr/include/mysql
ln -s /usr/local/webserver/mysql/lib/libmysqlclient_r.so.18.0.0 /usr/lib/libmysqlclient_r.so.18
ln -s /usr/local/webserver/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18
ln -s /usr/local/webserver/mysql/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18
tar zxvf php-5.2.17.tar.gz
gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1
cd php-5.2.17/
./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-dist /usr/local/webserver/php/etc/php.ini
cd ../
tar zxvf memcache-2.2.6.tgz
cd memcache-2.2.6/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd ../
tar jxvf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1/
/usr/local/webserver/php/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
mkdir -p /usr/local/webserver/eaccelerator_cache
cd ../
tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-pdo-mysql=/usr/local/webserver/mysql
make
make install
cd ../
tar zxvf ImageMagick.tar.gz
cd ImageMagick-6.5.1-2/
./configure
make
make install
cd ../
tar zxvf imagick-2.3.0.tgz
cd imagick-2.3.0/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd ../
tar -zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
cd ZendOptimizer-3.3.9-linux-glibc23-i386/
mkdir -p /usr/local/Zend/lib
cp data/5_2_x_comp/ZendOptimizer.so /usr/local/Zend/lib/
cd ../
tar zxvf pcre-8.10.tar.gz
cd pcre-8.10/
./configure
make && make install
cd ../
tar zxvf nginx-0.8.54.tar.gz
cd nginx-0.8.54/
./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module
make && make install
cd ../
mkdir -p /data/logs
chmod +w /data/logs
chown -R www:www /data/logs
mkdir -p /usr/local/webserver/nginx/conf/vhosts
echo '' > /usr/local/webserver/nginx/conf/vhosts/publish.conf
echo '' > /usr/local/webserver/nginx/conf/vhosts/testing.conf
# ----------------- 拷贝配置文件 ---------------
\cp -f my.cnf /etc/my.cnf
\cp -f php.ini /usr/local/webserver/php/etc/php.ini
\cp -f php-fpm.conf /usr/local/webserver/php/etc/php-fpm.conf
\cp -f nginx.conf /usr/local/webserver/nginx/conf/nginx.conf
\cp -f fcgi.conf /usr/local/webserver/nginx/conf/fcgi.conf
echo "ulimit -SHn 51200" >> /etc/rc.local
echo "/usr/local/webserver/php/sbin/php-fpm start" >> /etc/rc.local
echo "/usr/local/webserver/nginx/sbin/nginx" >> /etc/rc.local
lnmp安装配置
最新推荐文章于 2024-06-09 20:44:10 发布