CentOS5下配置JDK环境

作者 : admin 于 2008年09月20日, 15:25:07
2008
09-20

下载jdk安装包 http://www.java.net/download/jdk6/6u10/promoted/b32/binaries/jdk-6u10-rc2-bin-b32-linux-i586-12_sep_2008.bin

编辑/etc/profile

export JAVA_HOME=/opt/jdk1.6.0
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export JRE_HOME=$JAVA_HOME/jre

保存加载配置 : source /etc/profile

然后终端用echo $PATH 监测是否成功。

最后监测 java -version

如果回显出现

java version “1.6.0_10-rc2″
Java(TM) SE Runtime Environment (build 1.6.0_10-rc2-b32)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
则证明安装成功

LAMP进阶计划

作者 : admin 于 2008年09月16日, 23:35:35
2008
09-16

lamp进阶计划

1、Linux,Apache,Mysql,PHP最新集成安装脚本,新增优化项

eAccelerator缓冲集成

PHP的SESSION由文件切入内存

DSO模式编译php至Apache

2、PHP代码优化

OOP核心类库完善

通用功能模块的开发

Linux下与WinRar兼容的程序,rarlinux

作者 : admin 于 2008年08月11日, 17:52:45
2008
08-11

要做个linux下与windows兼容的加密压包与解包工具,选择了rarlinux。

从这里下载 http://www.rarlab.com/rar/rarbsd-3.8.b4.tar.gz

下载后,直接tar解压,make安装,如果想自定义安装位置,可以修改Makefile文件。如果是自定义路径,那么把路径加入到PATH中。PATH=$PATH:/path export PATH

然后可以敲命令 rar,查看帮助。

查看压缩文件列表  rar l file.rar

解压缩一个文件 rar e file.tat

压缩一个文件 rar a target.rar soursefile

压缩一个文件并且加密码 tar a -p[password] target.rar soursefile

SVN配置使用

作者 : admin 于 2008年08月09日, 16:16:18
2008
08-9

接这个 http://www.sunboyu.cn/2008/07/26/subversion-150-%E7%BC%96%E8%AF%91%E5%8F%82%E6%95%B0.shtml

安装完成后,可以建立仓库  svnadmin create /opt/$path

配置apache

<Location /svn>
DAV svn
SVNParentPath /opt/httpd-2.2.9/htdocs/repos
SVNListParentPath on
AuthzSVNAccessFile /opt/httpd-2.2.9/htdocs/repos/accessfile
Require valid-user
AuthType Basic
AuthName “Svn”
AuthUserFile /opt/httpd-2.2.9/htdocs/repos/passwordfile
</Location>

生成password的方法 htpasswd -s /$file username

这样就可以建立一个密码文件,在httpd中调用。在调试的时候,权限是大事

VIM安装使用

作者 : admin 于 2008年08月03日, 15:37:45
2008
08-3

http://www.vim.org/
VIM,不错的编辑器,安装试试
http://www.vim.org/download.php
下载解压, tar -jxvf **.tar.bz2

./configure  安装

如果报错,需要补充一个库  yum install ncurses

vim手册  http://vcd.gro.clinux.org/

安装后,可以直接使用命令 vim

vim大体上跟vi编辑器一样,但增加了好多命令。

我比较喜欢的是高亮功能。

subversion-1.5.0 编译参数

作者 : admin 于 2008年07月26日, 13:39:25
2008
07-26

./configure –prefix=/opt/subversion –disable-all-static –with-apxs=/opt/httpd-2.2.9/bin/apxs –with-apr=/opt/httpd-2.2.9/bin/apr-1-config –with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config –with-serf=/opt/httpd-2.2.9 –with-ssl –with-zlib=/usr/local –enable-dso –enable-mod-activation

如果编译不能通过,可能要安装 expat-1.95.8-8.2.1.i386.rpm expat-devel-1.95.8-8.2.1.i386.rpm 偷懒,直接rpm了

