First, the installation partition scheme:
(1) Swap partition, twice times memory
(2)/boot partition
(3)/all remaining space
Language selection 中文版 (English)
Second, configure IP
IP address, subnet mask:
Edit/etc/sysconfig/network-script/ifcfg-eth0
Device=eth0
Bootproto=static-Static or dynamic
broadcast=192.168.1.255
Ipaddr=192.168.1.35-ip Address
netmask=255.255.255.0-Subnet Mask
network=192.168.1.0-Network ID
Onboot=yes
Gateway:
Edit/etc/sysconfig/network
Networking=yes
Hostname=vmlinux---host name
gateway=192.168.1.2---Gateway
Dns:
Edit/etc/resolv.conf
NameServer 61.147.37.1
NameServer 61.177.7.1
Note: The above IP address should be changed to the IP address corresponding to your network configuration. Note the case before the "".
MAC address changes under RedHat Linux
1. You must first turn off the network card device, otherwise it will report that the system is busy and cannot be changed.
/sbin/ifconfig eth0 Down
2. Modify the MAC address.
/sbin/ifconfig eth0 hw ether 00AABBCCDDEE
3. Re-enable the NIC
/sbin/ifconfig eth0 up
The MAC address of the NIC is changed to complete.
Another way is to modify the NIC configuration file Ifcfg-ethx, add a similar format to the MAC address: Hwaddr=00:aa:bb:cc:dd:ee.
VSFTPD Configuration of server configuration
Installation and startup
1. Use the following command to query whether it is installed:
#rpm-qa|grep vsftpd
Vsftpd-2.0.5-10.e15
If the above results are present, the installation is indicated. If it is not installed, you can find the installation package on the Red Hat Enterprise Linux5 installation CD using the command:
VSFTP-2.0.5-10.E15.I386.RPM in the second ISO file
#mount/dev/cdrom/mnt/cdrom
#rpm-IVH vsftp-2.0.5-10.e15.i386.rpm
2. Start and close
The start command is: #service vsftpd start
The Stop command is: #service vsftpd stop
The restart command is: #service vsftpd restart
Query run Status: #service vsftpd status
VSFTPD (PID 3571) is in progress ...
3. VSFTPD Server Configuration
There are three main configuration files for vsftpd:
/etc/vsftpd/vsftpd.conf
/etc/vsftpd.ftpusers
/etc/vsftpd.user_list
It is recommended to use the CP command to back up these three files before modification, which requires restarting the VSFTPD service for the settings to take effect.
(i) anonymous user access configuration
1. After booting the FTP server can log on
Anonymous user in the text mode, to use the user name FTP, password is also FTP, to log in, if the FTP tool to log on anonymously, the user name and password are: Anonymous. By default, anonymous users can access and download, but cannot upload, delete, create new directories, perform files, and other operations
Local users can log in, and can leave their own directory to access the other directory, and permission to upload and download, write in the file/etc/vsftpd.ftpusers Local users are forbidden to log in.
2. Allow anonymous users to upload files
Need to modify the/etc/vsftpd/vsftpd.conf file, the following two items before the # removed.
Anon_upload_enable=yes
Anon_mkdir_write_enable=yes
Restart the VSFTPD service.
3. Allow only anonymous users to access
Refers to the need to restrict local account access, modify the/etc/vsftpd/vsftpd.conf file, the following two before the # removed.
Local_enable=yes
Write_enable=yes
Restart the VSFTPD service.
4. Set Welcome information
Modify the/etc/vsftpd/vsftpd.conf file
ftpd_banner=*****
Is the welcome information for the setting.
Restart the VSFTPD service.
5. Set Maximum transfer rate
Modify the/etc/vsftpd/vsftpd.conf file
To set the maximum transfer rate for anonymous users to 20Kbps, you should add the following statement:
anon_max_rate=20000
To set a maximum transfer rate of 1Mbps for local accounts, add the following statement:
local_max_rate=1000000
6. Set the server maximum number of concurrent and user maximum threads
Modify the/etc/vsftpd/vsftpd.conf file
To set the maximum number of concurrent servers to 99, add the following statement:
max_clients=99
To set the maximum number of connections for the user at the same time period, add the following statement:
Max_per_ip=5
7. Disallow hosts for certain IP segments to access the server anonymously
Modify the vsftpd.conf file to confirm that you have the following statement:
Tcp_wrappers=yes
To modify the/etc/hosts.allow file, add 1 lines of command:
Vsftpd:192.168.1.1:deny
Represents a host that restricts IP to 192.168.1.1 access to an FTP server.
Restart the VSFTPD service.
8. Transmitting data using ASCII method
Modify the/etc/vsftpd/vsftpd.conf file,
Ascii_upload_enable=yes
Ascii_download_enable=yes
Restart the VSFTPD service.
9. Set data transfer interrupt interval time
Modify the/etc/vsftpd/vsftpd.conf file,
idle_session_timeout=600
Indicates that the idle session time is 600 seconds.
data_connection_timeout=120
Indicates that the data connection time-out is 120 seconds.
Restart the VSFTPD service.
(ii) Local user access configuration
1. Using the user list for access control
To modify the/etc/vsftpd/vsftpd.conf file, set it by the following statement:
Userlist_enable=no
Indicates that users in the Vsftpd.ftpuser file will be prevented from accessing the FTP server.
Userlist_enable=yes
Userlist_deny=no
Indicates that only users in the Vsftpd.user_list file are allowed access to the FTP server.
Userlist_enable=yes
Userlist_deny=yes
Indicates that the FTP server cannot be accessed by users in both Vsftpd.ftpuser and vsftpd.user_list files.
2. Restricting access to user directories
Modify the/etc/vsftpd/vsftpd.conf file
Chroot_local_user=yes
Indicates that a user cannot access a directory or file other than his or her directory after logging in.
3. Modify the default port
The FTP server default port is 21, if you need to modify the port, modify the/etc/vsftpd/vsftpd.conf file, the following statement:
listen_port=4444
Indicates that the FTP server has a port number of 4444 and should be as much as 4000.
VSFTPD Login 530 Login Incorrect error with root user
There's a directory in etc/pam.d/vsftpd pointing to Etc/vsftpd/fptusers.
Remove root in it.
In the root user upload permission, also closed the system firewall, but the FTP connection will still appear "Oops:cannot change Directory:/root" error, how to solve it?
Solve:
1. Check the status of SELinux:
Sestatus-b | grep FTP is exactly the view of the FTP state.
2, in the results of the appearance can be seen
Ftp_home_dir off
Tftpd_disable_trans off
such as Now we just have to set one of them on.
3, Setsebool-p Ftpd_disable_trans on or setsebool-p ftp_home_dir on
4. Restart Vsftpd:service vsftpd Restart
5, slowly enjoy the fun of FTP.
VSFTPD Login Error Issue: Oops:cannot change Directory:/root
You can use an FTP client on Windows to try to log on. A mistake is usually reported at this time.
Invalid User Rights error
Delete root in Ftpuser and root in User_list
It's best to turn off the Linux firewall: Chkconfig iptables off
Then log in again
Oops:cannot Change Directory:/root
Workaround:
1. Check the status of SELinux:
Sestatus-b | grep FTP
2, in the results of the appearance can be seen
Ftp_home_dir off
Tftpd_disable_trans off
such as Now we just have to set one of them on.
3, Setsebool-p Ftpd_disable_trans on or setsebool-p ftp_home_dir on
4. Restart Vsftpd:service vsftpd Restart
Boot default vsftp service starts automatically:
Open permanently or shut down the firewall
Chkconfig iptables on
Chkconfig iptables off
Method One: (Common, convenient)
[Email protected] etc]# chkconfig--list|grep vsftpd (view)
VSFTPD 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[[email protected] etc]# chkconfig vsftpd on (performing on setting)
Or: Method Two:
Modify the file/etc/rc.local, put the line/USR/LOCAL/SBIN/VSFTPD & Insert the file in order to enable the boot automatically.
530 Permission denied.
Today again Linux is installed under the virtual machine. Now I want to start the FTP server that comes with Linux: #service vsftpd start. If you want the Linux boot to be automatically started FTP server: #chkconfig vsftpd on
Run Putty, enter as root, there was an error 530 Permission denied, feel very strange, because ordinary users can enter.
The reason is that we/etc/vsftpd.ftpusers and/etc/vsftpd.user_list the root of the user. At this point we need to modify these two files.
(1)/etc/vsftpd.user_list default file (that is, the specific user)
# vsftpd UserList
# If Userlist_deny=no, only allow users in the this file
# If Userlist_deny=yes (default), never allow users in the this file, and
# do not even prompt for a password.
# Note that the default Vsftpd Pam Config also checks/etc/vsftpd.ftpusers
# for users, that is denied.
Root
Bin
Daemon
Adm
Lp
Sync
Shutdown
Halt
Mail
News
Uucp
operator
Games
Nobody
At this point we need to add # to root.
(2)/etc/vsftpd.ftpusers default file (all user attributes that can be logged in to the FTP)
# Users that is not a allowed to login via FTP
Root
Bin
Daemon
Adm
Lp
Sync
Shutdown
Halt
Mail
News
Uucp
operator
Games
Nobody
At this point we need to add # to root.
The following error occurred:
PORT command successful. Consider using PASV.
425 Failed to establish connection.
This error is caused by the window's firewall opening, which can be resolved by shutting down the firewall.
Iv. Uninstall and install MySQL under Linux
1. Find out if MySQL was previously installed
Command: Rpm-qa|grep-i MySQL
You can see two of the MySQL packages:
mysql-4.1.12-3.rhel4.1
mysqlclient10-3.23.58-4.rhel4.1
2. Delete MySQL
Delete command: RPM-E--nodeps package Name
(Rpm-ev mysql-4.1.12-3.rhel4.1)
3, delete the old version of MySQL development header files and libraries
Command: Rm-fr/usr/lib/mysql
Rm-fr/usr/include/mysql
Note: The data and/etc/my.cnf in/var/lib/mysql after uninstallation are not deleted, if determined, then manually deleted
Rm-f/etc/my.cnf
Rm-fr/var/lib/mysql
Install MySQL
Pre-installation: two RPM packages
mysql-client-5.1.20-0.glibc23.i386.rpm
mysql-server-5.1.20-0.glibc23.i386.rpm
1, install the service side:
Command: RPM-IVH mysql-server-5.1.20-0.glibc23.i386.rpm
2. Install the Client
Command: RPM-IVH mysql-client-5.1.20-0.glibc23.i386.rpm
3. Log in to MySQL
The command to log in to MySQL is mysql,mysql using the following syntax:
MySQL [-u username] [-h host] [-p[password]] [dbname]
Username and password are mysql user name and password, MySQL's initial management account is root, no password, note: This root user is not a Linux system user. MySQL Default user is root, because the initial no password, the first time to enter the only need to type MySQL
[[email protected] ~]# MySQL
1. Command
usr/bin/mysqladmin-u root Password "New-password"
Format: Mysqladmin-u username-P Old password password new password
2. Example
Example 1: Add a password to root 123456.
Type the following command:
[Email protected] local]#/usr/bin/mysqladmin-u root password 123456
Note: Because Root does not have a password at the beginning, the-p old password can be omitted.
There is a "mysql>" prompt, congratulations, installation success!
The login format after adding the password is as follows:
Mysql-u root-p
Enter Password: (enter password)
Massive video to get Linux video git video
Red Hat Linux Installation vsftpd