Centos installation Configuration

Source: Internet
Author: User
Tags install perl

VirtualBox Install CentOS

Centos7 Restart prompt after installation Initial setup of the CentOS Linux 7 (CORE) workaround

Problem:

CentOS7 installation is complete, restart boot after the display:

Initial setup of CentOS Linux 7 (CORE)

1) [x] creat user 2) [!] License Information

(no user would be created) (License not accepted)

Your choice from above [' Q ' to quit | ' C ' to continue | ' R ' to refresh]:

Workaround:

Enter "1" and press enter

Enter "2" and press enter

Enter "q"and press enter

Enter "Yes" and press the enter key

CentOS set static IP address

Vi/etc/sysconfig/network-scripts/ifcfg-enp0s8

Bootproto=static #dhcp Change to static

IPADDR=172.31.44.100 # static IP

gateway=172.31.44.1 # Default gateway

netmask=255.255.255.0 # Subnet Mask

dns1=172.28.4.103 #DNS Configuration

CentOS 7 Modify host name

Hostname

Hostnamectl set-hostname "Registry"

Hostname

Shut down the firewall

/etc/init.d/iptables stop

Systemctl Stop Firewalld.service # stop firewall

Systemctl Disable Firewalld.service # disable firewall boot up

Systemctl Restart Network # Restart the Web service networks restart

Open port number

Vim/etc/sysconfig/iptables

CentOS Firewall Open port -- add a line after Port

-A input-m state--state new-m tcp-p TCP--dport 3306-j ACCEPT

Service Iptables Restart

Centos7 set to boot default command line mode

1, Command mode

Systemctl Set-default Multi-user.target

2, graphics mode

Systemctl Set-default Graphical.target

SSH [email protected]

How to open SSH service for CENTOS7 system

1, login Centos7 System.

Example: log in with the root user.

Note: If you log in as a non- root user, add sudo if you are not authorized to perform certain commands

2.Check if SSH is installed.

input command:RPM-QA | grep ssh

Note: If not installed SSH can be entered:yum install openssh-server installation.

3, start the SSH service.

input command:service sshd restart restart SSH service.

command: service sshd Start Services | command:servicesshd Stop Services

after reboot can input:NETSTAT-ANTP | grep sshd to see if the port is started (slightly).

4.How to set up SSH service to boot?

input command:chkconfig sshd on .

Note: SSH boot is not allowed if chkconfig sshd off .

5, remote access connection Centos7 System.

use under Windows:putty,securecrt can connect to SSH service remotely.

Direct Use command under Linux:ssh IP(e.g.ssh 192.168.1.11).

Configuration Java Environment Variables

Vim/etc/profile

Export java_home=/root/java/jdk1.7.0_79

Export path= $JAVA _home/bin: $PATH

Export maven_home=/root/java/apache-maven-3.3.9

Export path= $MAVEN _home/bin: $PATH

Source/etc/profile

Cron

http://blog.csdn.net/yq495/article/details/7399277

1.Yum Install Vixie-cron

2,vi backup.sh

#!/bin/sh

# file:/home/mysql/backup.sh

today= ' Date +%y%m%d '

Echo $today

Mysqldump-uroot-pyunluqwe-h 127.0.0.1 Yunlu >/home/mysql/backup/$today. sql

3,crontab-e

3 * * */home/mysql/backup/backup.sh

4,/sbin/service crond Restart

Complete Example of installing Memcached under Centos6.5

Http://www.tuicool.com/articles/qYJBVb

my own installation of Zentao Zen Road (both Windows and Linux have tried )

http://blog.csdn.net/lwx2615/article/details/6124125

install mysql

Http://www.cnblogs.com/hb_cattle/archive/2011/10/16/2213825.html

Uninstall old version

Yum Remove mysql-libs-5.1.71-1.el6.x86_64

Rpm-qa | grep MySQL

Yum-y Install Perl

Yum Install Libaio

RPM-IVH libaio-0.3.107-10.el6.x86_64.rpm

RPM-IVH mysql-server-5.5.39-2.rhel5.x86_64.rpm

RPM-IVH mysql-client-5.5.39-2.rhel5.x86_64.rpm

RPM-IVH mysql-devel-5.5.39-2.rhel5.x86_64.rpm

modifying the MySQL character set

Cp/usr/share/doc/mysql-server-5.1.61/my-medium.cnf/etc/my.cnf

Vi/etc/my.cnf

[Client]

Default-character-set=utf8

[Mysqld]

Character-set-server=utf8

Collation-server=utf8_general_ci

Init-connect = ' Set names UTF8 '

Flush privileges;

Centos mysql configuration master-Slave

Master

# The MySQL server

[Mysqld]

user = MySQL

Pid-file =/var/lib/mysql/mysqld.pid

Socket =/var/lib/mysql/mysqld.sock

Port = 3306

Basedir =/usr

DataDir =/var/lib/mysql

Tmpdir =/tmp

Log-bin = Master-bin

Log-bin-index = Master-bin.index

Server-id = 1

CREATE USER Repl_user;

GRANT REPLICATION SLAVE on * * to Repl_user identified by ' [email protected] #qwe ';

Slave

# The MySQL server

[Mysqld]

user = MySQL

Pid-file =/var/lib/mysql/mysqld.pid

Socket =/var/lib/mysql/mysqld.sock

Port = 3306

Basedir =/usr

DataDir =/var/lib/mysql

Tmpdir =/tmp

Server-id = 2

Relay-log-index = Slave-relay-bin.index

Relay-log = Slave-relay-bin

Log-bin=mysql-bin

?

Comment out the following

#server-id = 1

Change MASTER to Master_host = ' 60.194.51.21 ', Master_port = 3306, Master_user = ' Repl_user ', Master_password = ' [Email pr Otected] #qwe ';

START SLAVE;

Stop master-slave replication

Slave stop;

Reset slave;

Flush privileges;

http://blog.csdn.net/shaobingj126/article/details/8128287

Centos installation Configuration

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.