----------------------------------------------------------------------------------------------------------------------
十多年的资阳网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整资阳建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。成都创新互联公司从事“资阳网站设计”,“资阳网站推广”以来,每个客户项目都认真落实执行。重启系统reboot
----------------------------------------------------------------------------------------------------------------------
JDK 下载地址http://www.oracle.com/technetwork/java/javase/downloads/index.html
获取真实地址http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-linux-x64.rpm?AuthParam=1402828126_1f9972f80e53983d3e83b549d51fb394
用wget下载wget-Ojdk-7u60-linux-x64.rpmhttp://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-linux-x64.rpm?AuthParam=1402828126_1f9972f80e53983d3e83b549d51fb394
修改文件名称mvjdk-7u60-linux-x64.rpmjdk-7-linux-x64.rpm
更改文件权限chmod755jdk-7u60-linux-x64.rpm
安装rpm-ivhjdk-7u60-linux-x64.rpm
删除文件rmjdk-7u60-linux-x64.rpm
配置java-home查询java版本 java -version 如果版本不对则配置java-home
打开文件/etc/profile
在profile文件末尾加入:
exportJAVA_HOME=/usr/java/jdk1.7.0_60 exportPATH=$JAVA_HOME/bin:$PATH exportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
重启登录
------------------------------------------------------------------------------------------------------------------------
Mysql 安装mysqlyuminstallmysqlmysql-servermysql-devel
启动mysqlservicemysqldstart
设置mysql密码mysql mysql>;USEmysql; mysql>;UPDATEuserSETPassword=PASSWORD(\'123456\')WHEREuser=\'root\'; mysql>;FLUSHPRIVILEGES;
设置允许远程登录mysql-uroot-p EnterPassword:<yournewpassword> mysql>GRANTALLPRIVILEGESON*.*TO\'root\'@\'%\'IDENTIFIEDBY\'123456\'WITHGRANTOPTION; mysql>FLUSHPRIVILEGES;
设为开机启动chkconfigmysqldon
------------------------------------------------------------------------------------------------------------------------
Apache 安装Apacheyuminstallhttpdhttpd-devel
卸载yum-yremovehttpd*
启动apacheservicehttpdstart
设为开机启动chkconfighttpdon
配置 文件位置/etc/httpd/conf/httpd.conf
设置虚拟主机目录在文件的最后添加
Listen9999 NameVirtualHost*:9999 <VirtualHost*:9999> ServerNamelocalhost:9999 DocumentRoot"/data/staticFile" </VirtualHost>
------------------------------------------------------------------------------------------------------------------------------
Tomcat 安装tomcatyum-yinstalltomcat6
启动tomcatservicetomcat6start
设为开机启动chkconfigtomcat6on
默认的tomcat文件夹路径/usr/share/tomcat6
配置(tomcat/conf/server.xml)<Hostname="localhost"appBase="webapps"unpackWARs="true"autoDeploy="true"> </Host> <Hostname="www.aa.com"appBase="webapps"unpackWARs="true"autoDeploy="true"> <Alias>www.aa.com</Alias> <Contextpath=""docBase="/data/webapps/aa"debug="0"/> </Host> <Hostname="www.bb.com"appBase="webapps"unpackWARs="true"autoDeploy="true"> <Alias>www.bb.com</Alias> <Contextpath=""docBase="/data/webapps/bb"debug="0"/> </Host>
----------------------------------------------------------------------------------------------------------------------
防火墙文件路径/etc/sysconfig/iptables(可能不存在,自己新建个就行)
我的配置#Generatedbyiptables-savev1.4.7onFriJun2715:46:012014 *filter :INPUTACCEPT[0:0] :FORWARDACCEPT[0:0] :OUTPUTACCEPT[5:748] -AINPUT-mstate--stateRELATED,ESTABLISHED-jACCEPT -AINPUT-picmp-jACCEPT -AINPUT-ilo-jACCEPT -AINPUT-ptcp-mstate--stateNEW-mtcp--dport22-jACCEPT -AINPUT-ptcp-mstate--stateNEW-mtcp--dport80-jACCEPT -AINPUT-ptcp-mstate--stateNEW-mtcp--dport8080-jACCEPT -AINPUT-ptcp-mstate--stateNEW-mtcp--dport3306-jACCEPT -AINPUT-ptcp-mstate--stateNEW-mtcp--dport9999-jACCEPT -AFORWARD-jREJECT--reject-withicmp-host-prohibited COMMIT #CompletedonFriJun2715:46:012014 #Generatedbyiptables-savev1.4.7onFriJun2715:46:012014 *nat :PREROUTINGACCEPT[35:1782] :POSTROUTINGACCEPT[107:8216] :OUTPUTACCEPT[107:8216] -APREROUTING-ptcp-mtcp--dport80-jREDIRECT--to-ports8080 COMMIT #CompletedonFriJun2715:46:012014
端口允许iptables-AINPUT-ptcp-mstate--stateNEW-mtcp--dport22-jACCEPT iptables-AINPUT-ptcp-mstate--stateNEW-mtcp--dport80-jACCEPT iptables-AINPUT-ptcp-mstate--stateNEW-mtcp--dport8080-jACCEPT iptables-AINPUT-ptcp-mstate--stateNEW-mtcp--dport3306-jACCEPT
端口转发iptables-tnat-APREROUTING-ptcp--dport80-jREDIRECT--to-port8080
配置保存serviceiptablessave
防火墙启动serviceiptablesstart
防火墙开机启动chkconfigiptableson
网页题目:CentOS部署
文章分享:https://www.cdcxhl.com/article4/cpghoe.html
成都网站建设公司_创新互联,为您提供外贸网站建设、搜索引擎优化、企业建站、网站改版、定制开发、网站维护
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联