尊龙凯时人生就是搏

CentOS 7Ï´webЧÀÍÆ÷µÄ´ÅÅÌIOÐÔÄÜÓÅ»¯ÒªÁì

centos 7Ï´webЧÀÍÆ÷µÄ´ÅÅÌioÐÔÄÜÓÅ»¯ÒªÁì

ÕªÒª£º±¾ÎĽ«ÏÈÈÝÔÚCentOS 7²Ù×÷ϵͳÏ £¬ÔõÑù´î½¨ºÍÓÅ»¯webЧÀÍÆ÷µÄ´ÅÅÌIOÐÔÄÜ¡£Í¨¹ýºÏÀíÉèÖòÙ×÷ϵͳºÍÓ²¼þ²ÎÊý £¬²¢Ê¹ÓÃһЩÊÖÒÕÊֶΠ£¬¿ÉÒÔ´ó·ùÌáÉýЧÀÍÆ÷µÄ´ÅÅÌIOÐÔÄÜ £¬´Ó¶øÌá¸ßÍøÕ¾µÄÏìÓ¦ËÙÂʺÍÍÌÍÂÁ¿¡£

ÓÅ»¯Îļþϵͳ

Ê×ÏÈ £¬ÎÒÃÇÐèÒªÓÅ»¯Ð§ÀÍÆ÷µÄÎļþϵͳ¡£ÔÚCentOS 7ÖÐ £¬Ð§ÀÍÆ÷µÄĬÈÏÎļþϵͳÊÇEXT4 £¬µ«Ëü²¢²»ÊÇ×îÊʺÏЧÀÍÆ÷Ó¦ÓõÄÎļþϵͳ¡£ÎÒÃÇ¿ÉÒÔ˼Á¿Ê¹ÓÃXFSÎļþϵͳ £¬ËüÔÚ´¦Àí´óÎļþºÍ´ó×ÚСÎļþµÄÄÜÁ¦ÉÏÔ½·¢¾«²Ê¡£

ÔÚ×°ÖÃCentOS 7ʱ £¬ÎÒÃÇ¿ÉÒÔÑ¡ÔñÊÖ¶¯·ÖÇø £¬²¢Ñ¡ÔñXFSÎļþϵͳ×÷Ϊ¸ù·ÖÇøµÄÎļþϵͳ¡£ÈôÊÇÒѾ­×°ÖÃÁËCentOS 7 £¬¿ÉÒÔͨ¹ýÖØÐÂÃûÌû¯¸ù·ÖÇø²¢½«Æä¸ÄΪXFSÎļþϵͳ¡£

×°ÖÃXFSÏÂÁîÈçÏ£º

yum install xfsprogs

½«¸ù·ÖÇø¸ÄΪXFSÎļþϵͳµÄÏÂÁîÈçÏ£º

mkfs.xfs /dev/sda1

ÉèÖôÅÅ̵÷ÀíÆ÷

´ÅÅ̵÷ÀíÆ÷¾öÒéÁË´ÅÅÌIOÇëÇóµÄÖ´ÐÐ˳Ðò £¬²î±ðµÄ´ÅÅ̵÷ÀíÆ÷¹ØÓÚ²î±ðµÄÓ¦Óó¡¾°ºÍÓ²¼þÉèÖÃÓвî±ðµÄÐÔÄÜÓ°Ïì¡£ÔÚCentOS 7ÖÐ £¬ÎÒÃÇ¿ÉÒÔÑ¡Ôñ¸Ä±ä´ÅÅ̵÷ÀíÆ÷À´ÌáÉýЧÀÍÆ÷µÄ´ÅÅÌIOÐÔÄÜ¡£

³£¼ûµÄ´ÅÅ̵÷ÀíÆ÷ÓÐCFQ¡¢DeadlineºÍNOOP¡£ÔÚЧÀÍÆ÷Ó¦ÓÃÖÐ £¬Deadlineµ÷ÀíÆ÷ÍùÍù¾ßÓнϺõÄÐÔÄÜÌåÏÖ¡£ÎÒÃÇ¿ÉÒÔͨ¹ýÐÞ¸ÄÒÔÏÂÎļþÀ´¸Ä±ä´ÅÅ̵÷ÀíÆ÷£º

vi /etc/udev/rules.d/60-schedulers.rules

Ìí¼ÓÒÔÏÂÄÚÈÝ£º

set cfq scheduler for sda

ACTION==”add|change”, KERNEL==”sda”, ATTR{queue/scheduler}=”deadline”

È»ºó £¬ÖØÆôЧÀÍÆ÷ÒÔʹÐÞ¸ÄÉúЧ¡£

ÉèÖÃRAID

