• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Linux环境和常用软件

武飞扬头像
橘子洲头361
帮助1

设置时间

yum install ntpdate -y

ntpdate cn.pool.ntp.org

hwclock --systohc

允许开启的文件数量

echo fs.inotify.max_user_watches = 524288 | sudo tee -a /etc/sysctl.conf

安装ssh

yum install openssh-server -y

vi /etc/ssh/sshd_config

放开port,ListenAddress,PermitRootLogin

开端口

firewall-cmd --zone=public --add-port=8889/tcp --permanent

网络工具

yum install net-tools.x86_64 -y

安装java

yum install java-1.8.0-openjdk.x86_64 -y

安装wget

yum install wget -y

安装mysql

wget repo.mysql.com/yum/mysql-5…

rpm -ivh mysql57-community-release-el7-10.noarch.rpm

rpm --import repo.mysql.com/RPM-GPG-KEY…

yum -y install mysql-server

systemctl enable mysqld

systemctl start mysqld

查看密码

cat /var/log/mysqld.log |grep password

set global validate_password_policy=0;

set global validate_password_length=1;

flush privileges;

ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';

允许远程连接

use mysql;

update user set host = '%' where user = 'root';

grant all privileges on . to 'root'@'%' identified by 'root';

flush privileges;

去掉大小写敏感

vi /etc/my.conf

添加

lower_case_table_names = 1

systemctl restart mysqld

安装redis

yum install epel-release

yum install redis

service redis start

chkconfig redis on

安装nodejs14

yum -y install curl

curl -sL rpm.nodesource.com/setup_14.x | sudo bash -

yum install -y nodejs

npm --registry registry.npm.taobao.org install

//内部npm私服

npm --registry http://172.25.78.106:4873/ install

安装nginx

rpm -Uvh nginx.org/packages/ce…

yum -y install nginx

systemctl start nginx

目录/etc/nginx/nginx.conf

开nginx的HTTP权限

首先查看selinux状态

sestatus

如果是enable可以先去配置文件关闭,然后把enable换成disable,下次重启生效

vi /etc/selinux/config

临时关闭

setenforce 0

开启允许http访问

setsebool -P httpd_can_network_connect 1

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgahfji
系列文章
更多 icon
同类精品
更多 icon
继续加载