安装软件的几种方式
1.二进制发布包
软件已经针对平台编译打包发布,只需要解压,修改配制即可
2.RPM包
软件已经根据RPM规范打包好,需要获得相应的RPM软件,并且使用RPM命令来安装即可
3.Yum在线安装
软件已经根据RPM规范打包好发布在服务器上,可以用yum在线安装在服务器上的RPM文件包,并会自动解决安装过程中库的依赖问题
4.源码编译安装
源码以编译工程的形式发布,需要获取到源码编译工程后用相应的开发工具进行编译打包部署
文件上传下载工具
1.FileZilla
2.SSH Secure File Transfer Client
3.Xftp 5等等
依赖包
JDK依赖包:
yum install glibc.i686
MYSQL依赖包:
yum -y install libaio.so.1 libgcc_s.so.1 libstdc++.so.6
yum update libstdc++-4.4.7-4.el6.x86_64
yum -y install libncurses.so.5 libtinfo.so.5
redis依赖程序
yum install gcc-c++
cat /etc/sysconfig/network-scripts/ifcfg-eth0
在liunx上安装jdk
下载jdk:https://www.oracle.com/java/technologies/javase-downloads.html
1. 查看你liunx的版本是32位\64位
getconf LONG_BIT
2.在 cd /usr/local 文件下 创建jdk文件夹(mkdir jdk)
3.将jdk文件传在jdk文件夹
4.检查liunx的jdk(java -version)
查询安装信息 rpm -qa | grep java
5.卸载liunx自带的jdk版本 (全部卸载)
rpm -e --nodeps 文件名
rpm -e --nodeps java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64
6.加压传上来的jdk
tar -zxvf jdk-8u152-linux-x64.tar.gz
7.配制环境变量
vim /etc/profile
文件最后添加
export JAVA_HOME= /usr/local/jdk/jdk1.8.0_152
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
8.重新让文件生效
source /etc/profile
9.验证jdk是否安装成功
java -version
liunx更换Yum阿里源
首先:yum install wget -y
查看文件: vim /ect/yum.repos.d/CentOS-Base.repo
1.备份问文件并改名.backup : mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载阿里源:wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
3.清空yum:yum clean all
4.获取阿里缓存信息:yum makecache
5. yum install vim -y
6. yum install telnet -y
在liunx上安装mysql
下载mysql :http://dev.mysql.com/downloads/mysql/
https://downloads.mysql.com/archives/community/
1.进入到:cd /usr/local 下创建msql文件 mkdir mysql
2.上传mysql文件到use/local/mysql中
3.搜索liunx自带的msql (rpm -qa | grep mysql)
4.卸载liunx自带的mysql (rpm -e --nodeps mysql文件)
5.解压msql文件 (tar -xvf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar)
6.安装:( rpm -ivh mysql-community-common-5.7.28-1.el7.x86_64.rpm)
6.1: rpm -qa | grep mariadb
6.2: rpm -e --nodeps mariadb-libs-5.5.68-1.el7.x86_64
7.安装:(rpm -ivh mysql-community-libs-5.7.28-1.el7.x86_64.rpm)
8.安装mysql客户端:(rpm -ivh mysql-community-client-5.7.28-1.el7.x86_64.rpm)
9.安装:yum install net-tools -y
10.安装mysql服务端(rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm)
11.验证是否安装成功 mysqladmin --version
12.启动 systemctl start mysqld
13.查看是否启动 systemctl status mysqld
14.查看mysql密码: cat /var/log/mysqld.log | grep password
15. 登录mysql: mysql -u root -p
16. 修改mysql用户名:set global validate_password_policy=low;
17. 修改用户密码:set global validate_password_length=6;
alter user root@localhost identified by '123456';
18:show databases;
19:退出:exit
使用Navicat 登录mysql
1.登录mysql:mysql -u root -p
2.use mysql
3.select host,user from user;
4.update user set host=’%’ where user =‘root’;
5.commit;
6.exit;
7.systemctl restart mysqld;
在liunx上安装tomcat8.5
1.在/usr/local下创建tomcat文件夹:mkdir tomcat
/usr/local/tomcat
2.将tomcat上传到/usr/local/tomcat路径下
3.解压tomcat8.5
tar -zxvf apache-tomcat-8.5.24.tar.gz
4.进入:cd /usr/local/tomcat/apache-tomcat-8.5.24/bin
5.启动tomcat : ./startup.sh
6.访问: http://192.168.214.1:8080/
在Liunx上安装redis
1.安装yum install gcc-c++
2.远程下载redis:
wget http://download.redis.io/releases/redis-3.0.4.tar.gz
3.解压redis:tar -zxvf redis-3.0.4.tar.gz
4.进入redis 进行make编译
5.安装redis: make PREFIX=/usr/local/redis install
6.复制redis的配制文件: redis.conf
cp ./redis.conf /usr/local/redis/bin/
7.启动redis服务端:./redis-server redis.conf
8.重新打开链接窗口启动客户端:./redis-cli
在Liunx上安装Nginx
1.安装gcc环境:yum install gcc-c++
2.安装: yum install -y pcre pcre-devel
3.安装:yum install -y zlib zlib-devel
4.安装:yum install -y openssl openssl-devel
5.使用命令下载nginx:wget -c https://nginx.org/download/nginx-1.10.1.tar.gz
6.解压: tar -zxvf nginx-1.10.1.tar.gz
7. 进入解压nginx
./configure
–prefix=/usr/local/nginx
–conf-path=/usr/local/nginx/conf/nginx.conf
–pid-path=/usr/local/nginx/conf/nginx.pid
–lock-path=/var/lock/nginx.lock
–error-log-path=/var/log/nginx/error.log
–http-log-path=/var/log/nginx/access.log
–with-http_gzip_static_module
–http-client-body-temp-path=/var/temp/nginx/client
–http-proxy-temp-path=/var/temp/nginx/proxy
–http-fastcgi-temp-path=/var/temp/nginx/fastcgi
–http-uwsgi-temp-path=/var/temp/nginx/uwsgi
–http-scgi-temp-path=/var/temp/nginx/scgi
8.然后make
9.安装nginx:make install
10.创建零时文件目录:mkdir /var/temp/nginx/client -p
11.启动nginx:cd /usr/local/nginx/sbin
./nginx
12.停止nginx:./nginx -s stop