安装JDK
- 先在 /etc/apt/source.list 中增加:
deb http://ftp.debian.org/debian/ squeeze main non-free
- 然后在命令行执行:
#apt-get install sun-java6-jdk
配置环境
- 修改 /etc/profile ,增加以下内容:
ulimit -SHn 65535 export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26
安装Nginx
- 安装依赖包
#aptitude install make #aptitude install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
- 下载 Nginx 并解压:
# cd /usr/local/soft/ # wget http://nginx.org/download/nginx-1.2.3.tar.gz # tar -zxvf nginx-1.2.3.tar.gz
- 下载Nginx的fair模块(一个保证各个backend服务器都均衡访问的模块,若不需要可忽略)
# cp /mnt/61.155/开发工具/Nginx/gnosek-nginx-upstream-fair-a18b409.tar.gz /usr/local/soft/ # tar -zxvf gnosek-nginx-upstream-fair-a18b409.tar.gz
- 编译安装Nginx(注:若不需要fair模块,config命令中的 --add-module=/usr/local/soft/gnosek-nginx-upstream-fair-a18b409 可不要)
# cd nginx-1.2.3 # ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=/usr/local/soft/gnosek-nginx-upstream-fair-a18b409 # make # make install
- 运行Nginx,验证安装是否成功:
# /usr/local/nginx/sbin/nginx
- 访问 http://(服务器ip地址)/ ,若看到“Welcome to nginx!”即安装成功。
安装Resin
- 复制、解压安装文件和破解文件
# cp /mnt/resin/resin-pro-4.0.26.tar.gz /usr/local/soft/ # cp /mnt/resin/破解包/pro_4.0.26.jar /usr/local/soft/ # tar -zxvf resin-pro-4.0.26.tar.gz
- 编译、安装
# cd resin-pro-4.0.26 # ./configure --prefix=`pwd` # ./make # ./make install # cp /usr/local/soft/pro_4.0.26.jar lib/pro.jar
- 运行Resin,并验证是否安装成功:
# ./bin/resin.sh start
- 访问 http://(ip地址):8080/ ,若看到resin的页面就安装成功了。