随笔分类 -  Linux自动化运维

摘要:多台linux设置统一的正确环境:对-时间同步 命令:utpdate 时间服务器ip ntpdate -u xx.xx.xx.xx 结果如下: [root@linuxprobe ~]# ntpdate -u ntp.api.bz 29 Apr 15:26:27 ntpdate[2667]: step 阅读全文
posted @ 2021-05-11 14:54 ice_image 阅读(123) 评论(0) 推荐(0)
摘要:Nginx安装 wget https://nginx.org/download/nginx-1.14.0.tar.gz tar -zxvf nginx-1.14.0.tar.gz cd nginx-1.14.0 安装依赖库: yum install gcc-c++ yum install -y pc 阅读全文
posted @ 2019-06-06 11:26 ice_image 阅读(887) 评论(0) 推荐(0)
摘要:redhat开机自动连接网络配置 vim /etc/sysconfig/network-scripts/ifcfg-eth0 将 ONBOOT=no 更改为 yes 即可 redhat配置 yum 源(163的,直接将 repo 文件上传覆盖即可) 阅读全文
posted @ 2019-04-11 15:25 ice_image 阅读(187) 评论(0) 推荐(0)
摘要:在linux下我们经常用到的四个应用程序的目录是/bin、/sbin、/usr/bin、/usr/sbin 。而四者存放的文件一般如下: bin目录: bin为binary的简写主要放置一些系统的必备执行档例如:cat、cp、chmod df、dmesg、gzip、kill、ls、mkdir、mor 阅读全文
posted @ 2019-03-08 09:05 ice_image 阅读(2854) 评论(0) 推荐(0)
摘要:安装 mysql 之后,注意添加软连接 mysql 忘记密码操作, vim /etc/my.cnf 在 [mysqld] 的段中加上一句:skip-grant-tables 重启 mysql 服务, service mysql restart 在输入 mysql -u root -p 输入回车即可进 阅读全文
posted @ 2019-03-08 08:27 ice_image 阅读(7795) 评论(0) 推荐(0)
摘要:wget https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz tar -xzvf rarlinux-x64-5.5.0.tar.gz cd rarmakerar a filename 压缩文件rarunrar x filename 解压缩文件 阅读全文
posted @ 2019-03-07 15:18 ice_image 阅读(187) 评论(0) 推荐(0)
摘要:首先安装 lrzsz # yum -y install lrzsz 运行 rz 命令; 在弹出的窗口选择需要上传的文件,文件会被上传至对应的目录下 运行 sz file.name 在弹出的窗口选择保存文件的位置,文件会被下载至对应的目录下 阅读全文
posted @ 2019-03-07 14:35 ice_image 阅读(3825) 评论(0) 推荐(0)
摘要:软链接部分: ln -snf /usr/bin/python2.6 /usr/bin/python2 # ln -snf 【新链接地址】 【旧地址链接地址】 ln -s 【源文件或目录】 【目标文件或目录】 防火墙部分: 查看防火墙版本:iptables --version 查看防火墙规则:ipta 阅读全文
posted @ 2019-02-24 08:49 ice_image 阅读(412) 评论(0) 推荐(0)
摘要:下载并解压: 进入目录: 编译: 安装: makemake insatll 缺少依赖包导致: 执行:yum -y install zlib* 安装依赖包即可 仍缺少组件,无法导入_ctypes模块: https://cpython-devguide.readthedocs.io/setup/#bui 阅读全文
posted @ 2019-02-23 19:23 ice_image 阅读(10063) 评论(2) 推荐(1)
摘要:redhat自带的yum源如果没有注册,则不允许使用 cat /etc/redhat-release查看对应的版本号 rpm -qa |grep yum查看安装哪些包 rpm -qa|grep yum|xargs rpm -e --nodeps强制卸载所有包 rpm -qa|grep yum再次查看 阅读全文
posted @ 2019-02-23 14:20 ice_image 阅读(12299) 评论(3) 推荐(0)
摘要:x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE 阅读全文
posted @ 2019-02-23 11:25 ice_image 阅读(2752) 评论(0) 推荐(0)
摘要:设置python版本: 切换python版本 按照提示输入编号即可 这样你甚至可以将自己喜欢的任意版本python安装到任意位置,然后使用update-alternatives将其设置为系统默认python 阅读全文
posted @ 2019-02-23 10:27 ice_image 阅读(1168) 评论(0) 推荐(0)
摘要:pip版本的安装: sudo apt-get install python3-pip pip版本的查看: pip3 --version pip3 -V pip更新: sudo pip3 install --upgrade pip pip卸载: sudo apt-get remove python3- 阅读全文
posted @ 2019-02-23 10:18 ice_image 阅读(11581) 评论(0) 推荐(1)