日期:2011-05-02 15:51:00 来源:本站整理
Slaris10系统下编译安装apache2、mysql5和php5[MySQL防范]
本文“Slaris10系统下编译安装apache2、mysql5和php5[MySQL防范]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
默许完好安装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
编译安装MySQL5User nobody
Group nobody
ServerName 192.168.12.34:80
#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
# 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 startLoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .pHTML
AddType application/x-httpd-php-source .phps
以上是“Slaris10系统下编译安装apache2、mysql5和php5[MySQL防范]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论