MySQL pre-installation System preparation work

Source: Internet
Author: User
Tags percona

First, the System environment summary:

Second, install the Yum Source:

1. Install the disk Yum Source:

First, install XFS file system: 1, configure Yum Source: (CD-ROM) Vi/etc/yum.repos.d/yum.repo [server]name=serverbaseurl=file:///tmp/cddir/server/ enabled=1gpgcheck=0 [clusterstorage]name=serverbaseurl=file:///tmp/cddir/clusterstorage/enabled=1gpgcheck=0

2. Percona's Yum Source:

Official Yum Source: Http://www.percona.com/doc/percona-server/5.5/installation.html#using-percona-software-repositories?id =repositories:start with Yum installation: Yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/ percona-release-0.1-3.noarch.rpm 3, Epel Source:
wget http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
RPM-IVH epel-release-6-8.noarch.rpm
or directly RPM-IVH http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm 4, configure a single directory for Yum SourceA, #mkdir/root/desktop/yum//Create a directoryB. Put the software you want yum installed into the directory you created
C. #createrepo/root/desktop/yum
Createrepo/data/soft

4.1, if there is no createrepo command , you need to first install:
[Root@wing ~]# Yum Search Createrepo
[root@wing ~]# Yum Install Createrepo

4.2, modify the configuration file, specify the path of the yum source to my own yum directory
Baseurl=file:///root/desktop/yum

Third, see how the operating system starts: Who-r Modify the boot level to 3:vi/etc/inittabid:3:initdefault: Four, disable ipv6:1. Vi/etc/sysconfig/networknetworking_ipv6=no
2. Vi/etc/hosts:: Comment off the beginning
#::1 localhost Localhost6 localhost6.localdomain6

3.vi/etc/modprobe.d/ipv6off.cnf
Alias net-pf-10 off
Options IPv6 disable=1 4. Reboot the system and confirm
Lsmod |grep-i IPv6
Ifconfig |grep-i Inet6v. swappiness inspection:
1, note: If is RHEL7 above version, if vm.swappiness = 0 There may be oom problem. Causes the MySQL process to be killed by the Oom-killer process. 2, configuration mode: vi/etc/sysctl.confvm.swappiness = 1sysctl-pVI. IO schedule changed to Dealine:1. Note:if it is an SSD or PCIE-SSD device, it is modified to NoOp. if the I/O scheduler is using CFQ instead of the deadline we require, you need to adjust。 2. Temporary modification: cd/sys/block/Disk Representation/queueecho "Deadline" >/sys/block/sda/queue/scheduler 3, Permanent modification: Vi/etc/grub.confkernel/vmlinuz-2.6.18-308.el5 RO root=label=/ elevator=deadine numa=off rhgb quiet4. View I/O Scheduler configuration: Cat/sys/block/sdb/queue/scheduler 5, note:View the supported scheduling algorithms, and the current:[Root@likun ~]# dmesg |grep-i Scheduleio Scheduler NoOp Registeredio Scheduler anticipatory Registeredio Scheduler Deadli NE registered (default) IO Scheduler CFQ registeredoptimized settings for the IO scheduling algorithm for MySQL database servers:1.CFQ is used in scenes with very homogeneous IO sizes 2. A more complex OLTP environment is best used with the deadline algorithm 3.IO performance is not a bottleneck when you can use the NOOP algorithm Www.2cto.com4.Anticipatory file servers that are suitable for large data sequential storage, such as FTP server and Web server, do not fit into the database environment and the DB server does not use this algorithm. 5. On the emerging SSD, such as SSD, Fusion io, the simplest noop is probably the best algorithm, because the other three algorithms are optimized based on shortening the seek time, and the SSD has no so-called seek time and the IO response time is very short.Vii. disabling NUMA (System optimization)NUMA is prohibited, otherwise SYS CPU consumption will be high, straightening causes severe swap disable modification/etc/grub.conf, kernel after adding Numa=off elevator=deadlinevi/etc/grub.confkernel/ Vmlinuz-2.6.18-308.el5 ro root=label=/elevator=deadineNuma=offRHGB quiet Eight, whether to close selinux:vi/etc/selinux/configselinux=disabled temporary method: Setenforce 09, the sshd closed usedns:vi/etc/ssh/sshd_ Config modified to usedns noservice sshd Restart 10, confirm installation Sysstat:rpm-qa | grep sysstat11, file handle open number and user maximum process number:Modify limit and MAX User processes open files (-N) 40960max user processes (-u) 7776vi/etc/security/limits.confRoot soft nofile 65535root hard nofile 65535 root soft nproc 7000root hard Nproc 7000 View user restrictions: Ulimit-a temporary modifications: ulimit-n 655 35ulimit-u 655,352, start service check: Chkconfig--list |grep 3:on display Result: Crond,sshd,network,sysstat 13, close Iptablesservice iptables Stop/etc/init.d/iptables Stopchkconfig iptables off

System Preparation before MySQL installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.