免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1459 | 回复: 1
打印 上一主题 下一主题

lamp环境搭建 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-26 21:43 |只看该作者 |倒序浏览

lamp环境搭建




  
lamp环境搭建

第一步资源共享的方式

虚拟机多操作系统

1)  linux能够连接网络

#wget

/usr/local -------program

#yum  install  ……

2)        配置windows\

光盘上安装yum包

Windows 能够连接外网络

FIP(SSH)在---------windows环境下安装客户端

             依赖的是linux环境下的sshd

              rc.d  ----rc.d

              开机自启动

   功能 远程访问linux系统

      ftp  文件传输

FTP  -------可以直接使用浏览器的功能

        确定安装了ftp软件包

       编辑配置文件:用户的使用启动守护进程 vfstb

地址栏输入 :ftp://192.168

命令行

      #get 下载

      #put 上传

samba  文件的共享  打印资源共享

        安装samb

        配置主配置文件:访问的安全设置

启动守护进程

     用户验证

         浏览----忽略  nmd

        #service  ***  start 既可以查看

        #ps-aux        之出来一个进程



解压缩

  # tar –zxvf  libxml………………(要解压的文件名)

脚本

#vi file.sh  

   tar  -zxvf  libxml………………

   tar………..

:wq

      #sh  file.sh

出现十四个蓝色的目录

前提条件:

1)      删除系统自带的环境

#rpm –e libxml

2)      停止所有的服务

service httpd start|stop     80

mysqld  start|stop       3306

netstatu  -na 检查端口的使用情况

/etc/….-----

解压后的目录下:大部分是c语言开发的源程序

编译成对应的目标文件  *.o

# rpm -qa|grep gcc检查是否有gcc

挂载安装光盘

configure 可执行搜集配置信息的文件

空间的大小 内存 cpu  gcc  版本等

#make

ls

指定目录  修改权限

#make install >log



majefile

源码包----不同的开发团队

./configure  --help 检查提供了什么参数  

其中的安装过程



1   cd /lamp/libxml2-2.6.30

./configure --prefix=/usr/local/libxml2/

make

make install



2  cd /lamp/libmcrypt-2.5.8

./configure --prefix=/usr/local/libmcrypt/

make

make install



3   cd /lamp/libmcrypt-2.5.8/libltdl

./configure --enable-ltdl-install

make

make install



4   cd /lamp/zlib-1.2.3

./configure

make

make install



5   cd /lamp/libpng-1.2.31

./configure --prefix=/usr/local/libpng/

make

make install



6   mkdir /usr/local/jpeg6

mkdir /usr/local/jpeg6/bin

mkdir /usr/local/jpeg6/lib

mkdir /usr/local/jpeg6/include

mkdir -p /usr/local/jpeg6/man/man1

7  cd /lamp/jpeg-6b

./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static

make

make install



8  cd /lamp/freetype-2.3.5

./configure --prefix=/usr/local/freetype/

make

make install



9   cd /lamp/autoconf-2.61

./configure

make

make install



10   cd /lamp/gd-2.0.35

./configure --prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpeg6/ --with-freetype=/usr/local/freetype/

make

make install



11  cd /lamp/httpd-2.2.9

./configure --prefix=/usr/local/apache2/ --sysconfdir=/etc/httpd/ --with-included-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support

make

make install



    /usr/local/apache2/bin/apachectl start

echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.d/rc.sysinit



12   cd /lamp/ncurses-5.6

./configure --with-shared --without-debug --without-ada --enable-overwrite

make

make install



groupadd mysql

useradd -g mysql mysql

13   cd /lamp/mysql-5.0.41

./configure --prefix=/usr/local/mysql/ --with-extra-charsets=all

make

make install



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

/usr/local/mysql/bin/mysql_install_db --user=mysql

chown -R root /usr/local/mysql

chown -R mysql /usr/local/mysql/var

chgrp -R mysql /usr/local/mysql



/usr/local/mysql/bin/mysqld_safe  --user=mysql &



cp /lamp/mysql-5.0.41/support-files/mysql.server /etc/rc.d/init.d/mysqld

chown root.root /etc/rc.d/init.d/mysqld

chmod 755 /etc/rc.d/init.d/mysqld

chkconfig --add mysqld

chkconfig --list mysqld

chkconfig --levels 245 mysqld off



14    cd /lamp/php-5.2.6

./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2/ --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets

make

make install



cp php.ini-dist /usr/local/php/etc/php.ini

echo "Addtype application/x-httpd-php .php .phtml" >> /etc/httpd/httpd.conf

/usr/local/apache2/bin/apachectl restart

论坛徽章:
0
2 [报告]
发表于 2011-12-26 21:45 |只看该作者
学习鸟  谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP