1. the network card is installed with minimal settings. by default, the network card cannot access the internet. I use a router to access the Internet, set CentOS6.3 to static ip address vro gateway ip address to 192.168.1.1 subnet mask to 255.255.255.0CentOS6.3 static ip address 192.168.1.177DNS is also the ip address of the vro, 192.168.1.1 configure the following file vi/etc/sysconfi
1. Nic settings
Minimal installation, no internet access by default
I use a vro to access the Internet and set CentOS 6.3 as a static IP address.
The ip address of the router gateway is 192.168.1.1.
The subnet mask is 255.255.255.0.
The static IP address of CentOS 6.3 is 192.168.1.177.
DNS is also the ip address of the router, 192.168.1.1
Configure the following files
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = "eth0"
BOOTPROTO = "none"
HWADDR = "00: 21: 85: DF: C8: 2E"
NM_CONTROLLED = "yes"
ONBOOT = "yes"
NETMASK = "255.255.255.0"
IPADDR = "192.168.1.177"
GATEWAY = "192.168.1.1"
TYPE = "Ethernet"
PEERDNS = "yes"
USERCTL = "no"
UUID = "532ca90b-a106-48e3-8dc8-926eeb2f49ef"
Service network start
Enable Nic
If the IP address is automatically obtained, set BOOTPROTO "dhcp"
2. DNS settings
Vi/etc/resolv. conf
Nameserver 192.168.1.1
After the configuration is complete, the service network restart and restart the network service.
At this time, ping www.163.com to see if there is any response.
If no response is returned, we recommend that you change the BOOTPROTO in set 1 to "dhcp" and then ping. After you connect to the Internet, install the following setup and use setup to set the network. this is much easier.
3. if setup is not available for the new system, install setup
Yum provides */bin/setup
Yum-y install setuptool
Yum install ntsysv system-config-firewall-tui system-config-network-tui
4. Change source. By default, the source is too slow. We use 163 instead.
Su # Change administrator user
Cd/etc/yum. repos. d/# enter the source directory
Mv CentOS-Base.repo # default source renamed, so that the default don't use.
Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo # get Source 163
Yum update # update, complete!
5. install wget. this download command is very convenient and must be excellent.
Yum-y install wget
6. install vim. vi is provided by default. So
Yum-y install vim
7. disable SELinux
Vim/etc/selinux/config
The SELINUX = "" in the file is disabled, and then restart.
8. disable firewall
Use the setup command to close it. Very simple.
9. add a new user
Useradd canonpd
Passwd canonpd
Add a sudo user to CentOS
Su
Export do-f/etc/sudoers
Add after root ALL = (ALL) ALL
Canonpd ALL = (ALL) ALL
Change canonpd to your username.
Save it.
10. install vsftpd
Yum-y install vsftpd
Configure vsftpd
Vim/etc/vsftpd. conf
# Disabling anonymous users
Anonymous_enable = NO
# Related to real users
Local_enable = YES
Write_enable = YES
Local_umask = 022
Userlist_enable = YES
Userlist_deny = YES
Userlist_file =/etc/vsftpd/user_list
# Related to the server environment
Use_localtime = YES
Dirmessage_enable = YES
Xferlog_enable = YES
Connect_from_port_20 = YES
Xferlog_std_format = YES
Listen = YES
Pam_service_name = vsftpd
Tcp_wrappers = YES
Banner_file =/etc/vsftpd/welcome.txt
Finally, this file welcome.txt needs to be created by yourself. welcome to the text. If you do not create a file, delete the preceding row. you do not need to create the following file.
Vim/etc/vsftpd/welcome.txt
Welcome to Changle Weiyang's server
This server is for personal testing only
If you have any questions, contact me.
/Etc/init. d/vsftpd start
With vsftpd, it is convenient to upload shell scripts or software.
For the above configuration, see "bird brother's linux private food-server setup". by default, the above configuration cannot use the root user to log on to the ftp server. Use the account created in configuration 9 to log on.
11. Use ssh to connect to the installed CentOS 6.3 on the ubuntu terminal
After setting the ip address, disable the firewall and SELinux.
Use the setup command to set vsftpd and sshd services to auto-start upon startup.
Restart CentOS 6.3 so that vsftpd and sshd can be used directly after the instance is started.
You can use putty in windows, or use ubuntu terminal as follows.
Ssh root@192.168.1.177
Ssh-l root 192.168.1.177
You can select either of the preceding commands. Press enter and enter the password.