前端之家收集整理的这篇文章主要介绍了
ubuntu下JDK,tomcat,mysql,nginx搭建,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
因为欣赏所以转载 原文地址http://blog.csdn.net/sinat_33769123/article/details/52317553
JDK的安装
1:通过wget下载jdk
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.tar.gz
2:解压jdk
1
tar
-zxvf jdk
-8u101
-linux-x64.tar
.gz
3:在.bashrc文件中添加jdk的路径
1
2
3
4
5
6
7
8
9
10
vi ~/.bsahrc
export JAVA_HOME=/xxx
export CLASSPATH=${JAVA_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
source ~/.bashrc
4:查看jdk版本
1
2
3
4
5
6
7
8
java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13,mixed mode)
Tomcat的安装
1:通过wget下载tomcat
1
wget http://www-us
.apache.org/dist/tomcat/tomcat-
7/v7
.0.70/bin/apache-tomcat-
7.0.70.tar.gz
2:解压tomcat
1
tar -zxvf apache-tomcat-
3:添加坏境配置
1
2
3
4
5
6
cd apache-tomcat-7.0.70/bin
export JAVA_HOME=/xxx
export JAVA_JRE=/xxx/jre
4:启动tomcat
1
2
3
4
5
6
7
8
sudo ./startup.sh
sudo ./shutdown.sh
netstat -antup
1:安装MySQL-server
1
sudo apt-get install MysqL-server
2:安装MysqL-client
1
sudo apt-get install MysqL-client
3:安装libMysqLclient-dev
1
sudo apt-get install libMysqLclient-dev
4:启动MysqL
1
MysqL -u root -p
1:下载Nginx
1
http://Nginx.org/ 下载Nginx
2:解压Nginx
1
tar -zxvf Nginx-1.9.13 3:安装Nginx必须的库
:
1
2
3
sudo apt-get install libpcre++-dev 安装pcrecpp开发文件
sudo apt-get install libpcre++0 安装pcrecpp库文件
sudo apt-get install openssl 安装openssl
4:Nginx安装
1
2
3
4
5
//安装完成安装目录/usr/local/Nginx
cd Nginx-1.9.13
sudo ./configure
make
sudo make install
5:启动Nginx
cd /usr/local/Nginx/sbin
sudo ./Nginx 启动Nginx
netstat -antup 查看80端口是否监听
原文链接:https://www.f2er.com/ubuntu/353921.html