Slaris10系统下编译安装apache2、mysql5和php5

2008-02-23 07:43:25来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

默认完全安装Slaris10

# uname -srvmpi

SunOS 5.10 s10_58 sun4u sparc SUNW,Ultra-250 //操作环境

到网站http://www.sunfreeware.com下载安装好gcc autoconf automake bison ncurses等编译环境软件。

#PATH=/usr/sbin:/usr/bin:/usr/local/bin/:/usr/ccs/bin

编译安装HTTPD2

# tar xvf httpd-2.1.3-beta.tar

# cd httpd-2.1.3-beta

# CC=gcc CFLAGS="-O6" CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti"


//上一行命令能够不用,其具体意义我也不是很明白。

# ./configure --enable-so

//DSO模式安装apache

# make

# make install


//编辑配置文档httpd.conf,添加改变如下,启动httpd成功

# vi /usr/local/apache2/conf/httpd.conf

Listen 192.168.12.34:80

User nobody

Group nobody

ServerName 192.168.12.34:80
编译安装Mysql5

#groupadd mysql

#useradd -g mysql mysql

#gunzip < mysql5.tar.gz | tar -xvf -

#cd mysql5

#./configure --prefix=/usr/local/mysql

#make


致命的: libstdc .so.5: 打开失败: 无此文档或目录

//假如出现类似上述错误警告,按照下列步骤解决

#cp /usr/local/lib/libstdc .so.5 /usr/lib/libstdc .so.5

#make

//没有错误提示就OK

#make install

#cp support-files/my-medium.cnf /etc/my.cnf

#cd /usr/local/mysql

#bin/mysql_install_db --user=mysql

#chown -R root .

#chown -R mysql var

#chgrp -R mysql .

#bin/mysqld_safe --user=mysql &

# netstat -an|grep .3306


*.3306 *.* 0 0 49152 0 LISTEN

# pwd

/usr/local/mysql

# ./bin/mysql

ld.so.1: ./bin/mysql: 致命的: libncurses.so.5: 打开失败: 无此文档或目录

被杀掉

//假如出现类似上述错误警告,按照下列步骤解决

#cp /usr/local/lib/libncurses.so.5 /usr/lib/libncurses.so.5

//测试mysql连接正常否?

# /usr/local/mysql/bin/mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1 to server version: 5.0.15-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;

--------------------

| Database |

--------------------

| information_schema |

| mysql |

| test |

--------------------

3 rows in set (0.04 sec)

mysql> \q

Bye
#

编译安装PHP5

#tar -xvf php-NN.tar

#cd php-NN/

#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/

#make

#make install

#cp php.ini-dist /usr/local/lib/php.ini

#vi /usr/local/apache2/conf/httpd.conf


//编辑httpd.conf添加如下内容,给httpd集成php5模块

#LoadModule php5_module libexec/libphp5.so

LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php .phtml

AddType application/x-httpd-php-source .phps
#/usr/local/apache2/bin/apachectl start

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇: 关于Mysql

下一篇: Linux应用集成MySQL数据库访问技巧