日期:2014-05-16 浏览次数:20828 次
系统ubuntu10,环境搭建包括:数据库mysql:5.1,Rsync:3.0.3-2,??? Jdk:1.5.0_22,??? Apache:2.0.64,??? Resin:3.0.24,JMagick6
1,安装msyql
??? ?1)??? sudo apt-get install mysql-client-5.1 mysql-server-5.1
??? ??? 设置密码root
??? ??? mysql配置文件:/etc/mysql/my.cnf
??? ??? 初始化脚本:/etc/init.d/mysql
??? ?2)mysql操作:
??? ??? ?启动:sudo service mysql start
??? ??? ?停止:sudo service mysql stop
??? ??? ?登录:mysql -uroot –p密码
??? ?3)设置mysql登陆快捷方式
??? ?? sudo vim /etc/profile
??? ?? alias ml='/usr/bin/mysql -uroot -p密码'
??? ?? source /etc/profile
??? ?
2,安装rsync
?? 1)sudo aptitude install rsync
????? sudo vim /etc/rsyncd.conf
????? max connections=0
??? ??? ??? use chroot=false
??? ??? ??? uid=root
??? ??? ??? gid=root
??? ??? ??? log file = /data/logs/rsyncd.log
??? ??? ??? log format="%t [%p] %o %h [%a] %m (%u) %P %f %l"
??? ??? ???
??? ??? ??? [html]
??? ??? ??? path=/data/www/html/
??? ??? ??? comment=html
??? ??? ??? read only=false
??? ??? ??? hosts allow=192.168.1.1
3,安装jdk(注意操作系统是32位还是64位,应选择不同的安装包)
??? 1)sudo cp jdk-1_5_0_22-linux-i586.bin? /usr/local/
?????? cd /usr/local/
?????? sudo chmod u+x jdk-1_5_0_22-linux-i586.bin
?????? sudo ./jdk-1_5_0_22-linux-i586.bin
?????? sudo rm -rf jdk-1_5_0_22-linux-i586.bin
?????? sudo mv /usr/local/jdk1.5.0_22 /usr/local/jdk
??? 2)设置环境变量
??????? JAVA_HOME=/usr/local/jdk
??? ??? ??? ??? PATH=$PATH:$JAVA_HOME/bin
??? ??? ??? ??? CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib
??? ??? ??? ???
??? ??? ??? ??? export PATH JAVA_HOME CLASSPATH
??? ??? 3)检查
??? ??? ??? source /etc/profile
??? ??? ??? java -version
??? ??? ???
---------------------------------------------------------
??? 查看gcc版本:sudo gcc --version
??? 检查程序包安装
??? aptitude show build-essential
??? 安装gcc:
?
sudo apt-get install build-essential
?? 确认你已经安装了内核头文件包:
uname -r
??? apt-get install linux-headers-'kernel version'
如果你遇到gcc版本错误,你需要安装编译你内核的gcc版本:
cat /proc/version
这会告诉你,你的内核是用什么版本的gcc编译的.
$ cat /proc/version
??? Linux version 2.6.12-8-386 (buildd@rothera) (gcc version 3.4.5 20050809 (prerelease) (Debian 3.4.4-6ubuntu6)) #1 Tue Aug 30 22:41:30 BST 2005
??? ls /usr/bin/gcc*
???
/usr/bin/gcc????? /usr/bin/gcc-4.0? /usr/bin/gccbug?? /usr/bin/gccbug-4.0
可以看到,我的核心是用gcc-3.4编译的,但我只装了gcc-4.0.如果你的也不同于/usr/bin/gcc*,你需要安装核心所用的版本.
apt-get install gcc-3.4
--------------------------------------------------------------
? 4,安装apache?
1)cd /usr/local
??????? sudo tar -zxvf httpd-2.0.64.tar.gz
??????? cd httpd-2.0.64/
??????? //测试机用--enable-deflate选项出错(解决办法: sudo apt-get install zlib1g-dev
),sudo ./configure --prefix=/usr/local/apache --enable-deflate --enable-expires --enable-headers --enable-so --enable-rewrite --with-mpm=worker --enable-proxy
??????? sudo ./configure --prefix=/usr/local/apache --enable-expires --enable-headers --enable-so --enable-rewrite --with-mpm=worker --enable-proxy
??????? sudo make
??????? sudo make install
???????
???? 2)运行
???? 修改http.conf 将ServerName 改为192.168.1.1
???? 启动:sudo /usr/local/apache/bin/httpd -f /usr/local/apache/conf/httpd.conf
???? 关闭:sudo kill -TERM `cat /usr/local/apache/logs/httpd.pid`
5,安装resin
备注:如果gcc是4.0或以上版本,安装resin3.0时,需要修改目录/usr/local/resin-3.0.24/modules/c/src/resin_os/下的
MakeFile的LD=/usr/bin/ld改为LD=/usr/bin/gcc,然后在make && make install
-------------------------------------------------------------------
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: