=====================java========================
1.在/usr/目录下创建java目录
[root@localhost ~]# mkdir/usr/java
[root@localhost ~]# cd /usr/java
2.下载jdk,然后解压
wget --no-check-certificate --no-cookie --header "Cookie: oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
1.设置环境变量
[root@localhost java]# vi /etc/profile
在profile中添加如下内容:
#set java environment
JAVA_HOME=/usr/java/jdk1.7.0_79
JRE_HOME=/usr/java/jdk1.7.0_79/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
让修改生效:
[root@localhost java]# source /etc/profile
来源:http://www.linuxidc.com/Linux/2016-09/134941.htm
=========================mysql========================
1、CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# yum install mysql-community-server
2、成功安装之后重启mysql服务
# service mysqld restart
3 设置开机启动
chkconfig mysqld on
查看是否设置成功
chkconfig --list mysqld
4 创建root管理员:
mysqladmin -u root password 123456
登录:
mysql -u root -p
输入密码就可以了
5 开启远程访问
insert into user(Host,User) values("%","root");
6 设置权限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
重载授权表:
FLUSH PRIVILEGES;
ps:忘记密码重新设置密码
service mysqld stop 停止服务
mysqld_safe --user=root --skip-grant-tables 清空mysql密码
mysql -u root 登录mysql
use mysql 使用mysql库
搞定!
来源:http://www.centoscn.com/mysql/2014/0919/3778.html
========================tomcat=========================
mkdir /usr/tomcat8
cd tomcat8
wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.14/bin/apache-tomcat-8.5.14.tar.gz
=========================git========================
yum install git
======================服务器端口占用===========================
netstat -apn|grep 8080
kill -9 port
========================解压=========================
tar xzf .tar.gz
=================================================