• 首页
  • 云服务器
  • 高防服务器
  • 外贸服务器
  • 服务器租用
  • 客服中心
易网主机
电脑版
首页 > 文章中心 > 环境搭建

LAMP服务器就环境的建立

2014-07-13

  RedHat Enterprise Linux下的Apache 2.2.6 + PHP 5.2.5+ Mysql5.0.46 + Zend Optimizer  3.3.0 + PHPMyAdmin 2.11.1 源码安装配置.

  说明:

  RPM包和源码包存放位置 /usr/local/src
  源码包编译安装位置(prefix) /usr/local/xxx

  脚本以及维护程序存放位置 /usr/local/sbin
  MySQL 数据库位置 /var/lib/mysql
  Apache 网站根目录 /usr/loca/apache2/htdocsl
  Apache 虚拟主机日志根目录 /data/logs/www
  yum RPM包信息文件 /etc/yum.list
  mysql 5.0.46安装配置
  mysql 5.0.46是企业版本,貌似双数版本都是企业版本了。个人觉得代码质量要比社区版本要好一些。大家可以下载,免费使用。并不需要向mysql公司交钱。

  cd /usr/local/src
  # wget http://mirror.provenscaling.com/mysql/enterprise/source/5.0/mysql-5.0.46.tar.gz
  # tar xzvf mysql-5.0.46.tar.gz
  # cd mysql-5.0.46

  修改mysql 客户端最大连接数, 默认的只有100,远远达不到我们的要求。

  # vi sql/mysqld.cc

  搜索找到下面一行:
  {"max_connections", OPT_MAX_CONNECTIONS,
  "The number of simultaneous clients allowed.", (gptr*) &max_connections,
  (gptr*) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 100, 1, 16384, 0, 1,
  0},

  将其中的100改为1500, 当然小点也可以,根据你的需要来,不建议改的太大。

  {"max_connections", OPT_MAX_CONNECTIONS,
  "The number of simultaneous clients allowed.", (gptr*) &max_connections,
  (gptr*) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 1500, 1, 16384, 0, 1,
  0},

  保存。

  # ./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-enterprise-gpl --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-innodb --without-ndb-debug --without-isam


  配置成功会提示:

  MySQL has a Web site at http://www.mysql.com/ which carries details on the
  latest release, upcoming features, and other information to make your
  work or play with MySQL more productive. There you can also find
  information about mailing lists for MySQL discussion.

  Remember to check the platform specific part of the reference manual for
  hints about installing MySQL on your platform. Also have a look at the
  files in the Docs directory.

  Thank you for choosing MySQL!
  # make
  编译的时间可能会比较长,毕竟优化的比较厉害。

  # mamake ske install

  编译安装完成后执行后续操作:
  # useradd mysql //添加 mysql 用户
  # cd /usr/local/mysql
  # bin/mysql_install_db --user=mysql
  # chown -R root:mysql . //设置权限,注意后面有一个 "."
  # chown -R mysql /var/lib/mysql //设置 mysql 目录权限

技术专线:028-62454538(周一至周五)
夜间值班:18982208090(24H) 13438034514(24H)
公司地址:成都市金牛区蜀汉路238号元亨商贸楼605室
电子邮件:service#34514.cn(#替@)
蜀ICP备09003074号-1 川公网安备 51010602000340号
  • QQ咨询

  • 在线咨询

  • Skype咨询

  • 联系我们