设为首页 收藏本站
查看: 616|回复: 0

[经验分享] PHP学习笔记(五)Solaris下安装Apache+PHP+phpMysqlAdmin

[复制链接]

尚未签到

发表于 2017-1-10 09:42:05 | 显示全部楼层 |阅读模式
Download$ lynx http://httpd.apache.org/download.cgi
Extract$ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NN
Configure$ ./configure --prefix=PREFIX
Compile$ make
Install$ make install
Customize$ viPREFIX/conf/httpd.conf
Test$PREFIX/bin/apachectl -k start

  solaris 10下samp配置

  
本人安装的是完全版的solaris 10,之前装的core版因依赖太多,最终还是没有编译成功。其实在solaris下安装和linux下安装过程没有什么不同
使用的软件包:官网下载的,apache2.2.14 mysql-5.1.42-solaris10-i386 php-5.2.12
编译安装php提示系统中没有安装:autoconf libgcc libiconv libintl,这些软件在http://www.sunfreeware.com/indexintel10.html里找到下载安装就可以了。
我首先安装的是mysql,直接安装包解压后的 INSTALL-BINARY 的描述安装就好了
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
之后更改下密码:
./bin/mysqladmin -u root password 'new-password'
二,安装apache:
#tar xvf /tmp/httpd-2.2.14.tar
#./configure "--prefix=/usr/local/apache2" "--enable-module=so" "--enable-deflate=shared" "--enable-expires=shared" "--enable-rewrite=shared" "--enable-static-support" "--enable-static-htpasswd" "--enable-static-htdigest" "--enable-static-rotatelogs" "--enable-static-logresolve" "--enable-static-htdbm" "--enable-static-ab" "--enable-static-checkgid" "--disable-userdir"


(没有特殊需要直接#./configure "--prefix=/usr/local/apache2" "--enable-module=so" 就ok的)

#make clean #如果曾经make过

#make
#make install
三,安装php
#tar xvf php-5.2.12.tar
#cd php-5.2.12
#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/
./configure --prefix=/opt/apache2.2/php --with-apxs2=/opt/apache2.2/bin/apxs --with-mysql=/usr/local/mysql/ --enable-mbstring --with-mysqli=/usr/local/mysql/bin/mysql_config --with-jpeg-dir=/usr/local/jpeg/ --with-zlib --with-gd=/usr/local/ --with-png-dir=/usr/local/png/



./configure --prefix=/opt/apache2.2/php \
--with-apxs2=/opt/apache2.2/bin/apxs \
--with-mysql=shared,/usr/local/mysql \
--with-mysqli=shared,/usr/local/mysql/bin/mysql_config \
--with-pdo-mysql=shared,/usr \
--with-pear \
--with-openssl=shared \
--with-zlib=shared \
--enable-bcmath \
--with-bz2=shared \
--enable-calendar \
--with-curl=shared \
--enable-exif \
--enable-ftp \
--with-gd=shared \
--enable-gd-native-ttf \
--with-gettext=shared \
--with-gmp=shared \
--with-imap=shared \
--with-kerberos \
--with-imap-ssl \
--enable-intl \
--with-ldap=shared \
--enable-mbstring \
--with-mcrypt=shared \
--with-mhash \
--with-mm=shared \
--enable-soap \
--enable-sockets \
--with-tidy=shared \
--enable-wddx \
--with-xsl=shared \
--enable-zip \
--enable-shared








#make clean #如果曾经make过
#make
#make install
#cp php.ini-dist /usr/local/php/lib/php.ini
四,重新配置apache
配置 httpd.conf 让apache支持PHP
# vi /usr/local/apache2/conf/httpd.conf
找到 AddType application/x-gzip .gz .tgz 在其下添加如下内容
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
然后重新启动apache
#bin/apachectl stop
#bin/apachectl start
在站点目录添加一个php文件,里面的内容包括:
<html><body><h1>It works!</h1>
<? phpinfo(); ?>
</body></html>
然后通过浏览器访问,能出现类似下面的也没就成功了,接下来就可以布置你的网站了

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-326381-1-1.html 上篇帖子: Apache和Tomcat整合配置实现网站目录搭建 下篇帖子: Apache CXF实战之二 集成Sping与Web容器
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表