centos7.2 upload tomcat jdk for centos
环境变量
echo welcome to heima server
cd /root/server
pwd
export JAVA_HOME=./jdk1.8.0_131/jre
export PATH=$PATH:./jdk1.8.0_131/jre/bin:./apache-tomcat-8.5.15/bin
export TOMCAT_HOME=./apache-tomcat-8.5.15/bin
export CATALINA_HOME=./apache-tomcat-8.5.15
chmod u+x $TOMCAT_HOME/startup.sh
$TOMCAT_HOME/startup.sh设置开机启动 /etc/rc.d/rc.local ( 需要chmod 777)
启动start-server.shtomcat启动卡死 centos随机数问题
修改 ./jdk1.8.0_131/jre/lib/security
securerandom.source=file:/dev/./urandom
更新yum版本
yum update
添加yum仓库
touch /etc/yum.repos.d/docker.repo
修改yum仓库内容
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
安装 Docker
yum install -y docker-engine
启动docker
systemctl start docker.service
验证
docker version
增加转发
修改 /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H=unix:///var/run/docker.sock -H=tcp://0.0.0.0:2725