其实最重要的就是yum源吗。初始源的里面既没有nginx也没有tomcat7。
2,安装 JDK,这里我用1.7.0
3,搞定tomcat,这个要靠jpackage的源,tomcat-native还需要epel的源
1,搞定nginx,她家自己有源的:
- rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
- yum -y install nginx
- yum -y install java-1.7.0-openjdk
- rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
- yum -y install yum-priorities #这个是jpackage依赖的包要先装
- rpm -Uvh http://mirrors.dotsrc.org/jpackage/6.0/generic/free/RPMS/jpackage-release-6-3.jpp6.noarch.rpm
- yum -y install tomcat7 tomcat7-webapps tomcat7-admin-webapps tomcat-native
- 如果安装中遇到rpm is not signed的错误
- 按照这个来解决1、# yum install qemu*报错如下:Package qemu-kvm-tools-0.12.1.2-2.113.el6.x86_64.rpm is not signed2、解决# vim /etc/yum.repos.d/CentOS-Base.repo把其中的gpgcheck值改为0如果还报错yum加参数--nogpgcheck
-
# whereis tomcat7
tomcat7: /usr/sbin/tomcat7 /etc/tomcat7 /usr/share/tomcat7 - service tomcat7 start
- service tomcat7 stop
- service tomcat7 restart
- tomcat7的配置文件在以上的/usr/share/tomcat7的目录下,可以修改tomcat7端口和配置