CENTOS7 Minimal installation Some components need to be installed on their own, such as Iptables,wget,vim
[Email protected] yum.repos.d]# cat/etc/redhat-releasecentos Linux release 7.2.1511 (Core) [[email protected] Yum.repos . d]# Uname-r 3.10.0-229.el7.x86_64
1. Install CENTOS7 Select a basic installation and first turn off firewall when you are finished configuring the network:
Stop firewall
Systemctl Stop Firewalld.service
Disable firewall boot
Systemctl Disable Firewalld.service
2. Install iptables Firewall
Yum Mode installation Iptables
Yum Install Iptables-services
Edit the firewall configuration file
Vi/etc/sysconfig/iptables #添加下面三句话到默认的22端口这条规则的下面-A input-m State--state new-m tcp-p TCP--dport 80-j accept-a INPUT -M state--state new-m tcp-p TCP--dport 3306-j accept-a input-m State--state new-m udp-p UDP--dport 161-j accep T
Finally reboot the firewall to make the configuration effective
Systemctl Restart Iptables.service
Setting up a firewall boot
Systemctl Enable Iptables.service
3, turn off SELinux
Editing the SELinux configuration file
vi/etc/selinux/config# comment out the following two lines #selinux=enforcing #SELINUXTYPE =targeted #增加一行SELINUX =disabled
Save, close
Esc
: Wq
Rebooting the system
Shutdown-r now
4,centos7 minimized installation without WGet tool, this we will use the source code behind, so first install this
Yum install-y wget
5, Add a third-party yum Source
Some bad environment need software, CentOS comes with the source, we add two sources, convenient after the Yum install bad environment required components, or one to go under the source code compilation too much trouble, I only added Epel and rpmforge two source
The first step, if the source file conflict, need to have a priority, so first install yum-priorities
Yum Install Yum-priorities
The second step is to set the CentOS default Yum source to the highest priority
cd/etc/yum.repos.d/#进入yum源目录vi Centos-base.repo
Add Priority=1 below #在 [base], [updates], [extras] group, add priority=2 under [Centosplus], [contrib] group
Step three, install Epel
RPM-IVH http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm--replacefilesrpm--import/etc/ Pki/rpm-gpg/rpm-gpg-key-epel-6vi/etc/yum.repos.d/epel.repo
Modify Epel Yum source priority, priority=11
Step four, install the Rpmforge yum source
wget Http://apt.sw.be/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpmwget/HTTP dag.wieers.com/rpm/packages/rpm-gpg-key.dag.txtrpm--import RPM-GPG-KEY.DAG.TXTRPM-IVH Rpmforge-release-0.5.3-1.el7.rf.x86_64.rpmvi/etc/yum.repos.d/rpmforge.repo
Modify Rpmforge Yum source priority, priority=12
Yum Update
6.Centos default comes with VI, function without vim rich, install vim
Yum Install Vim-enhanced-y
Http://www.cnblogs.com/phpinfo/p/3923461.html
CENTOS7 installation under minimal installation, compile lamp environment
This article is from the "Lanzhi" blog, make sure to keep this source http://7826443.blog.51cto.com/7816443/1728555
Centos 7 system Optimization < A;.