免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 9599 | 回复: 11
打印 上一主题 下一主题

[Web] CentOS5.2配置LAMP全过程(第二版) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-15 07:29 |只看该作者 |倒序浏览
最近发现我以前写centos5.2的配置过程,里面有不少错误的地方。很多编译安装的软件,事实上,好像没有最后用到。这也是我重新写一次。

这次学会了几个sed的用法,所以很多的改动我尽量用sed来完成,这样就简单很多。还有就是系统的初始设置。我已经重新整理过来。基本可以做到一个脚本完成全过程。

下面的配置,很多关于安全的设置,都没有做,现在还没有搞的太明白,如果web是给内网使用或者测试,那么应该问题不大,如果是拿到外面使用,估计还是需要做不少的优化。如cache,防盗链这些。



参考文档

参考了网上不少文档,下面的3篇是重点,不少代码都是从下面复制过来的。

RHEL4上安装基于postfix的全功能邮件服务器(全部使用目前最新源码包构建) (http://bbs.chinaunix.net/thread-987344-1-1.html)
Nginx 0.7.x + PHP 5.2.6(FastCGI)搭建胜过Apache十倍的Web服务器(第4版)(http://blog.s135.com/read.php/366.htm)
基于CentOS构建高性能的LAMP平台.(http://bbs.linuxtone.org/thread-122-1-1.html)

文章内容分为7部分

一:系统约定
二:系统基本设置
三:下载软件
四:安装必须的软件
五:编译安装软件
六:配置apache PHP
七:测试 (通过phpinfo,phpmyadmin,sugarcrm的安装来测试)

一:系统约定
    采用Centos5.2光盘,
    软件源代码包存放位置        /usr/local/src
    源码包编译安装位置(prefix)        /usr/local/software_name
    MySQL 数据库位置        /data/mysql/data
    Apache 网站根目录        /data/www/wwwroot(虚拟主机在这个目录下)
    Apache 虚拟主机日志根目录        /data/www/logs
    Apache 运行账户        www:www
    创建两个虚拟主机    test.com linux.com

所有的配置的文件修改,都做备份,备份的名字为 文件名.save

下面的实验是用vmware station 6 创建一个 redhat AS5的vm,安装centos5.2,安装的时候,选择安装语言是英文,采用文本方式来安装,选择最小化的安装。

yum的更新,采用本地光盘的方式,这样比较快捷。

我的机器基本设置

IP:192.168.1.200/255.255.255.0

网关:192.16.1.1

DNS:192.168.1.1

hostname:ns1

二:系统基本设置

我已经把所有需要配置的内容,做一个一个脚本,只需要运行一次就可以。
  1. cd /usr/local/src

  2. vi /usr/local/src/init.sh
复制代码
  1. #####################

  2. #Diabe IPV6
  3. cp /etc/modprobe.conf /etc/modprobe.conf.save
  4. echo "alias net-pf-10 off" >> /etc/modprobe.conf
  5. echo "alias ipv6 off" >> /etc/modprobe.conf

  6. #SSH
  7. cp /etc/ssh/sshd_config /etc/ssh/sshd_config.save
  8. sed -i '/#PermitRootLogin/s/#PermitRootLogin/PermitRootLogin/' /etc/ssh/sshd_config
  9. sed -i -e '74 s/^/#/' -i -e '76 s/^/#/' /etc/ssh/sshd_config
  10. sed -i "s/#UseDNS yes/UseDNS no/" /etc/ssh/sshd_config
  11. sed -i -e '44 s/^/#/' -i -e '48 s/^/#/' /etc/ssh/sshd_config
  12. /etc/init.d/sshd restart

  13. #停止 the “beep"


  14. cp /etc/inputrc /etc/inputrc.save
  15. sed -i '/#set bell-style none/s/#set bell-style none/set bell-style none/' /etc/inputrc


  16. #关闭SElinux

  17. cp /etc/sysconfig/selinux /etc/sysconfig/selinux.save
  18. sed -i '/SELINUX=enforcing/s/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux



  19. #加载光驱

  20. mkdir /mnt/cdrom
  21. mount /dev/cdrom /mnt/cdrom
  22. echo "mount /dev/cdrom /mnt/cdrom" >> /etc/rc.local


  23. #设置yum使用本地光盘

  24. mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.save
  25. mv /etc/yum.repos.d/CentOS-Media.repo /etc/yum.repos.d/CentOS-Media.repo.save
  26. echo "[DVDISO]" >> /etc/yum.repos.d/dvdiso.repo
  27. echo "name=DVD ISO" >> /etc/yum.repos.d/dvdiso.repo
  28. echo "baseurl=file:///mnt/cdrom/" >> /etc/yum.repos.d/dvdiso.repo
  29. echo "enabled=1" >> /etc/yum.repos.d/dvdiso.repo
  30. echo "gpgcheck=0" >> /etc/yum.repos.d/dvdiso.repo


  31. #vim设置

  32. yum -y install vim-enhanced
  33. mv /bin/vi /bin/vi.save
  34. ln -s /usr/bin/vim /bin/vi
  35. cp /etc/vimrc /etc/vimrc.save
  36. sed -i "39 s/^/ set number \n filetype on\n set history=1000\n syntax on\n set tabstop=4\n set showmatch\n set vb t_vb=\n set mouse=a\n set ignorecase\n set autowrite\n /" /etc/vimrc

  37. #时间的设置
  38. yum -y install ntp
  39. ntpdate 210.72.145.44 && clock -w

  40. #安装常用软件

  41. yum -y install wget unzip

  42. #停止没有必要的服务
  43. chkconfig --list |grep 3:on |awk '{print $1}' |egrep -v 'sshd|network|syslog' |xargs -i{} chkconfig --level 3 {} off
  44. chkconfig --list | grep 3:on | cut -f1

  45. #重新启动
  46. init 6
  47. ####################
复制代码
  1. sh init.sh
复制代码
三:下载软件
  1. cd /usr/local/src

  2. vi list
复制代码
  1. http://download.filehat.com/apache/httpd/httpd-2.2.8.tar.gz
  2. http://opensource.nchc.org.tw/COSA/CNS4/cronolog-1.6.2.tar.gz
  3. http://www.libgd.org/releases/gd-2.0.35.tar.bz2
  4. http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz
  5. http://mirror.optus.net/sourceforge/m/mc/mcrypt/libmcrypt-2.5.8.tar.gz
  6. http://jaist.dl.sourceforge.net/sourceforge/mcrypt/mcrypt-2.6.7.tar.gz
  7. http://www.openssl.org/source/openssl-0.9.8h.tar.gz
  8. http://openbsd.md5.com.ar/pub/OpenBSD/OpenSSH/portable/openssh-5.0p1.tar.gz
  9. http://mysql.byungsoo.net/Downloads/MySQL-5.0/mysql-5.0.51b.tar.gz
  10. http://cn2.php.net/get/php-5.2.6.tar.bz2/from/this/mirror
  11. http://downloads.phpchina.com/zend/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
  12. ftp://ftp.cac.washington.edu/mail/imap.tar.Z
  13. http://puzzle.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.8.1-all-languages-utf-8-only.tar.gz
  14. http://dl.sugarforge.org/sugarcrm/Latest-SugarCE5.1/SugarCE5.1.0/SugarCE-5.1.0.zip
  15. http://mirror.optus.net/sourceforge/m/mh/mhash/mhash-0.9.9.tar.gz
复制代码
  1. wget -i list
复制代码
四:安装必须的软件

采用yum的方式安装
  1. yum -y install gcc make patch gcc-c++ gcc-g77 flex bison autoconf automake \
  2. 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 libtiff-devel fontconfig-devel libXpm-devel gettext-devel   pam-devel pcre-devel libtool libtool-ltdl
复制代码
五:编译安装软件


下面的内容,其实你可以复制到一个文本,比如 install.sh 运行这个脚本,我已经测试过了,整整运行了快1个小时,估计是我在vm上跑道原因。前提是你下载的软件和我是一样的,也就是软件都是通过上面的下载的。
  1. ###############################################

  2. #安装openssl
  3. cd /usr/local/src
  4. tar zxvf openssl-0.9.8h.tar.gz
  5. cd openssl-0.9.8h
  6. ./config shared zlib
  7. make
  8. make test
  9. make install
  10. mv /usr/bin/openssl /usr/bin/openssl.save
  11. mv /usr/include/openssl /usr/include/openssl.save
  12. mv /usr/lib/libssl.so /usr/lib/libssl.so.save
  13. ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
  14. ln -s /usr/local/ssl/include/openssl /usr/include/openssl
  15. ln -sv /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so
  16. cd ..


  17. #配置库文件搜索路径
  18. echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
  19. ldconfig -v

  20. #检测安装结果
  21. openssl version

  22. #安装openssh

  23. tar xvf openssh-5.0p1.tar.gz

  24. cd openssh-5.0p1

  25. ./configure \
  26.       "--prefix=/usr" \
  27.       "--with-pam" \
  28.       "--with-zlib" \
  29.       "--sysconfdir=/etc/ssh" \
  30.       "--with-ssl-dir=/usr/local/ssl" \
  31.       "--with-md5-passwords"

  32. make
  33. make install

  34. cd ..

  35. service sshd restart

  36. ssh -v

  37. #安装GD

  38. tar jxvf gd-2.0.35.tar.bz2
  39. cd gd-2.0.35
  40. aclocal
  41. ./configure --prefix=/usr/local/gd2
  42. make && make install
  43. cd ..

  44. #安装 libmcrypt


  45. tar zxvf libmcrypt-2.5.8.tar.gz

  46. cd libmcrypt-2.5.8/
  47. ./configure
  48. make
  49. make install
  50. /sbin/ldconfig
  51. cd libltdl/
  52. ./configure --enable-ltdl-install
  53. make
  54. make install
  55. cd ../../

  56. cp /usr/local/lib/libmcrypt.* /usr/lib



  57. #安装libiconv


  58. tar zxvf libiconv-1.12.tar.gz

  59. cd libiconv-1.12/
  60. ./configure --prefix=/usr/local
  61. make
  62. make install
  63. cd ../

  64. ln -s /usr/local/lib/libiconv.so.2 /usr/lib/


  65. #安装mhash

  66. tar zxvf mhash-0.9.9.tar.gz
  67. cd mhash-0.9.9/
  68. ./configure
  69. make
  70. make install
  71. cd ../
  72. ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2

  73. #安装mcrypt


  74. tar zxvf mcrypt-2.6.7.tar.gz
  75. cd mcrypt-2.6.7/
  76. ./configure
  77. make
  78. make install
  79. cd ../


  80. #安装cronolog

  81. tar xvf cronolog-1.6.2.tar.gz

  82. cd cronolog-1.6.2

  83. ./configure --prefix=/usr/local/cronolog

  84. make && make install

  85. cd ..


  86. #安装imap

  87. tar zxf imap.tar.Z
  88. cd imap-2007b
  89. make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd IP6=4
  90. echo "set disable-plaintext nil" > /etc/c-client.cf
  91. mkdir /usr/local/imap-2007b
  92. mkdir /usr/local/imap-2007b/include/
  93. mkdir /usr/local/imap-2007b/lib/
  94. chmod -R 077 /usr/local/imap-2007b
  95. rm -rf /usr/local/imap-2007b/include/*
  96. rm -rf /usr/local/imap-2007b/lib/*
  97. rm -rf /usr/sbin/imapd
  98. cp imapd/imapd /usr/sbin/
  99. cp c-client/*.h /usr/local/imap-2007b/include/
  100. cp c-client/*.c /usr/local/imap-2007b/lib/
  101. cp c-client/c-client.a /usr/local/imap-2007b/lib/libc-client.a

  102. cd ..

  103. #安装MYSQL


  104. tar zxvf mysql-5.0.51b.tar.gz

  105. cd mysql-5.0.51b

  106. ./configure \
  107.        "--prefix=/usr/local/mysql" \
  108.        "--localstatedir=/data/mysql/data" \
  109.        "--with-comment=Source" \
  110.        "--with-server-suffix=-test.com" \
  111.        "--with-mysqld-user=mysql" \
  112.        "--without-debug" \
  113.        "--with-big-tables" \
  114.        "--with-charset=gbk" \
  115.        "--with-collation=gbk_chinese_ci" \
  116.        "--with-extra-charsets=all" \
  117.        "--with-pthread" \
  118.        "--enable-static" \
  119.        "--enable-thread-safe-client" \
  120.        "--with-client-ldflags=-all-static" \
  121.        "--with-mysqld-ldflags=-all-static" \
  122.        "--enable-assembler" \
  123.        "--without-isam" \
  124.        "--without-innodb" \
  125.        "--without-ndb-debug"
  126. make && make install
  127. useradd mysql -d /data/mysql -s /sbin/nologin
  128. /usr/local/mysql/bin/mysql_install_db --user=mysql
  129. cd /usr/local/mysql
  130. chown -R root:mysql .
  131. chown -R mysql /data/mysql/data
  132. cp share/mysql/my-huge.cnf /etc/my.cnf
  133. cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld
  134. chmod 755 /etc/rc.d/init.d/mysqld
  135. chkconfig --add mysqld
  136. /etc/rc.d/init.d/mysqld start

  137. cd /usr/local/mysql/bin
  138. for i in *; do ln -s /usr/local/mysql/bin/$i /usr/bin/$i; done

  139. cd /usr/local/src

  140. mysqladmin -u root password chenshake


  141. #安装Apache

  142. tar zxvf httpd-2.2.8.tar.gz  
  143. cd httpd-2.2.8
  144. ./configure \
  145.        "--prefix=/usr/local/apache2" \
  146. "--with-included-apr" \
  147.        "--enable-so" \
  148.        "--enable-deflate=shared" \
  149.        "--enable-expires=shared" \
  150.        "--enable-rewrite=shared" \
  151.        "--enable-static-support" \
  152.        "--disable-userdir"
  153. make
  154. make install
  155. cd ..

  156. #安装PHP

  157. tar jxvf php-5.2.6.tar.bz2
  158. cd php-5.2.6
  159. ./configure \
  160. "--prefix=/usr/local/php" \
  161. "--with-apxs2=/usr/local/apache2/bin/apxs" \
  162. "--with-config-file-path=/usr/local/php/etc" \
  163. "--with-mysql=/usr/local/mysql" \
  164. "--with-gd=/usr/local/gd2" \
  165. "--with-libxml-dir=/usr" \
  166. "--with-jpeg-dir" \
  167. "--with-png-dir" \
  168. "--with-freetype-dir" \
  169. "--with-zlib " \
  170. --with-iconv-dir=/usr/local \
  171. "--with-openssl=/usr/local/ssl" \
  172. "--with-curl " \
  173. "--with-curlwrappers " \
  174. "--with-mcrypt" \
  175. "--with-imap-ssl" \
  176. "--with-imap=/usr/local/imap-2007b" \
  177. "--with-kerberos" \
  178. "--with-bz2" \
  179. "--enable-soap" \
  180. "--enable-gd-native-ttf" \
  181. "--enable-ftp" \
  182. "--enable-mbstring" \
  183. "--enable-exif" \
  184. "--disable-ipv6" \
  185. "--disable-cgi" \
  186. "--disable-cli"   

  187. make
  188. make install
  189. mkdir /usr/local/php/etc
  190. cp php.ini-dist /usr/local/php/etc/php.ini
  191. cd ..

  192. #安装Zend Optimizer (安装Zend Optimizer过程的最后不要选择重启Apache。)

  193. tar xzvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
  194. cd ZendOptimizer-3.3.3-linux-glibc23-i386
  195. ./install.sh


  196. ##########################################################################
复制代码
脚本到这里为止,因为zend的设置,我没法自动完成,只能你手动设置,如果谁知道怎么做,麻烦指导指导,注意php.ini 的位置 /usr/local/php/etc/

#设置session的存放位置和修改php上次文件的大小,最大文件25m
  1. cp /usr/local/Zend/etc/php.ini /usr/local/Zend/etc/php.ini.save
  2. sed -i -e '991 s/;//' /usr/local/Zend/etc/php.ini
  3. sed -i 's/post_max_size = 8M/ post_max_size = 30M/g' /usr/local/Zend/etc/php.ini
  4. sed -i 's/upload_max_filesize = 2M/ upload_max_filesize = 25M/g' /usr/local/Zend/etc/php.ini
  5. cd /usr/local/src
复制代码
六:配置apache PHP

创建apache的启动脚本,apache编译包里带的那个启动脚本,有一个缺点,启动和停止没有任何提示,所以就用下面这个,比较方便。
  1. vi /etc/init.d/httpd
复制代码
  1. ###################################

  2. #!/bin/bash
  3. #
  4. # Startup script for the Apache Web Server
  5. #
  6. # chkconfig: - 85 15
  7. # description: Apache is a World Wide Web server.   It is used to serve \
  8. #               HTML files and CGI.
  9. # processname: httpd
  10. # pidfile: /usr/local/apache2/logs/httpd.pid
  11. # config: /usr/local/apache2/conf/httpd.conf

  12. # Source function library.
  13. . /etc/rc.d/init.d/functions

  14. if [ -f /etc/sysconfig/httpd ]; then
  15.         . /etc/sysconfig/httpd
  16. fi

  17. # This will prevent initlog from swallowing up a pass-phrase prompt if
  18. # mod_ssl needs a pass-phrase from the user.
  19. INITLOG_ARGS=""

  20. # Path to the apachectl script, server binary, and short-form for messages.
  21. apachectl=/usr/local/apache2/bin/apachectl
  22. httpd=/usr/local/apache2/bin/httpd
  23. pid=/usr/local/apache2/logs/httpd.pid
  24. prog=httpd
  25. RETVAL=0




  26. # The semantics of these two functions differ from the way apachectl does
  27. # things -- attempting to start while running is a failure, and shutdown
  28. # when not running is also a failure.   So we just do it the way init scripts
  29. # are expected to behave here.
  30. start() {
  31.          echo -n $"Starting $prog: "
  32.         daemon $httpd $OPTIONS
  33.          RETVAL=$?
  34.          echo
  35.          [ $RETVAL = 0 ] && touch /var/lock/subsys/httpd
  36.         return $RETVAL
  37. }
  38. stop() {
  39.          echo -n $"Stopping $prog: "
  40.         killproc $httpd
  41.          RETVAL=$?
  42.          echo
  43.          [ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpd $pid
  44. }
  45. reload() {
  46.          echo -n $"Reloading $prog: "
  47.         killproc $httpd -HUP
  48.          RETVAL=$?
  49.          echo
  50. }

  51. # See how we were called.
  52. case "$1" in
  53.    start)
  54.         start
  55.         ;;
  56.   stop)
  57.         stop
  58.         ;;
  59.   status)
  60.         status $httpd
  61.          RETVAL=$?
  62.          ;;
  63.   restart)
  64.         stop
  65.          start
  66.         ;;
  67.   condrestart)
  68.          if [ -f $pid ] ; then
  69.                  stop
  70.                  start
  71.          fi
  72.         ;;
  73.   reload)
  74.         reload
  75.         ;;
  76.   graceful|help|configtest|fullstatus)
  77.         $apachectl $@
  78.         RETVAL=$?
  79.          ;;
  80.    *)
  81.          echo $"Usage: $prog {start|stop|restart|condrestart|reload|status"
  82.         echo $"|fullstatus|graceful|help|configtest}"
  83.         exit 1
  84. esac

  85. exit $RETVAL

  86. ###########################
复制代码
设置可运行和开机启动
  1. chmod +x /etc/rc.d/init.d/httpd
  2. chkconfig --add httpd
  3. chkconfig --level 3 httpd on
复制代码
配置apache
  1. groupadd www -g 48
  2. useradd -u 48 -g www www
  3. mkdir -p /data/www/wwwroot/linux.com
  4. mkdir -p /data/www/wwwroot/test.com
  5. mkdir -p /data/logs
  6. chmod +w /data/www/wwwroot
  7. chown -R www:www /data/www/wwwroot
  8. cp /usr/local/apache2/conf/httpd.conf /usr/local/apache2/conf/httpd.conf.save
复制代码
编辑httpd.conf
  1. sed -i -e '121 s/^/#/' -i -e '122 s/^/#/' /usr/local/apache2/conf/httpd.conf
  2. sed -i -e "s/User daemon/User www/" -i -e "s/Group daemon/Group www/" /usr/local/apache2/conf/httpd.conf
  3. sed -i 's/DirectoryIndex index.html/ DirectoryIndex index.php index.html index.htm/g' /usr/local/apache2/conf/httpd.conf
  4. sed -i -e '101 s/^#//g' -i -e '374 s/^#//g' -i -e '389 s/^#//g' -i -e '392 s/^#//g' -i -e '401 s/^#//g' /usr/local/apache2/conf/httpd.conf
  5. sed -i "58 s/^/AddType application\/x-httpd-php .php/" /usr/local/apache2/conf/httpd.conf
复制代码
配置虚拟主机

备份相关配置文件
  1. mv /usr/local/apache2/conf/extra/httpd-vhosts.conf /usr/local/apache2/conf/extra/httpd-vhosts.conf.save
  2. mv /usr/local/apache2/conf/extra/httpd-default.conf /usr/local/apache2/conf/extra/httpd-default.conf.save
  3. mv /usr/local/apache2/conf/extra/httpd-mpm.conf /usr/local/apache2/conf/extra/httpd-mpm.conf.save
复制代码
创建3个apache相关的文件
  1. vi /usr/local/apache2/conf/extra/httpd-vhosts.conf
复制代码
  1. NameVirtualHost *:80

  2. <VirtualHost *:80>
  3.     ServerAdmin shake.chen@gmail.com
  4.     DocumentRoot "/data/www/wwwroot/test.com"
  5.     ServerName test.com
  6.     ServerAlias bbs.test.com
  7.     ErrorLog "logs/test.com-error_log"
  8.     CustomLog "|/usr/local/cronolog/sbin/cronolog /data/logs/access_www.test.com.%Y%m%d" combined
  9. </VirtualHost>

  10. <VirtualHost *:80>
  11.     ServerAdmin shake.chen@gmail.com
  12.     DocumentRoot "/data/www/wwwroot/linux.com"
  13.     ServerName linux.com
  14.     ServerAlias bbs.linux.com
  15.     ErrorLog "logs/linux.com-error_log"
  16.     CustomLog "|/usr/local/cronolog/sbin/cronolog /data/logs/access_www.linux.com.%Y%m%d" combined
  17. </VirtualHost>
复制代码
  1. vi /usr/local/apache2/conf/extra/httpd-default.conf
复制代码
  1. Timeout 15
  2. KeepAlive Off
  3. MaxKeepAliveRequests 50
  4. KeepAliveTimeout 5
  5. UseCanonicalName Off
  6. AccessFileName .htaccess
  7. ServerTokens Prod
  8. ServerSignature Off
  9. HostnameLookups Off
复制代码
  1. vi /usr/local/apache2/conf/extra/httpd-mpm.conf
复制代码
  1. <IfModule mpm_prefork_module>
  2.     ServerLimit         2000
  3.     StartServers          10
  4.     MinSpareServers       10
  5.     MaxSpareServers      15
  6.     MaxClients          2000
  7.     MaxRequestsPerChild   10000
  8. </IfModule>
复制代码
七:测试


修改本地hosts文件
192.168.1.200    www.test.com

启动Apache
  1. service httpd start
复制代码
测试php
  1. cd /data/www/wwwroot/test.com
  2. vi info.php
复制代码
  1. <?

  2. phpinfo()

  3. ?>
复制代码
这个时候 http://192.168.1.200/info.php 或者 http://www.test.com/info.php 就可以看到php的信息。


安装phpadmin
  1. cd /usr/local/src
  2. tar zxvf phpMyAdmin-2.11.8.1-all-languages-utf-8-only.tar.gz
  3. cp -rf phpMyAdmin-2.11.8.1-all-languages-utf-8-only /data/www/wwwroot/test.com/phpmyadmin
  4. cd /data/www/wwwroot/test.com/phpmyadmin

  5. cp config.sample.inc.php config.inc.php

  6. sed -i -e "/^\$cfg\['blowfish_secret'\]/{ s@'';@'88888888888888888';@; }" config.inc.php
复制代码
这个时候,你就可以通过 http://192.168.1.200/phpmyadmin 或者http://www.test.com/phpmyadmin 来进行数据库管理, 我上面已经给mysql设置的密码。

user:root
password:chenshake




安装sugarcrm

sugarcrm的邮件模块需要用到imap,ssl,所以我编译的时候,需要吧imap,curl模块编译进去.
  1. cd /usr/local/src
  2. unzip SugarCE-5.1.0.zip
  3. mv SugarCE-Full-5.1.0/ /data/www/wwwroot/test.com/sugarcrm
  4. chmod -R 777 /data/www/wwwroot/test.com/sugarcrm/
复制代码
这个时候,你通过连接访问一步一步安装就基本没有问题了。

[ 本帖最后由 eddiechen 于 2008-9-16 18:05 编辑 ]

Snap2.gif (10.71 KB, 下载次数: 71)

Snap2.gif

Snap3.gif (15.07 KB, 下载次数: 69)

Snap3.gif

Snap5.gif (4.82 KB, 下载次数: 62)

Snap5.gif

论坛徽章:
0
2 [报告]
发表于 2008-09-15 13:01 |只看该作者
顶一下

论坛徽章:
0
3 [报告]
发表于 2008-09-16 16:40 |只看该作者
楼主怎么不做成PDF或者doc格式呀,不过还是很感谢

论坛徽章:
0
4 [报告]
发表于 2008-10-05 23:34 |只看该作者
有个软件下不了,请更新地址:http://www.phpchina.com/download ... glibc23-i386.tar.gz

论坛徽章:
0
5 [报告]
发表于 2008-10-06 09:06 |只看该作者
经过一个晚上努力,基本按照楼主的办法配置成功了,只是最后一步   通过连接访问一步一步安装  ,这个是怎么连接,我找不到连接的地址啊?

论坛徽章:
0
6 [报告]
发表于 2008-10-06 10:21 |只看该作者
嚯嚯,终于搞定了
vilian 该用户已被删除
7 [报告]
发表于 2009-04-30 12:23 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
8 [报告]
发表于 2009-05-01 14:41 |只看该作者
原帖由 turionboy 于 2008-9-16 16:40 发表
楼主怎么不做成PDF或者doc格式呀,不过还是很感谢



实战性的文章我都喜欢,谢谢。期待更多精品。

论坛徽章:
0
9 [报告]
发表于 2009-05-02 12:33 |只看该作者
喜欢这样的,够详细。大家加油! 放些实战的文档来
kkfd008 该用户已被删除
10 [报告]
发表于 2009-06-24 16:17 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP