Linux安装软件汇总

1、配置镜像源

# 备份,将 CentOS-Base.repo 为CentOS-Base.repo.backup
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

# 下载新的 http://mirrors.aliyun.com/repo/Centos-7.repo,并命名为CentOS-Base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

# 清除缓存
yum clean all     # 清除系统所有的yum缓存
yum makecache     # 生成yum缓存

2、安装JDK

yum install java-1.8.0-openjdk
java -version

3、安装 Mysql

# 添加密钥
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 

# 编辑 /etc/yum.repos.d/mysql-community.repo:
vim /etc/yum.repos.d/mysql-community.repo

# 添加
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=https://mirrors.cloud.tencent.com/mysql/yum/mysql-5.7-community-el7-x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# 安装
yum install mysql-community-server

# 启动
systemctl start  mysqld.service
systemctl enable mysqld.service

# 查找MySQL初始化密码
grep "temporary password is generated" /var/log/mysqld.log

# 初始化数据库:
mysql_secure_installation 

# 进行数据库密码和安全设置
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): #输入第4步的查找结果
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] #是否设置root用户密码,输入y并回车或直接回车
New password: #设置root用户的密码
Re-enter new password: #再输入一次你设置的密码
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] #是否删除匿名用户,生产环境建议删除,所以直接回车
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] #是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] #是否删除test数据库,直接回车
 - Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
 ... Failed!  Not critical, keep moving...
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] #是否重新加载权限表,直接回车
 ... Success!


All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


# 开启远程
use mysql;
UPDATE user SET Host='' where user='root' AND Host='localhost' LIMIT 1;
flush privileges;

4、安装Redis

# 下载fedora的epel仓库
yum install epel-release

# 安装redis数据库
yum install redis

# 启动/停止
systemctl start redis.service
systemctl stop redis.service

# 设置远程登录
vim /etc/redis.conf
# 注释
# bind 127.0.0.1 ::1
# yes 更改为 no
protected-mode no

# 设置用户名密码

5、安装Mongodb

# 新增 repo
vim /etc/yum.repos.d/mongodb-org-4.0.repo

# 修改过repo
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled= 1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
# 或国内源
[mngodb-org]
name=MongoDB Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/4.0/x86_64/
gpgcheck=0
enabled=1

# 安装
yum install -y mongodb-org

# 启动/停止
systemctl start mongod
systemctl restart mongod
systemctl stop mongod

6、安装Nginx

# 添加CentOS 7 Nginx yum资源库
rpm -Uvh  http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

# 安装nginx
yum -y install nginx

# 启动/停止
systemctl start nginx
systemctl stop nginx

7、nacos启动脚本及systectl配置

# nacos.service 
[Unit]
Description=nacos
After=network.target

[Service]
Type=forking
ExecStart=/home/user/nacos/bin/startup.sh
ExecReload=/home/user/nacos/bin/shutdown.sh
ExecStop=/home/user/nacos/bin/shutdown.sh
PrivateTmp=true

[Install]
WantedBy=multi-user.target

8、安装RabbitMQ

# 安装RabbitMQ
yum install epel-release -y
yum install rabbitmq-server -y
# 开放端口15672
firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --reload
#配置网页插件(从网页登陆端口号:15672),启动rabbitmq
rabbitmq-plugins enable rabbitmq_management
systemctl start rabbitmq-server
# 默认账户密码:guest

9、安装Docker

10、安装Ftp

# 下载安装ftp
yum install -y vsftpd
# 设置开机自启
systemctl enable vsftpd
# 启动/关闭
systemctl start vsftpd
systemctl stop vsftpd

11、安装OpenOffice

# 官网下载安装包: https://www.openoffice.org/download/
# 解压文件
tar -zxvf Apache_OpenOffice_4.1.13_Linux_x86-64_install-rpm_zh-CN.tar.gz
# 进入 zh-CN/RPMS/ 目录
cd zh-CN/RPMS/
# 安装OpenOffice
yum localinstall *.rpm
cd desktop-integration
yum localinstall openoffice4.1.13-redhat-menus-4.1.13-9810.noarch.rpm

链接: https://pan.baidu.com/s/1ZutIkqPul3UuZ8F0O9JN6w 提取码: 3ve6

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值