81510598 2020-01-08
mkdir /abc mount.cifs //192.168.56.1/lamp7 /abc ##lamp7是我本机的共享文件 rpm -ivh jdk-8u201-linux-x64.rpm
vim /etc/profile #末尾添加 export JAVA_HOME=/usr/java/jdk1.8.0_201-amd64 export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar export PATN=$JAVA_HOME/bin:$PATH #环境变量生效 source /etc/profile #查看 java 版本 java -version
执行下面的命令,从 Tomcat 官网下载 apache-tomcat-9.0.16.tar.gz 稳定版本,将安装包 apache-tomcat-9.0.16.tar.gz 上传到/root目录下 ##将安装包tomcat 移动到目录/usr/local 下 tar zxvf apache-tomecat-9.0.16.tar.gz -C /usr/loacl cd /usr/local mv apache-tomcat-9.0.16 /tomcat
##启动tomcat ## #开启 ln -s /usr/local/tomcat/bin/startup.sh /usr/bin/ 输入 :startup.sh #关闭 ln -s /usr/loacl/tomcat/bin/shutdown.sh /usr/bin/ 输入:shutdown.sh
)
cd /usr/java//jdk1.8.0_201-amd64/jre/lib/ cd security vim java.security ##查询 random securerandom.source=flie:/dev/random ##改成 securerandom.source=flie:/dev/urandom
yum install bind -y vim /etc/named.conf
vim /etc/named.rfc1912.zones
cd /var/named cp -p named.localhost kgc.com.zone vim kgc.com.zone cp -p kgc.zom.zone accp.zom.zone
##启动服务,关闭防火墙。 systemctl start named systemctl stop firewalld setenforce 0
##创建kgc和accp项目 目录和文件 cd /usr/local/tomcat/webapps/ mkdir /usr/local/tomcat/webapps/kgc echo "this is kgc page\!" > /usr/local/tomcat/webapps/kgc/index.jsp mkdir /usr/local/tomcat/webapps/accp echo "this is accp page\!" > /usr/local/tomcat/webapps/accp/index.jsp
vim /usr/local/tomcat/conf/server.xml <Host name="www.kgc.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context docBase="/usr/local/tomcat/webapps/kgc" path="" reloadable="true" /> </Host> <Host name="www.accp.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context docBase="/usr/local/tomcat/webapps/accp" path="" reloadable="true" /> </Host>