Quick installation and deployment of LAMP and vsftpd environments under ali cloud server CentOS 6.3
- 2020-05-15 02:39:26
- OfStack
Ali cloud forum resources are very rich, check the installation of LAMP environment, a lot of basic things have been built-in, such as firewall configuration and port open, all do not need to do operations, so it is easy to install down:
1. Installation of MySQL
MySQL installation involves the following packages:
mysql: MySQL client and base library files.
mysql-libs: library files required for MySQL clients.
mysql-server: MySQL server side and related files.
Installation command:
yum intall mysql mysql-libs mysql-server
2. Installation of PHP
Preparatory work:
You also need to pre-install the EPEL software. It is not installed here and does not affect this section, but in future tutorials you may install some software that is not provided in the standard software source, so the installation command is given here.
Installation command:
wget http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
PHP installation involves software packages:
php.x86_64: server-side PHP program
php-cli.x86_64: PHP's command line tool
php-common.x86_64: PHP public file
php-fpm. x86_64: Fastcgi process management module of PHP. It is mainly used to configure Nginx, if it is configured as Apache, it can not install the word module
php-gd.x86_64: GD library for image processing
php-imap. x86_64: PHP IMAP module
php-ldap. x86_64: PHP LADP module
php-mbstring.x86_64: PHP multi-byte character processing module
php-snmp. x86_64: PHP SNMP protocol module
php-xml. x86_64: PHP XML module
php-zts.x86_64: thread safety module of PHP. This is for Apache, which works in Apache's Worker mode. This list is only for the purpose of discussing submodules. The specific effect is unknown, and installation will not be performed in the installation command. I hope you can send me a message to discuss the working effect of this module and Apache. However, since this module is provided in Centos, I believe its stability has been verified.
Installation command:
yum install php php-cli php-common php-fpm php-gd php-imap php-ldap php-mbstring php-snmp php-xml
3. Installation of Apache
The server I purchased is installed by default and does not need to be installed again
If you need to install it, the command is:
yum install httpd
4. Start the service
service mysqld start
service httpd start
Open your browser, enter IP and you should see the welcome page.
Install configuration vsftpd under aliyun server -- based on CentOS 6.3
1. Update the yum source
I updated yum update directly
2. Install vsftp
Install vsftpd using the yum command
#yum install vsftpd -y
3. Add ftp account and directory
First check the location of nologin under 1, usually under /usr/sbin/nologin or /sbin/nologin.
Create an account using the following command, which specifies /www/wwwroot as the home directory of user pwftp. You can define the account name and directory yourself:
#useradd -d /www/wwwroot -s /sbin/nologin pwftp
Change the account password:
#passwd pwftp
Changes permissions for the specified directory
#chown -R pwftp:pwftp /www/wwwroot
To report an error, do the following before executing this command:
mkdir www
cd www
mkdir wwwroot
4. Configure vsftp
Edit the vsftpd configuration file with the following command:
#vi /etc/vsftpd/vsftpd.conf
Change "anonymous_enable=YES" in the configuration file to "anonymous_enable=NO"
Uncomment the following configuration:
local_enable=YES
write_enable=YES
chroot_local_user=YES
To save the changes, press ESC and enter: wq
5. Modify the shell configuration
vi edit /etc/shells, if the file does not include /usr/sbin/nologin or /sbin/nologin (depending on the current system configuration), append it
6. Start vsftp service and test login
Start the vsftpd service with the command:
#service vsftpd start
Then use the account pwftp to test whether you can log in ftp. The directory is /www/wwwroot.
Here I log in directly with the client software FileZilla Client, which is completely correct after testing.