Cross-platform Linux virtual server configuration experience (1)

Source: Internet
Author: User

Why is such a combination?

I wrote an internship report for the purpose of blocking the teacher at school. The topic is provided by Linux practical services, that is, services such as http and ftp are provided on a Linux machine, at that time. so I chose such a messy question [the major problem is that the professional is not correct, but the trainee report is accepted by Mr. Wan Xing].

VBox + vboxnetflt + Arch + Lighttpd + Nginx + MySQL + PHP + SShD + Samba + Rsyncd

I did not think about this combination at the beginning, but now it is quite comfortable after being configured. it is mainly suitable for me and may also be suitable for others. previously, I used the local machine as a service to debug web pages and other services. However, I felt uncomfortable if I didn't use some services, but it was still a bit uncomfortable. later, I came up with the idea of using VBox. In the first place, I used the NAT mode. I used the addresses 10.0.2.2 and 10.0.2.15 and port ing to access the host virtual machine, this problem is that if the port is mapped, the port will be wasted, and then switched to the Bridge Mode, everything will be harmonious [do not know what to think about dial-up shoes]. in addition, the VM can pause sleep, which saves system resources, especially for a classic instance like me. you can directly use commands to control the status of virtual machines, which is very convenient.

VirtualBox virtual machine provides virtual hardware support and vboxnetflt provides the bridge service. ArchLinux is the most popular Linux platform. Lighttpd is also recommended by many people, so Nginx exists for high concurrency, mySQL provides most database services. SShD provides secure terminal services and sftp. Samba aims to improve the affinity for win and Rsyncd is the main service used for file synchronization. no ftp? Well. Yes, Samba and Rsyncd provide excellent file synchronization for each platform. ftp is of course a weakness.

1. the official source of ArchLinux installation of VirtualBox is the ose version. We recommend that you use the bin version in AUR. after installation, use the modprobe command to enable the vboxdrv and vboxnetflt modules. virtual Machine kernel module and Virtual Machine bridge module. it is best to add these two modules to rc. conf.

When configuring, you need to set the NIC to the bridging mode and select the NIC to be bridging.

You must also enable VRDP and set the Authentication Mode to NULL.

In this way, the configuration used in this article is basically completed.

2. Install ArchLinux directly by using a CD image to install it on a virtual machine. Then, configure the source [or use the default source] to install the software.

Run a command like this to start a VM.

VBoxHeadless-startvm "ArchStation"

Use commands like this to control virtual machines, namely pause, continue, restart, shut down, and sleep.

VBoxManage controlvm "ArchStation" pause

VBoxManage controlvm "ArchStation" resume

VBoxManage controlvm "ArchStation" reset

VBoxManage controlvm "ArchStation" poweroff

VBoxManage controlvm "ArchStation" savestate

3. By default, the configuration for installing openssh for SShD can work, but you still need to modify the sftp path to facilitate occasional problems.

Install openssh and edit the Configuration:

Pacman-S openssh

Vim/etc/ssh/sshd_config

Find this line and change the path

Subsystem sftp/home/data/sftp

Then, we can directly log on to the host using the terminal program without performing operations in rdesktop.

Ssh root@192.168.1.103

4. install PHP directly, and edit the configuration file when loading some modules to uncomment the module to be loaded.

Pacman-S php

Vim/etc/php. ini

Find the extension Settings section and unlock the necessary modules of mysql.

5. When LighttpD is installed and installed, You need to configure the php parsing program, that is, fastcgi. Then modify the lighttpd configuration so that the php program can be parsed through fastcgi.

Pacman-S php-cgi fcgi

Vim/etc/lighttpd. conf

Configure the webpage root directory

Server.doc ument-root = "/home/http /"


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.