切换导航
首页
技术问答
编程语言
前端开发
移动开发
开发工具
程序设计
行业应用
CMS系统
服务器
频道导航
▸ PHP
▸ Java
▸ Java SE
▸ Python
▸ C#
▸ C&C++
▸ Ruby
▸ VB
▸ asp.Net
▸ Go
▸ Perl
▸ netty
▸ Django
▸ Delphi
▸ Jsp
▸ .NET Core
▸ Spring
▸ Flask
▸ Springboot
▸ SpringMVC
▸ Lua
▸ Laravel
▸ Mybatis
▸ Asp
▸ Groovy
▸ ThinkPHP
▸ Yii
▸ swoole
▸ HTML
▸ HTML5
▸ JavaScript
▸ CSS
▸ jQuery
▸ Bootstrap
▸ Angularjs
▸ TypeScript
▸ Vue
▸ Dojo
▸ Json
▸ Electron
▸ Node.js
▸ extjs
▸ Express
▸ XML
▸ ES6
▸ Ajax
▸ Flash
▸ Unity
▸ React
▸ Flex
▸ Ant Design
▸ Web前端
▸ 微信小程序
▸ 微信公众号
▸ iOS
▸ Android
▸ Swift
▸ Hybrid
▸ Cocos2d-x
▸ Flutter
▸ Xcode
▸ Silverlight
▸ cocoa
▸ Cordova
前端之家
CentOS
centos 7安装jdk1.7等常用开发工具
centos 7安装jdk1.7等常用开发工具
2020-06-02
CentOS
前端之家
前端之家
收集整理的这篇文章主要介绍了
centos 7安装jdk1.7等常用开发工具
,
前端之家
小编觉得挺不错的,现在分享给大家,也给大家做个参考。
1 安装jdk: xshell执行命令:java -version,
显示
: java version "1.7.0_51" OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31) OpenJDK 64-Bit Server VM (build 24.51-b03,mixed mode) 表示centos已安装openjdk 1.7; 2 安装tomcat: [root@localhost admin]# wget http://mirrors.cnnic.cn/apache/tomcat/tomcat-7/v7.0.67/bin/apache-tomcat-7.0.67.tar.gz [root@localhost admin]# mv apache-tomcat-7.0.67 /usr/share/tomcat7 [root@localhost admin]# su admin [admin@localhost ~]$ cd /usr/share/tomcat7 && bin/startup.sh & [admin@localhost ~]$ cd /etc [admin@localhost etc]$ cd sysconfig [admin@localhost sysconfig]$ vim iptables [admin@localhost sysconfig]$ su Password: [root@localhost sysconfig]# vim iptables [root@localhost etc]# systemctl status iptables.service [root@localhost etc]# su admin [admin@localhost etc]$ su Password: [root@localhost etc]# systemctl status firewalld.service [root@localhost etc]# systemctl restart firewalld.service [root@localhost etc]# vim /etc/sysconfig/iptables [root@localhost etc]# systemctl restart firewalld.service [root@localhost etc]# service iptables stop Redirecting to /bin/systemctl stop iptables.service [root@localhost etc]# systemctl stop firewalld.service [root@localhost etc]# systemctl status firewalld.service [root@localhost etc]# su admin [admin@localhost etc]$ netstat -an | grep 8080 tcp6 0 0 :::8080 :::* LISTEN [admin@localhost etc]$ su Password: [root@localhost etc]# systemctl start firewalld.service [root@localhost etc]# systemctl status firewalld.service [root@localhost etc]# systemctl stop firewalld.service
关闭
虚拟机中centos防火墙后,主机访问http://192.168.137.0:8080/,检测是否正常配置。 3 安装git centos7的yum仓库中已经
自带
了git,你可以使用如下命令安装: yum install git 9 centos 安装jdk 1.7 http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz?AuthParam=1453898216_38e5b1ec2b0456427cb3ae177181a989 [root@localhost Downloads]# tar -zxvf jdk-7u79-linux-x64.gz [root@localhost Downloads]# ls apache-maven-3.3.9-bin.tar.gz hello jdk1.7.0_79 jdk-7u79-linux-x64.gz phddns-2.0.6.el6.x86_64.rpm [root@localhost Downloads]# mkdir /usr/local/java [root@localhost Downloads]# mv jdk1.7.0_79 /usr/local/java [root@localhost java]# java -version java version "1.7.0_51" OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31) OpenJDK 64-Bit Server VM (build 24.51-b03,mixed mode) [root@localhost java]# rpm -qa | grep java [root@localhost java]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.51-2.4.5.5.el7.x86_64 [root@localhost java]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64 [root@localhost java]# java -version bash: /usr/bin/java: No such file or directory [root@localhost java]# vim /etc/profile 打开之后在末尾
添加
export JAVA_HOME=/usr/local/java/jdk1.7.0_79 export JRE_HOME=/usr/local/java/jdk1.7.0_79/jre export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin: $PATH 注:
文件
末尾不能有空行 [root@localhost java]# source /etc/profile [root@localhost java]# java -version java version "1.7.0_79" 重新
登录
账户,再次运行java-version,验证jdk是否安装成功。redhat上安装jdk与centos上安装脚本略有不同,在redhat上安装jdk时,建议自行google安装教程。我在redhat 6上安装时,参照该步骤发现总是安装不正确,最后发现是profile
文件
最后加的一段
代码
的问题,教训。 10 centos 安装maven [admin@localhost Downloads]$ tar -zxvf apache-maven-3.3.9-bin.tar.gz apache-maven-3.3.9/lib/ext/README.txt [root@localhost Downloads]# mv apache-maven-3.3.9 /usr/share [root@localhost Downloads]# vim /etc/profile 打开之后在末尾
添加
export PATH=/usr/local/apache-maven-3.3.9/bin:$PATH [root@localhost java]# source /etc/profile [root@localhost java]# mvn -v Apache Maven 3.3.9 (bb52d8
502
b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00) Maven home: /usr/share/apache-maven-3.3.9 Java version: 1.7.0_79,vendor: Oracle Corporation Java home: /usr/local/java/jdk1.7.0_79/jre Default locale: en_US,platform encoding: UTF-8 OS name: "linux",version: "3.10.0-123.el7.x86_64",arch: "amd64",family: "unix" [root@localhost java]# 14 centos安装mariadb: [admin@localhost ~]$ rpm -qa | grep
MysqL
[root@localhost admin]# rpm -qa | grep mariadb mariadb-5.5.44-2.el7.centos.x86_64 mariadb-libs-5.5.44-2.el7.centos.x86_64 [root@localhost admin]# cd /etc/yum.repos.d [root@localhost yum.repos.d]# vi MariaDB.repo #
添加
如下
内容
: # MariaDB 10.0 CentOS repository list - created 2013-08-23 13:08 UTC # http://mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1.10/centos7-amd64/ gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 [root@localhost yum.repos.d]# rpm -e mariadb [root@localhost yum.repos.d]# rpm -qa | grep mariadb mariadb-libs-5.5.44-2.el7.centos.x86_64 [root@localhost yum.repos.d]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_64 [root@localhost yum.repos.d]# rpm -qa | grep mariadb [root@localhost yum.repos.d]# yum -y install MariaDB-client MariaDB-server MariaDB-devel Downloading packages: Total 60 kB/s | 157 MB 00:44:27 Installed: MariaDB-client.x86_64 0:10.1.10-1.el7.centos MariaDB-devel.x86_64 0:10.1.10-1.el7.centos MariaDB-server.x86_64 0:10.1.10-1.el7.centos Complete! [root@localhost yum.repos.d]# rpm -qa | grep MariaDB MariaDB-server-10.1.10-1.el7.centos.x86_64 MariaDB-common-10.1.10-1.el7.centos.x86_64 MariaDB-devel-10.1.10-1.el7.centos.x86_64 MariaDB-client-10.1.10-1.el7.centos.x86_64 [root@localhost yum.repos.d]# service
MysqL
start [root@localhost yum.repos.d]#
MysqL
admin -u root password 'password' [root@localhost yum.repos.d]#
MysqL
-u root -p Enter password: Server version: 10.1.10-MariaDB MariaDB Server Copyright (c) 2000,2015,Oracle,MariaDB Corporation Ab and others. MariaDB [(none)]> grant all privileges on *.* to 'root'@'%'identified by 'password' with grant option; Query OK,0 rows affected (0.25 sec) MariaDB [(none)]> flush privileges; Query OK,0 rows affected (0.07 sec) MariaDB [(none)]> exit; Bye [root@localhost yum.repos.d]# systemctl status mariadb.service 15 centos安装maven私服nexus [root@localhost admin]# cd /home/admin/Downloads [root@localhost Downloads]# tar zxvf nexus-2.12.0-01-bundle.tar.gz [root@localhost Downloads]# mv nexus-2.12.0-01 /usr/local/nexus [root@localhost bin]# cd /usr/local/nexus/bin [root@localhost bin]# ./nexus Usage: ./nexus { console | start | stop | restart | status | dump } [root@localhost bin]# lsof -i tcp:8081 [root@localhost bin]# ./nexus start **************************************** WARNING - NOT RECOMMENDED TO RUN AS ROOT **************************************** [root@localhost bin]# export RUN_AS_USER=root [root@localhost bin]# ./nexus start **************************************** WARNING - NOT RECOMMENDED TO RUN AS ROOT **************************************** Starting Nexus OSS... Started Nexus OSS. 16 查看占用8081端口的程序,
关闭
程序 [root@localhost bin]# lsof -i tcp:8081 [root@localhost bin]# ll /proc/4191 [root@localhost bin]# kill 4191 20 centos安装svn $ su $ yum install subversion $ svnserve --version $ cd /usr/local/svn $ svn help $ svn checkout https://xxxx/svn/Apps/trunk/ 21 安装系统实时监控工具Glances # yum install -y glances # glances 按下 ‘q‘ (‘ESC‘ 和 ‘Ctrl-C‘ 也可以)
退出
Glances 终端 22 linux查看系统32位还是64位 [admin@localhost ~]$ uname -a 23 centos安装R # tar -xzvf R-3.0.2.tar.gz # mv R-3.1.2 /usr/local # yum install gcc-gfortran # yum install gcc gcc-c++ # yum install readline-devel # yum install libXt-devel # cd /usr/local/R-3.0.2 # ./configure --enable-R-shlib --prefix=/usr/local/R-3.1.2 # make # make install # cd bin # ./R > x<-c(1,2,3) > x > install.packages('rJava') > q()
上一篇:CentOS中由一般用户切换为root用户
下一篇:在centOS上安装Ubuntu字体
猜你在找的CentOS相关文章
Centos7离线安装gcc4.8
有时候CentOS工作在无互联网的环境下,需要在离线环境下安装一些组件,这次实现的是模拟在...
作者:踏平扶桑 时间:2024-09-29
CentOS7离线安装devtoolset-9并编译redis6.0.5
首先参照https://www.cnblogs.com/wdw984/p/13330074.html,来进行如何安装Centos和离线下...
作者:踏平扶桑 时间:2024-09-29
使用Nginx在80端口上代理多个.NET CORE网站
有两个.NET CORE3.1网站部署在CentOS7上(内网IP是192.168.2.32),现在想实现访问http://...
作者:踏平扶桑 时间:2024-09-29
CentOS7中配置vsftpd
1、yum -y install vsftpd 安装vsftpd 2、配置vsftpd的配置文件(/etc/vsftpd/vsftpd.conf...
作者:踏平扶桑 时间:2024-09-29
CentOS7离线安装Mysql8.0
首先去mysql官网下载mysql的离线rpm安装包(https://downloads.mysql.com/archives/commun...
作者:踏平扶桑 时间:2024-09-29
CentOS中增加网络连接数的方法
CentOS默认对外访问,发起的TCP链接总数小于28232个。 可以通过以下命令的结果计算出来 $ ...
作者:踏平扶桑 时间:2024-09-29
VMware安装Centos7虚拟机
首先安装虚拟机很简单,所以呢,具体的安装过程就引用别人的博客,这篇文字很详细,引用之...
作者:前端之家 时间:2021-02-27
[Linux] 解决CentOS下Requires: libjson-c.so错误
当安装某些rpm包的时候 , 会爆出这个错误 Requires: libjson-c.so json-c是c语言下的json库...
作者:前端之家 时间:2021-02-06
阿里云centos7安装mysql8数据库
linux系统安装mysql8
作者:前端之家 时间:2021-01-10
centos安装mysql
一、安装 二、修改密码 三、修改远程连接权限(为了使用navicat)
作者:前端之家 时间:2020-12-03
编程分类
Linux
Windows
CentOS
Ubuntu
Nginx
WebService
Scala
Memcache
Apache
Redis
Docker
Bash
Azure
Tomcat
LNMP
Shell
数据结构
服务器运维
网络安全
最新文章
• Centos7离线安装gcc4.8
• CentOS7离线安装devtoolse
• 使用Nginx在80端口上代理多
• CentOS7中配置vsftpd
• CentOS7离线安装Mysql8.0
• CentOS7下安装RabbitMQ
• CentOS中增加网络连接数的
• VMware安装Centos7虚拟机
• [Linux] 解决CentOS下Requ
• 阿里云centos7安装mysql8数
热门标签
更多 ►
xebug
nodemon
docker-copy
dcos
elasticsearc
windows-cont
docker-windo
docker-aws
amazon-cloud
envoyproxy
hashicorp-va
swisscomdev
kafka-python
zscaler
photon-os
docker-swarm
kamon
google-cloud
concourse
wso2-am
persistent-v
api-manager
process-mana
manjaro
jenkins-work
hypriot
remoteapi
keystonejs
bitcoind
bitcoin-test