Chinaunix首页 | 论坛 | 博客
  • 博客访问: 57086
  • 博文数量: 17
  • 博客积分: 720
  • 博客等级: 军士长
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-21 13:34
文章分类

全部博文(17)

文章存档

2011年(1)

2009年(1)

2008年(5)

2007年(6)

2006年(4)

我的朋友
最近访客

分类: 系统运维

2008-02-02 16:47:38

A. Install MySQL on Linux (From MySQL official site -- )

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
       -fno-exceptions -fno-rtti" ./configure \
       --prefix=/usr/local/mysql --enable-assembler \
       --with-mysqld-ldflags=-all-static
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> bin/mysqld_safe --user=mysql &
 
B. Install apache
 
shell> tar xjvf httpd-VERSION.tar.bz2
shell> cd httpd-VERSION
shell> ./configure --prefix=/usr/local/apache --enable-so
      PS: If you want to enable the most modules of apache,you can use "--enable-module=most". "--enable-modules=all" will enable all the modules of apache.
shell> make
shell> make install
 
C. Install php
 
shell> tar xzvf php-VERSION.tar.gz
shell> cd php-VERSION
shell> ./configure --prefix=/usr/local/php\
       --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
shell> make
shell> make install
shell> cp php.ini-dist /usr/local/php/lib/php.ini
 
D. Post configuration
 
  Make sure the libphp5.so in /usr/local/apache/modules/ directory.then edit the httpd.conf in /usr/local/apache/conf/ directory with you fimilar text edit tools,such as vi. check if there is a line like this:
 
   LoadModule php5_module        modules/libphp5.so
 
then,add the following lines to httpd.conf:
 
   AddType application/x-httpd-php .php .php3 .php4 .phtml
   AddType application/x-httpd-php-source .phps
 
E. Start service and check if it works properly
 
  Put a file named test.php into apache's document-root. add the following lines to test.php:
 
     phpinfo();
  ?>
 
  starting the web service via "/usr/local/apache/bin/apachectl start",and browsing it with your web client.(i.e Firefox):
  
 
this should works, but you still have a lot of works to do to make web server safer.
阅读(799) | 评论(0) | 转发(0) |
0

上一篇:apache 3gp

下一篇:delete ^M character in Linux

给主人留下些什么吧!~~