Linux搭建Nexus2/Maven私服 https://blog.csdn.net/qq_36911145/article/details/82905299
Centos编译安装Apache/subversion1.9.7/httpd2.4.32 https://blog.51cto.com/liuhuiliang/2096497
Linux下使用Google Authenticator配置SSH登录动态验证码 https://www.cnblogs.com/caoshousong/p/10474710.html
Centos下载:http://vault.centos.org/
163.com下载:http://mirrors.163.com/
'more www.conf |grep -v "^;"'
cat /etc/issue
lsb_release -a
cat /proc/version
uname -a
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
、查看时区
centos7:
timedatectl|grep "Time zone"
centos6:
cat /etc/sysconfig/clock
2、修改时区
centos7:
timedatectl set-timezone Asia/Shanghai # 设置系统时区为上海
centos6:
修改文件:
/etc/sysconfig/clock 内容:
ZONE="Asia/Shanghai"
3、时间的修改
安装ntp软件:
yum install ntp -y
同步命令:
ntpdate asia.pool.ntp.org
如果可以同步:
加定时启动:
/5 * /usr/sbin/ntpdate time.windows.com >/dev/null 2>&1
时间服务器:
asia.pool.ntp.org
time.nist.gov
time.nuri.net
sudo fdisl -l #查看磁盘
sudo fdisk /dev/xxxxx
sudo mkfs.ext4 /dev/xxxx1
sudo mount /dev/xxxx1 /data
dd if=/dev/zero of=/opt/swap bs=1024 count=2048000
#dd if=/dev/zero of=/opt/swap bs=1024 count=4096000
#dd if=/dev/zero of=/opt/swap bs=1024 count=8192000
#dd if=/dev/zero of=/opt/swap bs=1024 count=16384000
mkswap /opt/swap
swapon /opt/swap
yum -y install lrzsz
sudo apt-get install lrzsz
wget https://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz
tar zxvf lrzsz-0.12.20.tar.gz
cd lrzsz-0.12.20
./configure --prefix=/usr/local/rz
make
make install
ln -s /usr/local/rz/bin/lrz /usr/local/rz/bin/rz
ln -s /usr/local/rz/bin/lsz /usr/local/rz/bin/sz
rz -y
sz test.tar.gz
rsync -vzrtopg --progress -e 'ssh -p 22' 用户名@srv-ip:/home/ubuntu/bost/ ./
/etc/profile新增以下内容:
export JAVA_HOME=/usr/local/java8
export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
#/etc/security/limits.conf
#/etc/security/limits.d/20-nproc.conf
* soft nproc 65535
root soft nproc unlimited
#* soft nofile 65535
#* hard nofile 65535
vi /etc/sysctl.conf
#net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_fin_timeout=30
/sbin/sysctl -p
ssh-keygen -e -f key.pem >> key.pem.pub
ssh-keygen -t rsa -C "lilvhua@wbf.io"
ssh-keygen -t rsa
步骤:
1:修改ec2对应的卷,设置需要的大小;等待同步...
2: 登录ec2 里面使用 命令 lsblk 查看
3:找到对应的硬盘 命令 sudo growpart /dev/nvme1n1 1
4:resize2fs /dev/nvme1n1p1 既可
5:df -Th查看
wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
rpm -ivh mysql57-community-release-el7-8.noarch.rpm
yum install mysql-community-client