Server environment Build 1---nginx+tomact+mysql

Source: Internet
Author: User

First, set the server security and SSH Trust

    1. Change SSH default port, allow access to Ip/etc/hosts.allow deny two file control

[[email protected] ~]# cat /etc/hosts.deny ## hosts.deny     this file contains access rules which are used to#         deny connections to network services that either  use#        the tcp_wrappers library or that  have been#        started through a tcp_ wrappers-enabled xinetd.##        the rules in  this file can also be set up in#         /etc/hosts.allow with a  ' Deny '  option instead.##         See  ' man 5 hosts_options '  and  ' man 5 hosts_access ' #         for information on rule syntax.#         See  ' MAN TCPD '  for information on tcp_wrappersshd:ALL#[[email  protected] ~]# cat /etc/hosts.allow ## hosts.allow    this  file contains access rules which are used to#         allow or deny connections to network services that#         either use the tcp_wrappers library or  that have been#        started through a  tcp_wrappers-enabled xinetd.##        See  ' man 5  hosts_options '  and  ' man 5 hosts_access ' #         for information on rule syntax.#        see  ' MAN TCPD '   For information on tcp_wrapperssshd:111.111.219.111:allowsshd:111.124.171.16:allow

2. Set up SSH mutual trust, the two machines do each other, the final step is to confirm whether the success (not the password indicates success).

/usr/bin/ssh-keygen-d scp-p 8022/root/.ssh/id_dsa.pub 111.124.171.16:/root/.ssh/authorized_keys ssh-p 8022 [email PR Otected] Ifconfig

3. Modify the Yum source

Wget-o/etc/yum.repos.d/centos-base.repo Http://mirrors.163.com/.help/CentOS6-Base-163.repowget-O/etc/ Yum.repos.d/centos-base.repo Http://mirrors.aliyun.com/repo/Centos-6.repoyum Clean all yum makecache4. Initialize the hard drive df-h FDIs             K-L view hard disk condition FDISK/DEV/SDB format this hard drive n-p-wmkfs-t ext4/dev/sdb1 mkdir/wqdata vim/etc/fstab Add the next sentence/dev/sdb1/wqdata ext3 defaults 1 22, installation JDK+TOMCAT environment RPM-IVH jdk-7u79-linux-x64.rpm Three, install MySQL database four, import data test


This article is from the "MJ Notes and Summary" blog, please contact the author of the reprint!

Server environment Build 1---nginx+tomact+mysql

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.