Chinaunix首页 | 论坛 | 博客
  • 博客访问: 67771
  • 博文数量: 20
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 240
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-07 15:19
文章分类
文章存档

2009年(3)

2008年(17)

我的朋友

分类: LINUX

2008-11-20 09:33:02

 
1,安装Apache
cd /usr/local/src
tar zxfv httpd-2.0.63.tar.gz
cd httpd-2.0.63
./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all --with-expat=builtin  (--with-expat=builtin为64位CPU专用)
make
make install
echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.local
 
2,安装Mysql
cd /usr/local/src
tar zxvf mysql-max-4.0.27-pc-linux-gnu-i686-glibc23.tar.gz
mv mysql-max-4.0.27-pc-linux-gnu-i686-glibc23 /usr/local/mysql
groupadd mysql ; useradd -g mysql mysql
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
/usr/local/mysql/bin/mysqld_safe --user=mysql &
echo "/usr/local/mysql/bin/mysqld_safe --user=mysql &" >> /etc/rc.local
 
3,安装JDK(java 1.5)
cd /usr/local/src
rpm -ivh jdk-1_5_0_14-linux-i586.rpm
cd /usr/java/
ln -s /usr/java/jdk1.5.0_14 /usr/local/java
 
########## 修改/etc/profile 添加如下内容

export JAVA_HOME=/usr/local/java
export JRE_HOME=/usr/local/java/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:
 
########## 重新启动机器以后, 回到控制台查看 Java 版本 , 看到 version "1.5.0", 则表示 JDK1.5 已安装成功
java -version
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)

4,安装Jboss
cd /usr/local/src
从10.1.254.234 FTP  jboss-4.2.2.GA.tar.gz 并解压至任何目录(个人习惯/usr/local/jboss)
(手动启动:/usr/local/jboss/bin/run.sh -b IP
手动关闭:/usr/local/jboss/bin/shutdown.sh -S(注意大小写)
后台运行:nohup ./run.sh -b 0.0.0.0 > /dev/null &) 
 
5,修改8080端口到9080端口
 a.vi /usr/local/jboss/server/default/conf/jboss-service.xml
    1099 改为 2099
    1098 改为 2098
    4444 改为 5444
    4445 改为 5445
    4446 改为 5446
 b.vi /usr/local/jboss/server/default/deploy/jboss-web.deployer/server.xml
        enableLookups="false" redirectPort="8443" acceptCount="100" 改为 enableLookups="false" redirectPort="9443" acceptCount="100"
         emptySessionPath="true" enableLookups="false" redirectPort="8443" /> 改为  emptySessionPath="true" enableLookups="false" redirectPort="9443" />
 c.vi /usr/local/jboss/server/default/conf/jndi.properties
   添加:java.naming.provider.usr=localhost:2099
   mv /usr/local/jboss/server/default/conf/jndi.properties /usr/local/jboss/client
 
6,vi /root/.bash_profile
   添加:PATH=$PATH:$HOME/bin
        export JBOSS_HOME=/usr/local/jboss
        export JBOSS_CLASSPATH=$JBOSS_HOME/client
        export PATH=$PATH:$JBOSS_HOME/bin
 
7,后台启动:nohup ./run.sh -b 0.0.0.0 > /dev/null &(所有网段机器都可以访问)
注:.sh文档运行前,需更改权限. chmod 777
 
 
 

 
阅读(1029) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~