Chinaunix首页 | 论坛 | 博客
  • 博客访问: 340862
  • 博文数量: 121
  • 博客积分: 2771
  • 博客等级: 少校
  • 技术积分: 705
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-01 12:44
文章分类

全部博文(121)

文章存档

2011年(121)

分类: 系统运维

2011-04-05 15:31:08

 
转载请注明formating编写,感谢合作。软件我有soft.tar.gz包需要请联系QQ:85908819,其实内容里也写了版本号,可以去官方下载。在文章里请注意iptables部分 SElinux部分为禁止 同时请确认您的gcc; c++; g++; libxml2; bzip2-libs; bzip2-devel; ncurses-devel; pear-devel等软件已经安装。否则安装出错,出错后不要着急,请到google和baidu搜索出错原因就是error后面部分。


=============================软件版本==========================
软件版本:apache2.2.9 php5.2.9 mysql-5.0.51b zend3.3 gd2.2

============================系统文件系统=======================
swap
/opt
/

================================增加目录======================
/data
/www
/opt/bak/sql
===============================文件系统作用===================
/Data:       mysql安装文件夹数据文件夹
/www:      web文件夹
/opt:         apache zend gd2 php安装文件夹
Php.ini       /etc
/opt/bak/sql 数据库备份文件存储位置
===============================编译安装过程====================

groupadd mysql       \\建立mysql用户组
useradd -g mysql mysql \\增加mysql用户到mysql

==============安装apache步骤==================================
tar -zxvf httpd-2.2.9.tar.gz
cd httpd-2.2.9
./configure --prefix=/opt/apache --with-ssl --enable-ssl --enable-so --enable-rewrite --disable-cgid --disable-cgi
make
make install
cp /opt/apache/bin/apachectl /etc/init.d/httpd
chmod 755 /etc/init.d/httpd
chkconfig --add httpd
chkconfig httpd on
vi /www/index.php

Wq!
===============安装apache步骤=================================

===============安装mysql步骤======================
cd ..
tar -zxvf mysql-5.0.51b.tar.gz
cd mysql-5.0.51b
./configure --prefix=/data/mysql5 --with-comment=Source --with-server-suffix=-enterprise-gpl --with-mysql-user=mysql --without-debug --with-socket-path=/data/mysql5/var/mysql.sock --with-big-tables --with-charset=gbk --with-collation=gbk_chinese_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-innodb --without-ndb-debug --without-isam --enable-local-infile --with-readline --with-raid
make
make install
cd /data/mysql5
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
cp share/mysql/my-medium.cnf /etc/my.cnf
cp share/mysql/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 3 mysqld on
========================= 安装Mysql5步骤=================================

========================安装libpng jpegsrc freetype zlib步骤===================
先安装zlib,freetype,libpng,jpeg,再装GD
1.zlib
tar zxvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
./configure
make
make install
2.安装libpng
tar zxvf libpng-1.2.7.tar.tar
cd libpng-1.2.7
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install
注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个
3.安装freetype
tar zxvf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
Make
make install
4.安装Jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure enable-shared
Make
make test
make install
#可能出错,一般为目录不存在,建立一个目录即可。注意,这里configure一定要带–enable-shared参数,不然,不会生成共享库
5.安装GD
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/opt/gd2 --with-jpeg=/usr/local/modules/jpeg6 --with-png --with-zlib --with-freetype=/usr/local/modules/freetype

make
make install
========================安装libpng jpegsrc freetype zlib步骤===================
=========================安装php5步骤====================================
cd ..
tar -zxvf php-5.2.6.tar.gz
cd php-5.2.6
./configure --prefix=/opt/php --with-apxs2=/opt/apache/bin/apxs --with-zlib-dir --with-bz2 --with-libxml-dir --with-gd=/opt/gd2 --enable-gd-native-ttf --enable-gd-jis-conv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-ttf --enable-mbstring --with-mysql=/data/mysql5 --with-config-file-path=/etc --with-iconv --disable-ipv6 --enable-static --enable-zend-multibyte --enable-inline-optimization --enable-zend-multibyte --enable-sockets --enable-soap --with-gettext --enable-ftp
\\如果装gd时出现了 freetype no的时候 ./configure 就不能编译 --with-freetype-dir
make
make test
make install
=========================配置php.ini和httpd.conf====================================
配置php.inihttpd.conf

Cp php.ini-recommended /etc/php.ini 在里面配置一些 上传文件大小 以及其他的配置
Httpd.conf里面配置
DirectoryIndex
AddType application/x-httpd-php .php
网页存放目录
语言
虚拟目录等
====================================安装Zend步骤===========================
tar zxvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
cd ZendOptimizer-3.3.3-linux-glibc23-i386
./install
安装时注意两个地方 第一个要输入的地方为Zend安装到哪里,例如我想安装到/opt/zend 那就写/opt/zend 第二个要输入的为php.ini文件在哪里,例如/etc/php.ini那就写/etc



====================================数据备份脚本===========================
#!/bin/bash
#
service mysqld stop
date '+tar -zcvf /opt/bak/sql/data.%Y-%m-%d.tar.gz /opt/mysql5/var' | sh
service mysqld start

cron –e
增加
0 1 * * * /opt/sqlbak.sh
Wq!
在计划任务里,每天凌晨1点对数据库进行备份
====================================数据备份脚本===========================

==============================httpd随系统启动==============================
/etc/rc.local里增加了 service httpd start
==============================httpd随系统启动==============================
阅读(860) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~