ubuntu iptables https://www.cnblogs.com/xwgcxk/p/10820518.html
解决kdevtmpfsi过程总结 https://cloud.tencent.com/developer/article/1562294
Docker常用命令整理 https://www.dllhook.com/post/234.html
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
CENTOS7开机自启动脚本 https://www.cnblogs.com/longchengruoxi/p/11451062.html https://blog.51cto.com/12173069/2118590
centos升级到GLIBC_2.18 https://www.cnblogs.com/g2thend/p/14032864.html
Centos下载:http://vault.centos.org/
163.com下载:http://mirrors.163.com/
mv /usr/local/script/autostart.sh /etc/rc.d/init.d
chmod +x /etc/rc.d/init.d/autostart.sh
cd /etc/rc.d/init.d
chkconfig --add autostart.sh
chkconfig autostart.sh on
export LANG='POSIX'
export LC_CTYPE='zh_CN.UTF-8'
echo 'HISTTIMEFORMAT="%F %T "' >> /etc/profile
'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/ ./
yum install tmux
/etc/profile新增以下内容:
export JAVA_HOME=/usr/local/java8
export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
ulimit -SHn 65535
#/etc/security/limits.conf
#/etc/security/limits.d/20-nproc.conf
* soft nproc 65535
root soft nproc unlimited
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
root soft nproc unlimited
~
#* soft nofile 65535
#* hard nofile 65535
ulimit -u 10240
ulimit -n 10240
ulimit -d unlimited
ulimit -m unlimited
ulimit -s unlimited
ulimit -t unlimited
ulimit -v unlimited
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
net.core.somaxconn = 4096
vm.overcommit_memory=1
/sbin/sysctl -p
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
ssh-keygen -e -f key.pem >> key.pem.pub
ssh-keygen -t rsa -C "lilvhua@wbf.io"
ssh-keygen -t rsa
ssh-keygen -t rsa -m pem
步骤:
1:修改ec2对应的卷,设置需要的大小;等待同步...
2: 登录ec2 里面使用 命令 lsblk 查看
3:找到对应的硬盘 命令 sudo growpart /dev/nvme1n1 1
4:resize2fs /dev/nvme1n1p1 既可
5:df -Th查看
grep -v "#" /etc/samba/smb.conf
grep -v "#" /etc/samba/smb.conf | grep -v ";"
wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
rpm -ivh mysql57-community-release-el7-8.noarch.rpm
#yum -y install mysql-community-server
yum install mysql-community-client
grep 'temporary password' /var/log/mysqld.log
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED BY '@abcd123456';