Shared ip vm instances (VPS)

Source: Internet
Author: User
Tags vps

At present, there are a lot of domestic shared ip vps with good performance, but because there is no independent IP address, it will be troublesome to configure the environment.
Because I am using the vps of the shared IP, I will share some configuration methods for your reference.

First, the system selection. Based on experience, the Centos 5.6 (32-bit) system will be compatible with wdcp, And the 6.2 (64-bit) system has been used several times, the HTTP Process is suspended.
After installing the system, install WDCP. Follow the installation method in the Forum to install WDCP.
In the wdcp and one-click installation packages, both the software and wdcp are installed in the/www directory by default. The/www directory is also in the root directory, unless specified during system installation

Sometimes, the root partition space may not be enough, but the data is too big. How can this problem be solved if you want to switch to another partition or add a hard disk partition?

As follows:
Assume that the newly added hard disk is/dev/sdb.
The partition has been divided and formatted, for/dev/sdb1

First, create a temporary load point
Mkdir/mnt/data
Load the new partition as follows:
Mount/dev/sdb1/mnt/data

Stop all services first
Service mysqld stop
Service pureftpd stop
Service wdapache stop
Service httpd stop
Service nginxd stop

Mobile Data
Mv/www/*/mnt/data/

Detach a newly loaded Partition
Umount/dev/sdb1

And then reload it to the/www directory, as shown in figure
Mount/dev/sdb1/www

Start the service
Service mysqld start
Service pureftpd start
Service wdapache start
Service httpd start
Service nginxd start

At this point, it is complete.
However, you need to modify the/etc/fstab file. Otherwise, the data cannot be found and an error occurs.
Add a line in/etc/fstab, which is roughly as follows:
/Dev/sdb1/www ext3 defaults 0 0
Save and exit, so it's okay to restart again


The above assumes that the newly added disk partition is/dev/sdb1.
If this is not the case, modify and adjust the settings.
You can use fdisk-l to view details, or view and set partitions.

Then mount the data disk, not to mention, a lot of tutorials.
Then we started to talk about the difference between the VPS of the shared IP address and the independent IP address.
1. wdcp backend port settings, because the shared IP address is used by the service provider to specify several ports, it is impossible to provide port 8080 to everyone, we need to manually change port 8080 of WDCP to one of our available ports. to manually modify the background port, please refer:
1. Run the vi command to compile the file/www/wdlinux/wdapache/conf/httpd. conf.
Vi/www/wdlinux/wdapache/conf/httpd. conf
2. Search for the 8080 command as follows:
/8080
3. Find Listen 8080.
<VirtualHost *: 8080>
Change 8080 to your own port, such as 8090, and save
(The command cannot be modified. Check the vi command usage !)
4. Open the modified port. For example, if the modified port is 8090, enter the following command:
Iptables-I INPUT-p tcp -- dport 8090-j ACCEPT
5. Save. The command is as follows:
Service iptables save
6. restart service wdapache restart. If something goes wrong, restart the server with reboot.
 
2. Set the FTP port. Note that most VPS of the shared IP address will give you a separate FTP port. Use this FTP port to map to port 21 of your VPS, therefore, you generally need to use a "passive link" connection. At this time you need to modify/www/wdlinux/etc/pure-ftpd.conf, The PassivePortRange after the port number segment, modify for you can use the port number segment, note that the two port numbers correspond to one simultaneous connection, if you want two FTP clients to connect to the FTP server at the same time, you need to use four ports. Add these ports to the firewall whitelist.
After completing the preceding steps, your VPS can be used properly.
 
This document is taken from the wdlinux Forum. For more information, see!

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.