Linux下安装最新Apache2.0.52+PHP5+GD2+MySQL等

视频监控设备(NVR、IPC等)如何通过国标GB28181接入到视频监控平台,以及接入过程如何测试视频接入是否成功 GB/T28181标准广泛的应用,视频监控设备通过国标GB28181接入视频监控平台的过程变成程序化、标准化的互联过程,确保了视频监控设备能够在不同系统、不同网络环境下实现远程、跨区域、跨级别的访问和控制。版本有GB28181-2011、2016、2022几个常用版本,威迪斯特的视频监控平台完全支持GB28181的这几个版本,能够实现不同品牌视频监控设备的国标视频接入(国标视频监控接入),或者为国标28181视频接入(国标28181视频监控接入),也为国标281818接入(国标GB/T28181接入。 阅读详情
Linux下安装最新Apache2.0.52+PHP5+GD2+MySQL等
 
作者: powerful  发布日期: 2005-11-20    查看数: 18702   出自: http://support.iap.ac.cn/portal
Linux下安装最新Apache2.0.52+PHP5+GD2+MySQL等

由于gd2才开始支持真彩图片的创建,所以,,升级服务器,因为原来的安装都是默认的系统安装,也更因为是个菜鸟,所以,安装很困难,起初根据网上一些文章在我的red hat A 3 上安装测试,不过,测试了安装php4.3.X 和php5.0.X都没有成功,最后,根据其他人的文章,自己搞了将近3天,终于安装上了,下面就我安装中出现的错误和过程写出来和大家分享,以免有像我一样的菜鸟们走弯路! (我可是两天多的时间,安装php的次数不下50次得来的经验,希望大家多多支持,有错误当然欢迎给我指正!转载请注明来自中国智慧在线(http: //article.21e.cn ,谢谢!),以下经过测试在red hat 9 和red hat A 3上通过!

如果你机器里原来装有了PHP或者APACHE的RPM或者低版本.你可以现删除,删除安装简洁一些,不过我的实际操作过程是煤油删除,而直接安装的.当然你也可以跟我一样!
首先,服务器GCC要有,不然什么都不能做.可以用gcc -v来查看是否安装了GCC,

#gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)

有以上类似信息说明已有GCC,没有就现安装吧,至于如何安装,我就不说了,可以用光盘安装或者是下载源文件都可以,当然你的版本不一定是3.2.3!

请下载以下所有的东西:

httpd-2.0.X.tar.gz 版本最好是下载最新的啦,下载地址:http://www.apache.org
MySQL-client-4.0.20-0.i386.rpm
MySQL-server-4.0.20-0.i386.rpm(如果你打算升级mysql的话请下载,下载地址:http: //www.mysql.org 当然也是下载最新的版本最好了,由于我不打算安装mysql,就省略了,安装的时候的步骤也是先安装mysql!)
php-5.0.X.tar.gz 下载地址:http://www.php.net
ZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz
zend的最新版安装是好像有点问题,就下载这个版本就可以,zend用来加速php,你可以选择不安装!下载地址:http: //www.zend.com
gd-2.0.28.tar.gz 这个软件的下载地址,php推荐的是:http://www.boutell.com/gd/ 但是由于某些原因,开发者不支持gif图像的创建,这有点不太方便,所以,我下载了个支持gif图像的,也就是打了gif补丁的:http: //www.rime.com.au/gd/
libxml2-2.X.X.tar.gz 下载地址:
zlib-1.X.X.tar.gz 忘记了,自己找一下吧
jpegsrc.v6b.tar.gz 下载地址:ftp://ftp.uu.net/graphics/jpeg/
libpng-1.2.5.tar.gz 下载地址:http://www.libpng.org/pub/png/libpng.html
freetype2-X.X.tar.gz 下载地址:http://www.fretype.org

xpm-3.4k-2.i386.rpm 忘记了,自己找一下吧

以上都是我下载的官方地址,软件的版本中的X,你自己看看你想用哪个版,不过最好是用最新稳定版本的!如果你以前安装过上述软件的其他版本,你也可以选择不安装!

安装MYSQL 服务器:
#rpm -ivh MySQL-server-4.0.20-0.i386.rpm
#rpm -ivh MySQL-client-4.0.20-0.i386.rpm
安装好后试试能不能用
#mysql 如果设置了密码后测试方法是(mysql -u root -proot -h localhost 注意的是-p后煤没有空格,直接跟密码)
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 27651 to server version: 4.0.20-standard
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.

说明可以了!
请自己改mysql的密码,方法不说了!

安装XPM

#rpm -ivhxpm-3.4k-2.i386.rpm

安装libxml
# tar -zxf libxml2-2.6.16.tar.gz
# cd libxml2-2.6.16
# ./configure (xml默认安装就可以,不要指定路径了,因为安装时php可能找不到它,PHP5只支持libxml2-2.5.10以上版本)
# make
# make install

安装zlib
# tar -zxf zlib-1.2.2.tar.gz
# cd zlib-1.2
# ./configure --prefix=/usr/local/zlib2 (注意,如果您以前没有安装zlib,可以不指定路径,我是没有删除以前的低版本才指定的!以下雷同!)
# make
# make install

安装jpeg
# tar -zxf jpegsrc.v6b.tar.gz
# cd jpeg-6b/
# ./configure --prefix=/usr/local/jpeg6
# make
# make install-lib
如果你选择默认安装,可能很顺利,指定路径后,请先创建以下文件夹
错误提示:...... /usr/bin/install -c -m 644 jconfig.h /usr/local/jpeg6/include/jconfig.h
/usr/bin/install: 无法创建一般文件‘/usr/local/jpeg6/include/jconfig.h’: 没有那个文件或目录
make: *** [install-headers] Error 1
# mkdir /usr/local/jpeg6
# mkdir /usr/local/jpeg6/include
# mkdir /usr/local/jpeg6/lib
# make install-lib
# make install

安装时如果错误提示:
/usr/bin/install: 无法创建一般文件‘/usr/local/jpeg6/lib/libjpeg.a’: 没有那个文件或目录
make: *** [install-lib] Error 1
创建如下文件夹:
# mkdir /usr/local/jpeg6/lib
# make install
/usr/bin/install -c cjpeg /usr/local/jpeg6/bin/cjpeg
/usr/bin/install: 无法创建一般文件‘/usr/local/jpeg6/bin/cjpeg’: 没有那个文件或目录
make: *** [install] Error 1
# mkdir /usr/local/jpeg6/bin
/usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/jpeg6/man/man1/cjpeg.1
/usr/bin/install: 无法创建一般文件‘/usr/local/jpeg6/man/man1/cjpeg.1’: 没有那个文件或目录
make: *** [install] Error 1
# mkdir /usr/local/jpeg6/man
# mkdir /usr/local/jpeg6/man/man1
# make install
好了,直到安装成功!

安装libpng:
# tar -zxf libpng-1.2.7-config.tar.gz
# cd libpng-1.2.7-config
# ./configure --prefix=/usr/local/libpng2
# make
# make install

安装freetype:
# tar -zxf freetype-2.1.9.tar.gz
# cd freetype-2.1.9
# ./configure --prefix=/usr/local/freetype2
# make
# make install

安装gd库:
# tar -zxf gd-2.0.26gif.tar.gz
# cd gd-2.0.26gif
# ./configure --prefix=/usr/local/gd2 --with-zlib=/usr/local/zlib2/ --with-png=/usr/local/libpng2/ --with-jpeg=/usr/local/jpeg6/ --with-freetype=/usr/local/freetype2/ (请指定及格插件的安装路径,否则安装php的时候可能出错!)
# make
# make install

安装apache,(php5安装环境需要apache2.0.46以上版本,下载的时候注意!)
#tar zxvf httpd-2.0.50.tar.gz
#cd httpd-2.0.50
#./configure --prefix=/usr/local/apache2 --enable-module=so
#make
#make install

安装php5:
# tar -zxf php5-200411260130.tar.gz
# cd php5-200411260130
# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir=/usr/local/jpeg6/ --with-png-dir=/usr/local/libpng2/ --with-gd=/usr/local/gd2/ --with-freetype-dir=/usr/local/freetype2/ --enable-trace-vars --with-zlib-dir=/usr/local/zlib2/ -with-mysql=/var/lib/mysql
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini

安装libxml的时候如果指定了路径,make的时候可能出错,所以,我安装的时候没指定!
我MAKE PHP4.3.8 和5的时候都遇到:
ext/gd/gd.lo(.text+0x63a): In function `zm_deactivate_gd':

/root/software/php-4.3.8/ext/gd/gd.c:385: undefined reference to `gdFreeFontCache'

collect2: ld returned 1 exit status

make: *** [sapi/cli/php]Error 1
另外还有一个错误可能是什么: libphp.lo的错误(错误当时没有纪录,忘记了,大概是!)
是因为GD库的freetype没装,或者是安装gd库的时候煤油指定插件的路径!!

复制PHP.INI文件到正确位置
在PHP目录下运行
#cp php.ini-dist /usr/local/php/lib/php.ini

编辑apache配置文件httpd.conf
#vi /usr/local/apache2/conf/httpd.conf

要改的有如下几处:

一般都在
#AddType application/x-tar .tgz
下加一行
#LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
如果你搜索其它地方没有以下这行

LoadModule php5_module modules/libphp5.so
请把上面的#号去掉

还有找到
DirectoryIndex index.html index.html.var
在后面加 index.php 让它把index.php做为默认页

找到
# don't use Group #-1 on these systems!
把下面的用户名和组改为
User apache
Group apache
(原来好像是nobody)

再找
#ServerName
把#去掉,后面的IP改成你的IP.

找到
DocumentRoot "/usr/local/apache2/htdocs"
把/usr/local/apache2/htdocs改为你存放网页文件的路径

为了让中文网页没乱码
找到
AddDefaultCharset iso8859-1
把后面的iso8859-1改为gb2312 或者是干脆off
其他的选项就自己修改吧!或者到http://article.21e.cn 有一个专门的httpd.conf的说明!

保存httpd.conf文件.

启动apache
# /usr/local/apache2/bin/apachectl start
如果没有出错,写一个测试页放到你网页目录下.访问就应该可以看到php的版本等信息了!

如无意外.PHP脚本已经可以连接mysql了.

用ZendOptimizer加速PHP

#tar zxvf ZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz
#cd ZendOptimizer-2.5.3-linux-glibc21-i386
#./install.sh
安装的时候注意输入正确的安装apache的路径等内容!
安装完毕,再看看phpinfo页面的zend选项就发现了!!

如果你以前的apache没有删除,而你又想使用
# /etc/init.d/httpd restart
这样重起apache的话,那就修改/etc/init.d/httpd这个文件,修改其中的apahce的三个路径就可以了!!

好了,终于安装完毕,你的机器已经是最新的apache+php+mysql+gd.......了,恭喜!!

艾,累死我了,整整弄了好几天!!休息了!!~(安装的时候,可能安装的时候和写不不是很一样,不过大同小异!)

同时感谢以前那几位辛苦的安装者,参照你们的文章我才得以顺利安装成功,虽然还是用了好几天!~
 
COSMO-RS理论:流体相热力学预测的核心模型与技术突破 摘要:COSMO-RS模型通过量子化学计算分子表面电荷分布,实现了从微观量子尺度到宏观化工过程的热力学预测。该模型基于介电连续介质理论,将分子表面片段化处理,通过σ-剖面描述电荷分布,并计算片段间的静电失配能和氢键能。其核心算法通过自洽化学势方程求解活度系数,克服了传统模型依赖实验参数的局限。随着技术进步,模型引入了高阶描述符和色散力修正,提升了预测精度。在药物研发、化工分离等领域广泛应用,但仍存在对长程有序结构预测不足等局限性。该模型为复杂体系的热力学性质预测提供了重要理论工具。 阅读详情

相关推荐

《玩儿起来吧》MATLAB 实时图像处理系列(一二三四)

大家学了图像处理之后,是不是就想学以致用。而要用于生活中,最好的方式就是和摄像头搭配,实现实时图像处理。今天就给大家分享MATLAB实时图像处理的基础方法,希望能帮你快速入门。

HPC_ZY 1万+

linux下的apache2 + mysql5 + php4 + gd2 源码完整安装详解

linux下的apache2 + mysql5 + php4 + gd2 源码完整安装详解 文章来源: http://www.phpbulo.com 1.安装mysql   小五注释:mysql的安装包实在是太多了,我在学习的时候,遇到最大的问题就是安装mysql的问题,后来才发现,原来是自己选择安装包不对,非常郁闷,为了避免其他朋友也遇到同样的问题,所以,我把本文所涉及的mysql安

车晋强的专栏 698

具身智能端侧硬件选型实战:从算力需求到芯片对比与避坑指南

在边缘计算和嵌入式AI快速发展的今天,端侧智能设备的落地不再单纯比拼芯片的标称算力。TOPS数值只是初筛指标,真实的推理性能还受内存带宽、数据精度、稀疏性以及散热功耗等多重因素制约。理解不同视觉感知、决策规划与语言交互任务对算力的差异化需求,是选型的第一步。本文从技术原理出发,剖析了Jetson Orin、地平线征程、RK3588等主流平台的实测表现,并揭示了散热设计、供电链路与软件生态这三个极易被忽略的隐形瓶颈。通过完整的部署调优实录,展示了量化、缓存与电源模式优化如何提升端侧推理效率,为具身智能、无人车

weixin_29164185的博客 371

linux apache2.0 安装,Apache安装图解教程

Apache安装图解教程(不是for Linux而是for windows)一、安装Apache,配置成功一个普通网站服务器Apache下载官网下载出现Apache HTTP Server 2.0.55的安装向导界面,点“Next”继续确认同意软件安装使用许可条例,选择“I accept the terms in the licenseagreement”,点“Next”继续将Apache安装到W...

weixin_32429413的博客 385

Mumax3高效模拟技巧:如何利用代码模板快速完成磁性材料特性分析

本文介绍了利用Mumax3代码模板库提升磁性材料微磁学模拟效率的核心方法。通过构建模块化的环境配置、材料库和特征长度计算模板,研究者可以快速组装模拟方案,自动化参数扫描与结果分析,从而将精力聚焦于物理问题本身,实现工作效率的指数级提升。

zz67890的博客 558

基于PLC的立体车库控制系统设计

本文介绍了基于西门子S7-1511-1PN PLC和KTP700 Basic PN HMI的立体堆垛式停车场自动化控制系统。系统通过PLC逻辑控制滑台运动,配合传感器实现车辆存取自动化,包含初始化、入库、出库和安全保护程序。程序采用模块化设计,分为安全互锁、动画显示、模式切换等六个功能模块,运用边沿触发、定时器和多级联锁确保安全。HMI界面提供模式切换、车位选择、状态显示和手动控制功能。该系统具有模块化、安全性和可扩展性特点,可应用于多车位立体停车场场景。

sxs3030787796的博客 1269

Linux下搭建Apache服务器

Linux下搭建Apache服务器(完整版) 什么是Apache? Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,同样鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再发布(作为开源或商业软件)。需要满足的条件也和BSD类似 Apache主要特点 1、开放源代码、跨平台应用 2、支持多种网页编程语言

chengxuyuanyonghu的专栏 2万+

Android 12.0 kenel中修改rom系统内部存储的大小

在12.0的系统rom产品开发定制中,在对一些产品开发中的配置需求方面,由于在产品后续订单中,有些产品是出口的,但是硬件方面已经定板,时间比较仓促,所以 就需要软件方面在rom内部存储的大小方面作假,修改rom真实的大小容量,所以就需要在kenel驱动部分来修改这部分的值最好了,接下来分析下计算rom容量的 相关代码,然后做出相关的修改,来实现功能

安卓兼职framework和app工程师的博客 1685

linux下安装最新apache2.0.52+php5+gd2+mysql

linux下安装最新apache2.0.52+php5+gd2+mysql如果你机器里原来装有了PHP或者APACHE的RPM或者低版本.你可以现删除,删除安装简洁一些,不过我的实际操作过程是煤油删除,而直接安装的.当然你也可以跟我一样! 首先,服务器GCC要有,不然什么都不能做.可以用gcc -v来查看是否安装了GCC, #gcc -v Reading specs from...

weixin_34309435的博客 128

基于Simulink的固态变压器(SST)多级协同控制

本文基于Simulink平台,详细介绍了固态变压器(SST)多级协同控制的建模与仿真方法。针对SST三级架构(AC-DC、DC-DC、DC-AC)存在的级间耦合问题,提出了纵向解耦与横向联动的协同控制策略。通过搭建10kV/400V级联型SST系统模型,实现了输入电压波动±20%或负载0-100%跳变时直流母线电压波动小于2%的控制目标。文章详细讲解了Simulink建模步骤、控制算法推导及工程部署建议,包括功率前馈控制、虚拟惯性算法等关键技术。仿真结果表明,该协同控制方案能有效抑制负载突变时的电压波动,为

MHD0815的博客 220

低功耗边缘设备部署指南:YOLO26 INT8量化与TensorRT加速全流程

将YOLO26 INT8部署到低功耗边缘设备,核心原则是“校准为王、敏感层精准回退、端到端验证”。校准集≥500张,来自真实推理场景,未经训练增强校准集预处理与推理pipeline逐行对齐trtexec命令必带--fp16作为fallback量化后用polygraphy定位敏感层,而非盲猜仅回退必要层(通常2-3个),保留INT8收益在真实部署场景测试集上验证mAP,不以COCO为准C++部署使用异步推理+双缓冲nsys profiling确认无传输瓶颈。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 227

 linux下安装apache2.0.52+php5+gd2+mysql

由于gd2才开始支持真彩图片的创建,所以需要升级服务器,如果你机器里原来装有了PHP或者APACHE的RPM或者低版本.你可以现删除,删除安装简洁一些,不过我的实际操作过程是煤油删除,而直接安装的.当然你也可以跟我一样! 首先,服务器GCC要有,不然什么都不能做.可以用gcc -v来查看是否安装了GCC, #gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs Configured wi...

qwe12346_dba的专栏 192

uniapp(安卓苹果app端) - 微信小程序分享提示报错“由于不支持的分享类型无法分享到微信“,“由于应用和小程序未绑定在同意微信开放平台账号,无法分享到微信“解决办法,uniapp小程序分享失败

uni-app,安卓app,苹果app,手机app端,苹果ios,安卓Android,移动端app,分享,微信分享,微信朋友圈,微信好友,转发,vue2,vue3,App端调用手机的系统分享,微信小程序,分享功能,原生app分享小程序到微信,可分享到微信、朋友圈等,报错,uniapp分享报错由于不支持的分享类型无法分享到微信,未审核应用,uniApp安卓苹果app报错由于应用和小程序未绑定在同意微信开放平台账号,无法分享到微信,微信appid,已经配置了,还是报错,无法解决,一直提示,APP_ID错误,打包

✅ 精选推荐文章 5519

linux apache2下载,Linux下安装最新Apache2

Linux下安装最新Apache2.0.52+PHP5+GD2+MySQL等 Linux下安装最新Apache2.0.52+PHP5+GD2+MySQL等由于gd2才开始支持真彩图片的创建,所以,,升级服务器,因为原来的安装都是默认的系统安装,也更因为是个菜鸟,所以,安装很困难,起初根据网上一些文章在我的red hat A 3 上安装测试,不过,测试了安装php4.3.X 和php5.0.X都没有...

weixin_36099503的博客 463

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Linux下安装最新Apache2.0.52+php5+gd2+MySQLl

由于gd2才开始支持真彩图片的创建,所以,,升级服务器,因为原来的安装都是默认的系统安装,也更因为是个菜鸟,所以,安装很困难,起初根据网上一些文章在我的red hat A 3 上安装测试,不过,测试了安装php4.3.X 和php5.0.X都没有成功,最后,根据其他人的文章,自己搞了将近3天,终于安装上了,下面就我安装中出现的错误和过程写出来和大家分享,以免有像我一样的菜鸟们走弯路! (我可是两天

葡萄藤 1082

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

linux 学习笔记 - php 环境安装与配置

摘自:http://www.isswhu.cn/forums/viewthread.php?tid=11http://article.21e.cn/view.php?pid=279linux下安装最新apache2.0.52+php5+gd2+mysql 安装前的准备工作: 安装 bzip2-1.0.2.tar.gz 安装 freetype-2.1.9.tar.bz2 

风过无声 5374

yum安装mod auth mysql_用yum安装Apache,Mysql,PHP.

用yum安装Apache,Mysql,PHP.2.1安装Apacheyum install httpd httpd-devel安装完成后,用/etc/init.d/httpd start 启动apache设为开机启动:chkconfig httpd on2.2 安装mysql2.2.1 yum install mysql mysql-server mysql-devel同样,完成后,用/etc/i...

weixin_36109676的博客 2428

linux下安装apache 服务器,mysql数据库,PHP

这里linux下安装apache 服务器,mysql数据库,PHP写自定义目录标题欢迎使用Linux编辑器 欢迎使用Linux编辑器 1、关闭防火墙 #SETUP → FIREWALL CONFIGURATION →Security Level: Disabled ;SELinux Disabled→OK→SAVE 2、设置好eth0(默认网卡)IP,立即生效请执行 service network restart ;虚拟机窗口右下角两个电脑的小图标,点击选择settings→勾选connected,conn

k12050803的博客 464

apache2+mysql+php5的安装

前一阵子,用源码安装了一下,最后倒是安装成功了,但安装之过程磕磕绊绊,而且说实话不是很明白那些配置项,这不,电脑出问题了,于是乎重装,装了一下午也没把mysql给装成功,郁闷至极,就apt-get了。以下是几个网站:http://linux.blogbus.com/logs/24448716.html 1. 安装运行环境 sudo apt-get install apache2 sudo a...

yuwei162的专栏 150

Linux下Apache2、SSL、PHP4、GD、Mysql4.0、Postgresql7、ZendOptimizer编译安装全攻略

初学linux服务安装,看了很多网友写的安装过程,觉得没有一个合我的要求。想来想去还是自己参考着装一下吧。正好也有朋友需要,把整个过程写出来与大家共同学习提高。 一、安装包说明Apache-2.0.52:不用多说了吧,地球人都知道。^_^Php-4.4.0:4系列最新稳定版,不赞成使用5,因为5只是一个过渡版本,6已经在开发中了。GD库:PHP需要的一个图形函数支持库,这个东东

基督山伯爵的专栏 3809

FreeBSD6.2 安装apache22+PHP5.2.X+MySQL5.X

一,环境:DELLPIII 700+512M+20GFreeBSD6.2二,安装 CVSup并更新ports#cd /usr/ports/net/cvsup-without-gui#make install clean#建立ports-supfile文件,配置离你最近的cvs服务器#cp /usr/share/examples/cvsup/ports-supfile /root/ports-sup

anyx的专栏 1540

转 linux下面apache2.0.52+php5+gd2+mysql

gd2才开始支持真彩图片的创建,所以,,升级服务器,因为原来的安装都是默认的系统安装,也更因为是个菜鸟,所以,安装很困难,起初根据网上一些文章在我的red hat A 3 上安装测试,不过,测试了安装php4.3.X 和php5.0.X都没有成功,最后,根据其他人的文章,自己搞了将近3天,终于安装上了,下面就我安装中出现的错误和过程写出来和大家分享,以免有像我一样的菜鸟们走弯路! (我可是两天多的...

weixin_30767921的博客 73

ubuntu 12.04 php mysql_ubuntu12.04下安装Apache+PHP+MySQL

一、Apache1、安装apache2:sudo apt-get install apache22、重启apache2:sudo /etc/init.d/apache2 restart那就说明Apache成功安装了。Apache的默认安装,会在/var下建立一个名为www的Web目录,所有要能通过浏览器访问的Web文件都要放到这个目录里。4、若要关闭apache2,执行如下命令:sudo serv...

weixin_42465953的博客 193

centos 5.0 编译安装apache 2.2.6 php5.2.5 mysql5.0.46 Z

引用http://hi.baidu.com/52hack/blog/item/fd6c7a8bffde581ac9fc7a30.htmlhttp://www.centoschina.com/read.php?tid-9692.htmlV2.0 2007年10月8日 操作系统更新为centos 5.0 apache 更新为2.2.6版本,php更新为5.2.5,增加集成Suhos

hzhuoquan的专栏 803
上一篇: Linux
下一篇: Linux 命令
通者归来
博客等级 码龄25年 18粉丝 55原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值