RAIDÊÖÒÕ¿ÉÒÔͨ¹ý½«¶à¸ö´ÅÅÌ×éºÏ³ÉÒ»¸öÂß¼­Çý¶¯Æ÷ £¬ÌáÉý´ÅÅÌIOµÄ¶ÁдÐÔÄܺÍÈÝ´íÄÜÁ¦¡£ÔÚCentOS 7ÖÐ £¬ÎÒÃÇ¿ÉÒÔÉèÖÃÈí¼þRAIDÀ´µÖ´ïÕâ¸öÄ¿µÄ¡£

Ê×ÏÈ £¬ÎÒÃÇÐèҪװÖÃmdadm¹¤¾ß£º

yum install mdadm

È»ºó £¬Ê¹ÓÃÒÔÏÂÏÂÁÉèRAID 0»òRAID 10£º

mdadm –create /dev/md0 –level=0 –raid-devices=2 /dev/sdb1 /dev/sdc1

½¨ÉèÍê³Éºó £¬ÎÒÃÇÐèÒªÃûÌû¯²¢¹ÒÔØRAID×°±¸£º

mkfs.ext4 /dev/md0

mount /dev/md0 /mnt/raid

ΪÁËÔÚϵͳÆô¶¯Ê±×Ô¶¯¹ÒÔØRAID×°±¸ £¬ÎÒÃÇÐèÒªÐÞ¸ÄÒÔÏÂÎļþ£º

vi /etc/fstab

Ìí¼ÓÒÔÏÂÄÚÈÝ£º

/dev/md0 /mnt/raid ext4 defaults 0 0

ʹÓÃSSD

¹Ì̬ӲÅÌ£¨SSD£©Ïà±È¹Å°å»úеӲÅ̾ßÓиü¿ìµÄ¶ÁдËÙÂÊ¡£Òò´Ë £¬ÔڴwebЧÀÍÆ÷ʱ £¬ÈôÊÇÔ¤ËãÔÊÐí £¬ÎÒÃÇ¿ÉÒÔ˼Á¿Ê¹ÓÃSSDÀ´ÌáÉý´ÅÅÌIOÐÔÄÜ¡£

¿ÉÒÔ½«²Ù×÷ϵͳºÍÒªº¦Ó¦ÓóÌÐò×°ÖÃÔÚSSDÉÏ £¬¶ø½«Êý¾Ý´æ´¢ÔڹŰå»úеӲÅÌÉÏ¡£ÕâÑù¿ÉÒÔÔÚ°ü¹Ü¶ÁÈ¡ËÙÂʵÄÇéÐÎÏ £¬½µµÍ±¾Ç®¡£

ʹÓûº´æÊÖÒÕ

»º´æÊÖÒÕ¿ÉÒÔ½«´ÅÅÌIOµÄ¶Áд²Ù×÷ת»¯ÎªÄÚ´æ²Ù×÷ £¬¼«´óµØÌá¸ßÁËÏìÓ¦ËÙÂÊ¡£ÔÚCentOS 7ÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃRedis»òMemcachedµÈ¹¤¾ßÀ´ÊµÏÖ»º´æ¡£

ÒÔRedisΪÀý £¬Ê×ÏÈÎÒÃÇÐèҪװÖÃRedisЧÀÍÆ÷£º

yum install redis

È»ºó £¬ÎÒÃÇÐèÒªÐÞ¸ÄÒÔÏÂÎļþÒÔ¿ªÆôRedisµÄ»º´æ¹¦Ð§£º

vi /etc/redis.conf

ÕÒµ½ÒÔÏÂÐв¢Ð޸ģº

maxmemory

maxmemory-policy noeviction

½«Æä¸ÄΪ£º

maxmemory 1GB

maxmemory-policy volatile-lru

ÖØÐÂÆô¶¯RedisÒÔʹÐÞ¸ÄÉúЧ¡£

½áÂÛ£º

ͨ¹ýºÏÀíÉèÖÃÎļþϵͳ¡¢´ÅÅ̵÷ÀíÆ÷¡¢RAID¡¢Ê¹ÓÃSSD»ººÍ´æÊÖÒÕ £¬ÎÒÃÇ¿ÉÒÔÔÚCentOS 7ÏÂÓÐÓõØÌáÉýwebЧÀÍÆ÷µÄ´ÅÅÌIOÐÔÄÜ¡£Í¨¹ýÓÅ»¯´ÅÅÌIOÐÔÄÜ £¬ÎÒÃÇ¿ÉÒÔÌá¸ßЧÀÍÆ÷µÄÏìÓ¦ËÙÂʺÍÍÌÍÂÁ¿ £¬´Ó¶øÌáÉýÓû§ÌåÑé¡£

ÒÔÉϾÍÊÇCentOS 7Ï´webЧÀÍÆ÷µÄ´ÅÅÌIOÐÔÄÜÓÅ»¯ÒªÁìµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