还有,dlname的问题,装这个 http://ftp.gnu.org/gnu/libtool/libtool-2.2.tar.gz
更正版 subversion1.5.0版本测试
./configure –prefix=/opt/subversion –disable-all-static –with-apxs=/opt/httpd-2.2.9/bin/apxs –with-apr=/opt/httpd-2.2.9/bin/apr-1-config –with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config –with-serf=/opt/httpd-2.2.9 –with-ssl –with-zlib=/usr/local –enable-mod-activation –enable-runtime-module-search

./configure –prefix=/opt/subversion –disable-all-static –with-apxs=/opt/httpd-2.2.9/bin/apxs –with-apr=/opt/httpd-2.2.9/bin/apr-1-config –with-apr-util=/opt/httpd-2.2.9/bin/apu-1-config –with-serf=/opt/httpd-2.2.9 –with-ssl –with-zlib=/usr/local –enable-mod-activation –enable-runtime-module-search –enable-subdir-config –enable-experimental-libtool –enable-fast-install

sunboyu-amp-mod-V1.0 alpha

作者 : admin 于 2008年07月26日, 13:37:47
2008
07-26

重新做了个模块版的,这次apache使用动态编译

sunboyu-amp-isapi-v10-alpha

sunboyu-amp-fastcgi-V1.0 Alpha版本发布

作者 : admin 于 2008年07月24日, 14:04:45
2008
07-24

sunboyu-amp-fastcgi-v10-alpha

基本都配置完毕了,但整体流程没有彻底自动化,适当的时候会作出stable版本。
# author:sunboyu@gmail.com
# qq:176300676 msn:sunboyu@gmail.com
# http://www.sunboyu.cn

#!/bin/sh
h_path = “/root/”
url=”http://www.sunboyu.cn/sourse/”
install_dir=”/opt/”
mkdir $install_dir

termcap_sourse_name=”termcap-1.3.1″

mysql_sourse_name=”mysql-5.0.22″
mysql_install_dir=$install_dir$mysql_sourse_name

openssl_sourse_name=”openssl-0.9.8g”
openssl_install_dir=$install_dir$openssl_sourse_name

httpd_sourse_name=”httpd-2.2.9″
httpd_install_dir=$install_dir$httpd_sourse_name

fastcgi_sourse_name=”mod_fastcgi-2.4.6″
fastcgi_install_dir=$install_dir$fastcgi_sourse_name

fcgid_sourse_name=”mod_fcgid.2.2″

libxml2_sourse_name=”libxml2-2.6.30″
libxml2_install_dir=$install_dir$libxml2_sourse_name

zlib_sourse_name=”zlib-1.2.3″

jpeg_sourse_name=”jpegsrc.v6b”
jpeg_install_dir=$install_dir$jpeg_sourse_name

libpng_sourse_name=”libpng-1.2.29″
libpng_install_dir=$install_dir$libpng_sourse_name

freetype_sourse_name=”freetype-2.3.7″
freetype_install_dir=$install_dir$freetype_sourse_name

php_sourse_name=”php-5.2.6″
php_install_dir=$install_dir$php_sourse_name

gd_sourse_name=”gd-2.0.36RC1″
gd_install_dir=$install_dir$gd_sourse_name

