wiki-files/centos/software.md

83 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 常用软件
description: CentOS中常用软件的安装
published: true
date: 2021-08-03T08:44:11.452Z
tags: centos
editor: markdown
dateCreated: 2021-08-03T08:44:11.452Z
---
# Jdk
1. 下载JDK[华为镜像](https://repo.huaweicloud.com/java/jdk/8u202-b08/)
2. 上传到服务器
3. 复制到 /usr/jdk没有新建
```shell
$ cp jdk-8u211-linux-x64.tar.gz /usr/jdk
```
4. 修改配置文件
```linux
$ vim /etc/profile
```
5. 配置环境变量
```vim
export JAVA_HOME=/usr/jdk/jdk1.8.0_211
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin
```
6. 刷新配置变量
```shell
$ source /etc/profile
```
# MySQL
1.
# nginx
1. 添加依赖
```shell
$ apt-get install gcc
$ apt-get install libpcre3 libpcre3-dev
$ apt-get install zlib1g zlib1g-dev
# Ubuntu14.04的仓库中没有发现openssl-dev由下面openssl和libssl-dev替代
# apt-get install openssl openssl-dev
$ sudo apt-get install openssl
$ sudo apt-get install libssl-dev
```
2. 下载nginx并且解压
3. 编译
```shell
# 进入nginx目录
$ /usr/local/nginx/nginx-1.13.7
# 执行命令
$ ./configure
# 执行make命令
$ make
# 执行make install命令
$ make install
```
4. 启动nginx
```shell
# 进入nginx启动目录
$ cd /usr/local/nginx/sbin
# 启动nginx
$ ./nginx
```
# zip、unzip
```shell
$ yum install -y zip unzip
```