快速业务通道

网站运维架构设计及安装过程(linux nginx php-fpm pgsql memcached varnish mysql)

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-14
e && make install

2、编译安装MySQL 5.1.44
/usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql
tar zxvf mysql-5.1.44.tar.gz
cd mysql-5.1.44/
./configure --prefix=/usr/local/web_server/mysql/ --enable-shared --enable-assembler --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=innobase --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8 --with-mysqld-user=mysql
make && make install
mkdir /usr/local/web_server/mysql/var
mkdir /usr/local/web_server/mysql/tmp
mkdir /usr/local/web_server/mysql/logs
mkdir /usr/local/web_server/mysql/etc
chmod w /usr/local/web_server/mysql/
chown -R mysql:mysql /usr/local/web_server/mysql/
cp support-files/mysql.server /etc/init.d/mysqld
chmod 700 /etc/init.d/mysqld
cp support-files/my-huge.cnf /etc/my.cnf
/usr/local/web_server/mysql/bin/mysql_install_db --basedir=/usr/local/web_server/ --datadir=/usr/local/web_server/mysql/var --user=mysql
登陆到mysql,执行一下语句:
grant all PRIVILEGES on *.* to mysql@''localhost'' identified by ''123456'';
grant all PRIVILEGES on *.* to mysql@''%'' identified by ''123456'';
执行了上面的语句后,再执行下面的语句,方可立即生效.
flush privileges;

3. 安装postgresql
/usr/sbin/groupadd postgres
/usr/sbin/useradd -g postgres postgres
tar jxvf postgresql-8.3.12.tar.bz2
cd postgresql-8.3.12
./configure --prefix=/usr/local/web_server/pgsql
make && make install
chmod w /usr/local/web_server/pgsql/
chown -R postgres:postgres /usr/local/web_server/pgsql/

4、编译安装PHP(FastCGI模式)
tar zxvf php-5.2.13.tar.gz
gzip -cd php-5.2.13-fpm-0.5.13.diff.gz | patch -d php-5.2.13 -p1
cd php-5.2.13
./configure --prefix=/usr/local/web_server/php5 --with-config-file-path=/usr/local/web_server/php5/etc --with-pgsql=/usr/local/web_server/pgsql --with-pdo-pgsql=/usr/local/web_server/pgsql --with-iconv-dir=/usr/local/web_server/ --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 --with-libevent=/usr/local/web_server/libevent/ --enable-force-cgi-redirect --enable-mbstring=all --with-mcrypt=/usr/local/web_server/ --with-gd --enable-gd-native-ttf --with-openssl --with-pcre-dir=/usr/local/web_server/pcre/ --with-pcre-regex=/usr/local/web_server/pcre --with-mhash --enable-pcntl --enable-sockets --without-sqlite --without-pdo-sqlite --enable-memcache --enable-zip --with-mysql=/usr/local/web_server/mysql --with-mysqli=/usr/local/web_server/mysql/bin/mysql_config --with-pdo-mysql=shared,/usr/local/web_server/mysql --enable-sysvshm
ZEND_EXTRA_LIBS=''-liconv'' make
(如果出现错误,按照以下方式做
编辑 Makefile 大约 70 行左右的地方:
EXTRA_LIBS = ….. -lcrypt
加上 -li

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号