标签:master config detail 格式 linux out 127.0.0.1 contex 默认页
配置tomcat监听80端口vim /usr/local/tomcat/conf/server.xml
Connector port="8080" protocol="HTTP/1.1"
修改为Connector port="80" protocol="HTTP/1.1"
[root@akuilinux01 ~]# netstat -lntp | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1107/nginx: master
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 1768/java
tcp6 0 0 :::8009 :::* LISTEN 1768/java
[root@akuilinux01 ~]# /etc/init.d/nginx stop
Stopping nginx (via systemctl): [ 确定 ]
[root@akuilinux01 ~]# /usr/local/tomcat/bin/shutdown.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk1.8
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
[root@akuilinux01 ~]# /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk1.8
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@akuilinux01 ~]# netstat -lntp | grep 80
tcp6 0 0 :::80 :::* LISTEN 1948/java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 1948/java
tcp6 0 0 :::8009 :::* LISTEN 1948/java
<Host name="www.123.cn" appBase=""
unpackWARs= "true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/data/wwwroot/123.cn/" debug="0" reloadable="true" crossContext="true"/>
</Host>
[root@akuilinux01 ~]# cd /usr/local/src/
[root@akuilinux01 src]# wget http://dl.zrlog.com/release/zrlog-1.7.1-baaecb9-release.war
[root@akuilinux01 src]# cp zrlog-1.7.1-baaecb9-release.war /usr/local/tomcat/webapps/
[root@akuilinux01 src]# ls /usr/local/tomcat/webapps/
docs host-manager ROOT zrlog-1.7.1-baaecb9-release.war
examples manager zrlog-1.7.1-baaecb9-release
[root@akuilinux01 src]# cd /usr/local/tomcat/webapps/
[root@akuilinux01 webapps]# mv zrlog-1.7.1-baaecb9-release zrlog
[root@akuilinux01 webapps]# ls
docs examples host-manager manager ROOT zrlog zrlog-1.7.1-baaecb9-release.war
[root@akuilinux01 webapps]# mysql -uroot -ps5381561
mysql> create database zrlog;
Query OK, 1 row affected (0.05 sec)
mysql> grant all on zrlog.* to ‘zrlog‘@127.0.0.1 identified by ‘s5381561‘;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
root@akuilinux01 webapps]# mysql -uzrlog -h127.0.0.1 -ps5381561
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
| zrlog |
+--------------------+
3 rows in set (0.06 sec)
[root@akuilinux01 webapps]# mkdir /data/wwwroot/123.cn
[root@akuilinux01 webapps]# mv zrlog/* /data/wwwroot/123.cn/
[root@akuilinux01 webapps]# ls /data/wwwroot/123.cn/
admin/ error/ include/ META-INF/
assets/ favicon.ico install/ WEB-INF/
[root@akuilinux01 webapps]# /usr/local/tomcat/bin/shutdown.sh
[root@akuilinux01 webapps]# /usr/local/tomcat/bin/startup.sh
[root@akuilinux01 logs]# ls
catalina.2018-06-25.log localhost.2018-06-27.log
catalina.2018-06-27.log localhost_access_log.2018-06-25.txt
catalina.out localhost_access_log.2018-06-27.txt
host-manager.2018-06-25.log manager.2018-06-25.log
host-manager.2018-06-27.log manager.2018-06-27.log
localhost.2018-06-25.log
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="123.cn_access" suffix=".log"
pattern="%h %l %u %t "%r" %s %b" />
标签:master config detail 格式 linux out 127.0.0.1 contex 默认页
原文地址:http://blog.51cto.com/akui2521/2133465