带来一篇Ubuntu 12.04 x64 编译安装lamp的步骤
要多动手,不要怕什么搞坏了怎么办,你不搞坏,不去动手,就永远不会有收获,既然你在linux中是自由的,那就发挥自己的权利;编译安装apache2.4.2
.代码以下:
sudoechostart
echo罕见毛病:
echoconfigure:error:APRnotfound.Pleasereadthedocumentation.
echo办理举措:
wgethttp://labs.renren.com/apache-mirror/apr/apr-1.4.6.tar.bz2
tar-jxvfapr-1.4.6.tar.bz2
cdapr-1.4.6
./configure--prefix=/usr/local/apr
make
sudomakeinstall
cd..
echo罕见毛病:
echoAH00526:Syntaxerroronline490of/usr/local/apache2/conf/httpd.conf:
echoUnknownfilterproviderDEFLATE
echohttpd:Syntaxerroronline101of/usr/local/apache2/conf/httpd.conf:Cannotload/usr/local/apache2/modules/mod_deflate.sointoserver:/usr/local/apache2/modules/mod_deflate.so:undefinedsymbol:inflate
echo办理举措:
sudosed-i"s/LDFLAGS=""/LDFLAGS="-lz"/g"/usr/local/apr/bin/apr-1-config
wgethttp://labs.renren.com/apache-mirror/apr/apr-util-1.4.1.tar.bz2
tar-jxvfapr-util-1.4.1.tar.bz2
cdapr-util-1.4.1
./configure--prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-config
make
sudomakeinstall
cd..
echo罕见毛病:
echoconfigure:error:pcre-configforlibpcrenotfound.PCREisrequiredandavailablefromhttp://pcre.org/
echo办理举措:
sudoechostart
wgethttp://downloads.sourceforge.net/project/pcre/pcre/8.30/pcre-8.30.zip
unzippcre-8.30.zip
cdpcre-8.30
./configure--prefix=/usr/local/pcre
sudomake
sudomakeinstall
cd..
echo罕见毛病:
echocheckingwhethertoenablemod_deflate...configure:error:mod_deflatehasbeenrequestedbutcannotbebuiltduetoprerequisitefailures
echo办理举措:
sudoapt-getinstall-yzlib1g-dev
echo入手下手安装:
wgethttp://labs.renren.com/apache-mirror/httpd/httpd-2.4.2.tar.bz2
tar-jxvfhttpd-2.4.2.tar.bz2
cdhttpd-2.4.2
./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/--with-pcre=/usr/local/pcre--enable-so--enable-rewrite--enable-deflate--with-module=metadata:expires
make
sudomakeinstall
echoExpiresActiveOn|sudotee-a/usr/local/apache2/conf/httpd.conf
echoFileEtagnone|sudotee-a/usr/local/apache2/conf/httpd.conf
echoSetOutputFilterDEFLATE|sudotee-a/usr/local/apache2/conf/httpd.conf
sudosed-i"s/#LoadModuledeflate_modulemodules/mod_deflate.so/LoadModuledeflate_modulemodules/mod_deflate.so/g"/usr/local/apache2/conf/httpd.conf
sudo/usr/local/apache2/bin/apachectlstart
cd..
编译安装mysql5.5.25a
Ubuntu11.04x64编译安装mysql
OS:Ubuntu11.04x64
手动安装mysql5.5.17
甚么是mysqlnd:http://cn.php.net/manual/zh/mysqli.overview.php#mysqli.overview.mysqlnd
mysqli、mysql、pdo_mysql的区分:http://cn.php.net/manual/zh/mysqli.overview.php#mysqli.overview.mysqlnd
从mysql.com下载最新版的,有rpm主动安装包给Federo、CentOS用,没有deb包。以是Ubuntu要手动安装。下载Linux-Generic2.6(x86,64-bit),CompressedTARArchive。参考:http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html
下载地点:http://www.mysql.com/downloads/mysql/
.代码以下:
echo复制上面整段shell到命令行终端中,会主动逐条实行。
sudoapt-getinstall-ylibaio1
sudoapt-getremove-ymysql-commonmysql-servermysql-client
sudorm-rf/etc/mysql/
wget-Omysql-5.5.20-linux2.6-x86_64.tar.gzhttp://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.20-linux2.6-x86_64.tar.gz/from/http://mysql.oss.eznetsols.org/
tar-zxvfmysql-5.5.20-linux2.6-x86_64.tar.gz
sudomv./mysql-5.5.20-linux2.6-x86_64/usr/local/mysql
sudogroupaddmysql
sudouseradd-r-gmysqlmysql
cd/usr/local/mysql
sudochown-Rmysql.
sudochgrp-Rmysql.
sudo/usr/local/mysql/scripts/mysql_install_db--user=mysql
sudochown-Rroot.
sudochown-Rmysqldata
sudocpsupport-files/my-medium.cnf/etc/my.cnf
sudoln-s/usr/local/mysql/bin/mysql/usr/bin/
sudoln-s/usr/local/mysql/bin/mysqldump/usr/bin/
sudocpsupport-files/mysql.server/etc/init.d/mysql
sudo/etc/init.d/mysqlstart
./bin/mysqladmin-urootpassword1
sudo/etc/init.d/mysqlrestart
mysql-uroot-p1
增加服务让mysqld开机主动启动
.代码以下:
sudocp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysql
sudoupdate-rc.dmysqldefaults
安装完成,必要设置mysql。
编译安装php5.4.4
.代码以下:
sudoapt-getinstall-ycurllibxml2libxml2-devlibssl-devsendmaillibcurl4-openssl-devlibjpeg-devlibpng-devlibmcrypt-dev
wget-Ophp-5.4.4.tar.bz2http://cn.php.net/get/php-5.4.4.tar.bz2/from/this/mirror
tar-jxvfphp-5.4.4.tar.bz2
cdphp-5.4.4
./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs--with-curl--with-mcrypt--enable-mbstring--enable-pdo--with-pdo-mysql=mysqlnd--with-mysqli=mysqlnd--with-openssl--with-imap-ssl--with-gd--with-jpeg-dir=/usr/lib/--with-png-dir=/usr/lib/--enable-exif--enable-zip
make
sudomakeinstall
sudocpphp.ini-development/usr/local/php/lib/php.ini
sudorm/usr/bin/php
sudoln-s/usr/local/php/bin/php/usr/bin/php
echoAddHandlerapplication/x-httpd-php.php|sudotee-a/usr/local/apache2/conf/httpd.conf
sudosed-i"s/;include_path=".:/php/includes"/include_path="/usr/local/php/lib/php"/g"/usr/local/php/lib/php.ini
sudo/usr/local/apache2/bin/apachectlrestart
看不懂man文档的人.在linux中,命令可分为系统基本命令和应用程序命令.系统基本命令是所有的unix类系统都支持的命令,走到哪都不变,只要是unix类系统上就肯定有. Windows有MS-DOS?方式,在该方式下通过输入DOS命令来操作电脑;Linux与Windows类似,也有命令方式,Linux?启动后如果不执行?X-WINDOWS,就会处于命令方式下,必须发命令才能操作电脑。? 我们这一代90后,从小接触的是windows98,家里条件好的自己有电脑装的是2000,后来又有了XP,上大学时又有了win7。 为了更好的学习这门课程,我不仅课上认真听讲,课下也努力学习,为此还在自己的电脑上安装了Ubuntu系统。 一定要学好命令,shell是命令语言,命令解释程序及程序设计语言的统称,shell也负责用户和操作系统之间的沟通。 下面看看一个让人无法回答的问题:“救命各位高手,向你们请教一些问题:如何在Linux下配制HTTP、FTP、Samba、DNS、DHCP、Sendmail服务器,谢谢”这样的问题。 掌握在Linux系统中安装软件,在安装Linux工具盘后大致日常所需的软件都会有,一般网络提供下载的软件都会有安装说明。 用户下达的命令解释给系统去执行,并将系统传回的信息再次解释给用户,估shell也称为命令解释器,有关命令的学习可参考论坛相关文章,精通英文也是学习Linux的关键。 其实老师让写心得我也没怎么找资料应付,自己想到什么就写些什么,所以不免有些凌乱;很少提到编程,因为那些在实验报告里已经说了,这里再写就多余了。
页:
[1]