###MYSQL依赖库
wget ${url}${termcap_sourse_name}”.tar.gz”
tar -zxvf $termcap_sourse_name”.tar.gz”
cd $termcap_sourse_name
./configure
make && make install
cd ..
#rm -rf ${termcap_sourse_name}*
###openssl
wget ${url}${openssl_sourse_name}”.tar.gz”
tar -zxvf $openssl_sourse_name”.tar.gz”
cd $openssl_sourse_name
./Configure –prefix=$openssl_install_dir
make && make install
cd ..
#rm -rf ${openssl_sourse_name}*
###libxml
wget ${url}${libxml2_sourse_name}”.tar.gz”
tar -zxvf $libxml2_sourse_name”.tar.gz”
cd $libxml2_sourse_name
./configure –prefix=$libxml2_install_dir
make && make install
cd ..
#rm -rf ${libxml2_sourse_name}*
###zlib
wget ${url}${zlib_sourse_name}”.tar.gz”
tar -zxvf $zlib_sourse_name”.tar.gz”
cd $zlib_sourse_name
./configure
make && make install
cd ..
cp /usr/lib/libz.so.1 /usr/lib/libz.so
#rm -rf ${zlib_sourse_name}*
###jpeg
wget ${url}${jpeg_sourse_name}”.tar.gz”
tar -zxvf $jpeg_sourse_name”.tar.gz”
cd jpeg-6b
./configure
mkdir /usr/local/man/
mkdir /usr/local/man/man1/
mkdir /usr/local/man/man1/cjpeg/
make && make install
cp /usr/lib/libjpeg.so.62 /usr/lib/libjpeg.so
cp jpeglib.h /usr/include/jpeglib.h
cp jconfig.h /usr/include/jconfig.h
cp jmorecfg.h /usr/include/jmorecfg.h
cp jerror.h /usr/include/jerror.h
cd ..
#rm -rf ${jpeg_sourse_name}.tar.gz
#rm -rf jpeg-6b
###png
wget ${url}${libpng_sourse_name}”.tar.gz”
tar -zxvf $libpng_sourse_name”.tar.gz”
cd $libpng_sourse_name
./configure –prefix=$libpng_install_dir
make && make install
cp png* /usr/include/
cd ..
#rm -rf ${libpng_sourse_name}*
###freetype
wget ${url}${freetype_sourse_name}”.tar.gz”
tar -zxvf $freetype_sourse_name”.tar.gz”
cd $freetype_sourse_name
./configure –prefix=$freetype_install_dir
make && make install
cd ..
#rm -rf ${freetype_sourse_name}*
###GD2
wget ${url}${gd_sourse_name}”.tar.gz”
tar -zxvf $gd_sourse_name”.tar.gz”
cd $gd_sourse_name
./configure –prefix=$gd_install_dir –with-png=/opt/libpng-1.2.29 –with-freetype=/opt/freetype-2.3.7 –with-jpeg=/usr/lib/libjpeg.so
make && make install
cd ..
#rm -rf ${gd_sourse_name}*
###MYSQL
groupadd mysql
useradd -g mysql mysql
wget ${url}${mysql_sourse_name}”.tar.gz”
tar -zxvf $mysql_sourse_name”.tar.gz”
cd $mysql_sourse_name
./configure –prefix=$mysql_install_dir –without-debug –with-unix-socket-path=/tmp/mysql.sock –with-client-ldflags=-all-static –with-mysqld-ldflags=-all-static –enable-local-infile –enable-largefile –with-charset=utf8 –with-pic –with-mysqld-libs –with-comment –with-query-cache –with-bench –with-big-tables –with-innodb –with-mysqld-use=mysql
make && make install
cp ./support-files/my-medium.cnf /etc/my.cnf
cp ./support-files/mysql.server /etc/init.d/mysqld
cd ..
#mkdir $mysql_install_dir/var/
#$mysql_install_dir/bin/mysql_install_db –user=mysql &
#$mysql_install_dir/bin/mysqld_safe –user=mysql &

