|
1 | 1 | ---
|
2 | 2 | title: "Aloys的环境搭建手册"
|
3 | 3 | categories:
|
4 | | - - others |
| 4 | + - setup-environment |
5 | 5 | tags:
|
6 | 6 | - 环境搭建
|
7 | 7 | toc: true
|
@@ -4153,178 +4153,6 @@ c) rsync -az --progress --delete --exclude=".git" android@192.168.1.125:/home/an
|
4153 | 4153 | Ubuntu 22.04.2 LTS
|
4154 | 4154 | 配置好固定IP,安装SSH(Server)/Samba等基础网络连接软件
|
4155 | 4155 |
|
4156 | | -## 腾讯云环境构建 |
4157 | | -
|
4158 | | -### 开启root用户 |
4159 | | -sudo passwd root |
4160 | | -
|
4161 | | -### 修改主机名 |
4162 | | -sudo vim /etc/hostname |
4163 | | -修改成ubuntu |
4164 | | -sudo reboot |
4165 | | -
|
4166 | | -### 防止SSH经常断连 |
4167 | | -ubuntu@ubuntu:~$ sudo vim /etc/ssh/sshd_config |
4168 | | -ClientAliveInterval 30 |
4169 | | -ClientAliveCountMax 86400 |
4170 | | -
|
4171 | | -ubuntu@ubuntu:~$ sudo /etc/init.d/ssh restart |
4172 | | -### 安装JDK 8 |
4173 | | -ubuntu@ubuntu:/usr/local$ sudo mkdir java |
4174 | | -ubuntu@ubuntu:/usr/local$ sudo chown ubuntu:ubuntu java |
4175 | | -
|
4176 | | -上传jdk-8u371-linux-x64.tar.gz到java目录 |
4177 | | -
|
4178 | | -ubuntu@ubuntu:/usr/local$ cd java/ |
4179 | | -ubuntu@ubuntu:/usr/local/java$ tar -zxvf jdk-8u371-linux-x64.tar.gz |
4180 | | -
|
4181 | | -ubuntu@ubuntu:/usr/local/java $ cd |
4182 | | -ubuntu@ubuntu:~$ sudo vim /etc/profile |
4183 | | -
|
4184 | | -在文件末尾添加如下内容: |
4185 | | -
|
4186 | | -export JAVA_HOME=/usr/local/java/jdk1.8.0_371 |
4187 | | -export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH |
4188 | | -export PATH=$JAVA_HOME/bin:$PATH |
4189 | | -
|
4190 | | -ubuntu@ubuntu:~$ source /etc/profile |
4191 | | -ubuntu@ubuntu:~$ java -version |
4192 | | -java version "1.8.0_371" |
4193 | | -Java(TM) SE Runtime Environment (build 1.8.0_371-b11) |
4194 | | -Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode) |
4195 | | -### 安装JDK 17 |
4196 | | -ubuntu@ubuntu:/usr/local$ sudo mkdir java |
4197 | | -ubuntu@ubuntu:/usr/local$ sudo chown ubuntu:ubuntu java |
4198 | | -
|
4199 | | -上传jdk-8u371-linux-x64.tar.gz到java目录 |
4200 | | -
|
4201 | | -ubuntu@ubuntu:/usr/local$ cd java/ |
4202 | | -ubuntu@ubuntu:/usr/local/java$ tar -zxvf jdk-17_linux-x64_bin.tar.gz |
4203 | | -
|
4204 | | -ubuntu@ubuntu:/usr/local/java $ cd |
4205 | | -ubuntu@ubuntu:~$ sudo vim /etc/profile |
4206 | | -
|
4207 | | -在文件末尾添加如下内容: |
4208 | | -
|
4209 | | -export JAVA_HOME=/usr/local/java/jdk-17.0.7 |
4210 | | -export PATH=$JAVA_HOME/bin:$PATH |
4211 | | -
|
4212 | | -ubuntu@ubuntu:~$ source /etc/profile |
4213 | | -ubuntu@ubuntu:~$ java -version |
4214 | | -java 17.0.7 2023年04月18日 LTS |
4215 | | -Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224) |
4216 | | -Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing) |
4217 | | -
|
4218 | | -### 安装Tomcat 8.5 |
4219 | | -ubuntu@ubuntu:/usr/local$ sudo mkdir tomcat |
4220 | | -ubuntu@ubuntu:/usr/local$ sudo chown -R jiangxin:jiangxin tomcat |
4221 | | -ubuntu@ubuntu:/usr/local$ cd tomcat/ |
4222 | | -ubuntu@ubuntu:/usr/local/tomcat$ tar -zxvf apache-tomcat-8.5.88.tar.gz |
4223 | | -ubuntu@ubuntu:/usr/local/tomcat$ cd |
4224 | | -
|
4225 | | -ubuntu@ubuntu:~$ sudo vim /etc/profile |
4226 | | -
|
4227 | | -export CATALINA_BASE=/usr/local/tomcat/apache-tomcat-8.5.88 |
4228 | | -export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-8.5.88 |
4229 | | -export PATH=$PATH:$CATALINA_HOME/lib:$CATALINA_HOME/bin |
4230 | | -
|
4231 | | -ubuntu@ubuntu:~$ source /etc/profile |
4232 | | -
|
4233 | | -本次会话启动tomcat |
4234 | | -startup.sh ; tail -f $CATALINA_HOME/logs/catalina.out |
4235 | | -
|
4236 | | -后台启动tomcat |
4237 | | -nohup startup.sh & |
4238 | | -
|
4239 | | -关闭tomcat |
4240 | | -shutdown.sh |
4241 | | -
|
4242 | | -端口占用查询 |
4243 | | -sudo netstat -tulpn | grep 8080 |
4244 | | -
|
4245 | | -进程查询 |
4246 | | -ps -ef | grep tomcat |
4247 | | -
|
4248 | | -在浏览器中访问下面地址,查看能否正常访问: |
4249 | | -
|
4250 | | -http://124.222.145.48:8080/ |
4251 | | -### 安装Tomcat 9 |
4252 | | -ubuntu@ubuntu:/usr/local$ sudo mkdir tomcat |
4253 | | -ubuntu@ubuntu:/usr/local$ sudo chown -R jiangxin:jiangxin tomcat |
4254 | | -ubuntu@ubuntu:/usr/local$ cd tomcat/ |
4255 | | -ubuntu@ubuntu:/usr/local/tomcat$ tar -zxvf apache-tomcat-9.0.75.tar.gz |
4256 | | -ubuntu@ubuntu:/usr/local/tomcat$ cd |
4257 | | -
|
4258 | | -ubuntu@ubuntu:~$ sudo vim /etc/profile |
4259 | | -
|
4260 | | -export CATALINA_BASE=/usr/local/tomcat/apache-tomcat-9.0.75 |
4261 | | -export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-9.0.75 |
4262 | | -export PATH=$PATH:$CATALINA_HOME/lib:$CATALINA_HOME/bin |
4263 | | -
|
4264 | | -ubuntu@ubuntu:~$ source /etc/profile |
4265 | | -
|
4266 | | -本次会话启动tomcat |
4267 | | -startup.sh ; tail -f $CATALINA_HOME/logs/catalina.out |
4268 | | -
|
4269 | | -后台启动tomcat |
4270 | | -nohup startup.sh & |
4271 | | -
|
4272 | | -关闭tomcat |
4273 | | -shutdown.sh |
4274 | | -
|
4275 | | -端口占用查询 |
4276 | | -sudo netstat -tulpn | grep 8080 |
4277 | | -
|
4278 | | -进程查询 |
4279 | | -ps -ef | grep tomcat |
4280 | | -
|
4281 | | -在浏览器中访问下面地址,查看能否正常访问: |
4282 | | -
|
4283 | | -http://124.222.145.48:8080/ |
4284 | | -### 安装Tomcat 10 |
4285 | | -ubuntu@ubuntu:/usr/local$ sudo mkdir tomcat |
4286 | | -ubuntu@ubuntu:/usr/local$ sudo chown -R jiangxin:jiangxin tomcat |
4287 | | -ubuntu@ubuntu:/usr/local$ cd tomcat/ |
4288 | | -ubuntu@ubuntu:/usr/local/tomcat$ tar -zxvf apache-tomcat-10.1.9.tar.gz |
4289 | | -ubuntu@ubuntu:/usr/local/tomcat$ cd |
4290 | | -
|
4291 | | -ubuntu@ubuntu:~$ sudo vim /etc/profile |
4292 | | -
|
4293 | | -export CATALINA_BASE=/usr/local/tomcat/apache-tomcat-10.1.9 |
4294 | | -export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-10.1.9 |
4295 | | -export PATH=$PATH:$CATALINA_HOME/lib:$CATALINA_HOME/bin |
4296 | | -
|
4297 | | -ubuntu@ubuntu:~$ source /etc/profile |
4298 | | -
|
4299 | | -本次会话启动tomcat |
4300 | | -startup.sh ; tail -f $CATALINA_HOME/logs/catalina.out |
4301 | | -
|
4302 | | -后台启动tomcat |
4303 | | -nohup startup.sh & |
4304 | | -
|
4305 | | -关闭tomcat |
4306 | | -shutdown.sh |
4307 | | -
|
4308 | | -端口占用查询 |
4309 | | -sudo netstat -tulpn | grep 8080 |
4310 | | -
|
4311 | | -进程查询 |
4312 | | -ps -ef | grep tomcat |
4313 | | -
|
4314 | | -在浏览器中访问下面地址,查看能否正常访问: |
4315 | | -
|
4316 | | -http://124.222.145.48:8080/ |
4317 | | -
|
4318 | | -### 安装MySQL |
4319 | | -
|
4320 | | -参考前文 |
4321 | | -
|
4322 | | -### 部署项目 |
4323 | | -war包放到$CATALINA_HOME/webapps/目录下,然后重启tomcat |
4324 | | -shutdown.sh; startup.sh ; tail -f $CATALINA_HOME/logs/catalina.out |
4325 | | -
|
4326 | | -http://124.222.145.48:8080/java-web-test/index.jsp |
4327 | | -
|
4328 | 4156 | ## MyEclipse 2014安装说明
|
4329 | 4157 |
|
4330 | 4158 | 下载过程就不详述了。
|
|
0 commit comments