centos7脚本记录

配置网络连接

sed -i \'/BOOTPROTO/s/dhcp/static/g\' /etc/sysconfig/network-scripts/ifcfg-eno16777736sed -i \'/ONBOOT/s/no/yes/g\' /etc/sysconfig/network-scripts/ifcfg-eno16777736sed -i \'1a IPADDR=192.168.25.12\' /etc/sysconfig/network-scripts/ifcfg-eno16777736sed -i \'1a GATEWAY=192.168.25.1\' /etc/sysconfig/network-scripts/ifcfg-eno16777736sed -i \'1a NETMAKE=255.255.255.0\' /etc/sysconfig/network-scripts/ifcfg-eno16777736sed -i \'1a DNS=8.8.8.8\' /etc/sysconfig/network-scripts/ifcfg-eno16777736systemctl restart network

配置yum

mkdir /mnt/cdrommount /dev/cdrom /mnt/cdrom

sed -i 's/media/mnt/g' /etc/yum.repos.d/CentOS-Media.repo
sed -i '17,18d' /etc/yum.repos.d/CentOS-Media.repo
sed -i 's/CentOS/cdrom/g' /etc/yum.repos.d/CentOS-Media.repo
sed -i '/gpgcheck/s/1/0/g' /etc/yum.repos.d/CentOS-Media.repo
sed -i '/enabled/s/0/1/g' /etc/yum.repos.d/CentOS-Media.repo

cd /etc/yum.repos.d/
rm -rf CentOS-Base.repo CentOS-fasttrack.repo CentOS-CR.repo CentOS-Vault.repo CentOS-Debuginfo.repo CentOS-Sources.repo
cd

yum clean all
yum makecache

配置其他

yum install -y gcc*

sed -i '/SELINUX/s/enforcing/disabled/g' /etc/sysconfig/selinux

systemctl stop firewalld.service
systemctl disable firewalldw

配置httpd

尊重作者转载请说明出处
内容:centos7脚本记录
URL:https://www.daadn.cn/archives/45.html
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