echo ${mysql_install_dir}”/bin/mysqld_safe –user=mysql &”>>/etc/rc.local
#rm -rf ${mysql_sourse_name}*
###APACHE
wget ${url}${httpd_sourse_name}”.tar.gz”
tar -zxvf $httpd_sourse_name”.tar.gz”
cd $httpd_sourse_name
./configure –prefix=$httpd_install_dir –enable-authz-dbm –enable-log-config –enable-headers –enable-setenvif –with-ssl=$openssl_install_dir –enable-static-ab –enable-http –enable-mime –enable-status –enable-suexec –enable-vhost-alias –enable-dir –enable-rewrite –with-mpm=worker
make && make install
cd ..
ln -s $httpd_install_dir/bin/apachectl /etc/init.d/httpd
echo $httpd_install_dir/bin/apachectl start>>/etc/rc.local
chkconfig –level 345 httpd on
#rm -rf ${httpd_sourse_name}*
###fastcgi
wget ${url}${fastcgi_sourse_name}”.tar.gz”
tar -zxvf $fastcgi_sourse_name”.tar.gz”
cd $fastcgi_sourse_name
sed ’s/\/usr\/local\/apache2/\/opt\/httpd-2.2.9\//g’ Makefile.AP2 > Makefile
make && make install
cd ..
###fcgid
wget ${url}${fcgid_sourse_name}”.tgz”
tar -zxvf $fcgid_sourse_name”.tgz”
cd $fcgid_sourse_name
mv Makefile Makefile.AP2
sed ’s/\/usr\/local\/apache2/\/opt\/httpd-2.2.9\//g’ Makefile.AP2 > Makefile
make && make install
cd ..
echo LoadModule fcgid_module modules/mod_fcgid.so>>$httpd_install_dir/conf/httpd.conf
echo AddHandler fcgid-script .php>>$httpd_install_dir/conf/httpd.conf
echo “FCGIWrapper “${php_install_dir}”/bin/php-cgi .php”>>$httpd_install_dir/conf/httpd.conf
#rm -rf ${fastcgi_sourse_name}*
###PHP
wget ${url}${php_sourse_name}”.tar.gz”
tar -zxvf $php_sourse_name”.tar.gz”
cd $php_sourse_name
cp php.ini-dist php.ini
./configure –prefix=$php_install_dir –with-libxml-dir=$libxml2_install_dir –enable-cli –enable-cgi –enable-fastcgi –enable-force-cgi-redirect –enable-discard-path –enable-path-info-check –with-openssl –with-pcre-regex –enable-calendar –enable-dom –enable-ftp –with-openssl-dir=/usr/local/ssl –enable-gd-jis-conv –enable-hash –with-iconv –enable-json –enable-mbstring –enable-mbregex –enable-pdo –enable-posix –enable-libxml=$xml2_install_dir –enable-simplexml –with-sqlite –enable-tokenizer –enable-xmlreader –enable-xmlwriter –with-zlib –with-freetype-dir=$freetype_install_dir –with-gd=$gd_install_dir –with-jpeg-dir=/usr/lib/libjpeg.so –with-libpng-dir=/opt/libpng-1.2.29/lib/libpng12.so –with-zlib-dir=/usr/lib/libz.so –with-mime-magic –with-mysql=$mysql_install_dir –with-zlib-dir=/usr/lib/libz.so –with-pdo-mysql=$mysql_install_dir –with-pdo-sqlite –enable-posix –enable-soap
make && make install
cp php.ini $php_install_dir/lib/
cd ..
$mysql_install_dir/bin/mysql_install_db –user=mysql &

service httpd start
service mysqld start

amp-fastcgi版本基本完成,部分配置未做兼容性测试

作者 : admin 于 2008年07月23日, 23:23:54
2008
07-23

autoamp-fastcgi

底下要做一个模块安装php的版本

Apache2 PHP5 FastCgi配置终于完成

作者 : admin 于 2008年07月23日, 22:12:57
2008
07-23

这次是使用的mod_fastcgi的一个替代品:fcgid http://fastcgi.coremail.cn/ 在功能上完全可以取代fastcgi,在性能和稳定性上还优于fastcgi(据说),不过配置起来也比fastcgi的简单,只需要加上 loadmodule fcgid_module SetHandler fcgid-script
FCGIWrapper /usr/local/bin/php-cgi .php 即可。
权限方面,呵呵,还没有测试。留档,加到我的amp的shell里。

LoadModule fcgid_module modules/mod_fcgid.so
AddHandler fcgid-script .php
FCGIWrapper /opt/php5/bin/php-cgi .php

 Page 6 of 8  « First  ... « 4  5  6  7  8 »