java环境
yum install -y java-1.8.0-openjdk
yum install -y java-1.8.0-openjdk-headless
java -version
tomcat
添加链接描述
启动
/usr/local/tomcat/startup.sh
ss -ntulp | grep java
8009 8080
如果起不来 mv /dev/random /dev/bak ln -s /dev/urandom /dev/random
关闭 shutdown.sh
strings /dev/random
测试
<html>
<body>
<center>
Now time is:<%=new java.util.Date()%>
</center>
</body>
</html>
虚拟主机
<Engine name="Catalina" defaultHost="localhost">
默认打开
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="base"/>
</Host>
跳转
<Context path="" docBase="base"/>
端口与虚拟主机不绑定
加密
85行
… …
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystoreFile="/usr/local/tomcat/keystore" keystorePass="123456" clientAuth="false" sslProtocol="TLS" />
日志
catalina 日志,自动切割
localhost.access_log 访问日志
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
varnish
依赖
yum install -y gcc readline-devel ncurses-devel pcre-devel python-docutils
search python-docutils
python3-docutils.noarch : System for processing plaintext documentation for python3
useradd -s /sbin/nologin varnish
http://varnish-cache.org/downloads/varnish-5.2.1.tgz 改改名字
配置文件
[root@localhost varnish-5.2.1]
backend default {
.host = "127.0.0.1";
.port = "8080";
}
启动
varnishd -f /usr/local/etc/defaule.val
80 端口
日志
varnishlog //varnish日志
varnishcsa //访问日志
Could not get hold of varnishd, is it running?
关闭进程的命令为:pkill varnishd
|