[Linux] PHP programmers play with the Linux series-building a code development environment, programmers linux

Source: Internet
Author: User
Tags centos server ftp access netbeans

[Linux] PHP programmers play with the Linux series-building a code development environment, programmers linux

1. PHP programmers turn to the Linux series-how to install and use CentOS

2. PHP programmers play with Linux series-lnmp Environment Construction

Some people may think that I have installed yum. I just need to configure it and have no technical skills. My goal is to allow everyone to achieve the goal in the simplest way, configuration can also be customized without configuration, not to show off compilation and installation. I think a software can use yum. Why do I have to compile and solve the dependency, the ultimate goal is to achieve the effect, rather than a bunch of compilation and configuration parameters.

In the windows system, how can I run the Code directly to Linux and run it through a browser or command line? It can be uploaded to the CentOS of the Virtual Machine in real time through the FTP server, you can see the effect directly. For example, in my company, I used netbeans to Configure FTP to connect to my development machine. When saving files, I uploaded them automatically, and then bound the domain name's host in windows to view the project through a browser. The company's development machines all have independent public ip addresses. The main code directory is the mounted remote machine, which has a very large hard disk and is mainly used as a code storage server, in this way, FTP is uploaded in real time, so it is very important to set up the FTP service.

 

Directly run the yum install vsftpd command to complete the installation. After the installation is complete, start the service vsftpd start. The ftp service is installed at this time. After the installation is complete, I use flashfxp to connect to the current ftp service. At this time, the connection is not successful. At this time, the steps for finding problems are very important.

 

Solve the problem that FTP cannot be connected

Enable vsftpd logs and edit/etc/vsftpd. conf

# Remove the previous one, which records the upload and download logs.
Xferlog_file =/var/log/xferlog
# Enable dual_log_enable = YES # This is to record the location of the log file vsftpd_log_file =/var/log/vsftpd. log

At this time, there is nothing in the access log, indicating that the FTP service has not been connected.

1. In windows cmd, use telenet 192.168.2.100 21 to check whether port 21 is accessible.

2. In CentOS, run the netstat-altupn | grep 21 command to check whether the port has been listened to. In this case, OK

3. Check whether port 21 is enabled in iptables rules. Check that port 21 is not allowed. Activate

-A input-m state -- state NEW-m tcp-p tcp -- dport 21-j ACCEPT

 

I continue to use the root account and password to connect to FTP. Error: 530 Permission denied

In this case, you need to configure vsftpd because it disables the root account connection and the configuration files/etc/vsftpd/user_list and ftpusers to be viewed. This is the disabled list and # comment out the root account

Edit/etc/selinux/config, modify SELINUX = disabled, and restart

 

The directory to which I want to restrict FTP access

The default directory after login is the home directory of the current user and can be directly accessed/root directory. Now I want to limit the directory after login, only allow it to access the code directory.

Set the connected Directory: local_root =/usr/local/web

Set the directory to which access to the outer layer is prohibited: chroot_local_user = YES

In this case, it is restricted to the Code directory.

 

 

Configure netbeans to save automatic upload to CentOS Server

A 227 error occurred while configuring netbeans. I temporarily shut down the firewall by using service iptables stop.

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.