Simple setup of DEDE's linux test environment

Source: Internet
Author: User
Simple setup of DEDE's linux test environment-Linux Enterprise Application-Linux server application information. The following is a detailed description. I used linux for a period of time, mainly for setting up the ftp server of the Organization and displaying the webpage. After receiving the contact with FreeBSD, I felt that FreeBSD was simpler and had lower hardware requirements. I switched to FreeBSD and used dede to build a website.

Recently, due to the issue of thumbnails in Linux, I have discussed a lot in the forum. I have been experimenting with FreeBSD, but it is still different from linux. At the same time, there are many misunderstandings about linux and freebsd in the forum. I think it is difficult to install and debug them again. Based on my experience, these two systems do not have high requirements for devices. If they are used to build websites, they can meet your needs. In addition, many domestic space providers have begun to switch their operating systems to these two types of operating systems (such as Tiger wing ). I want to take the opportunity to learn about linux again. Because it is a simple setup, the setup is rough and simple, and the demanding requirements of security and other aspects are not fully taken into account. These will be discussed later.

I used a dell saiyang 133 desktop computer which was eliminated by the Unit, and added the memory to 256 M and 20 GB hard disk. The operating system selects the ubuntu 6.06 server version. The latest version is 7.0. The reason why 6.06 is used is because it is smaller, only 400 M, downloading to a ubuntu website takes less time.

Download the image file dial and start it on the machine to go to the installation option. One of the options is "install a LAMP server". Select this option for installation, apache2.0, mysql5.0, and php5.0 will be installed in the installation system, saving some manpower installation time.

After installation, the system first prompts the installation language, country, keyboard, type, and so on. This is very simple. After the setup, the Network Settings section is displayed, as long as the NIC is not too rare, the system can be identified (I am using an integrated network card of 3com and 8139 is no problem). In this case, I will automatically find the DHCP service and Press ESC to pass through, the system allows you to manually enter network parameters, such as IP addresses, subnet masks, gateways, and DNS. After setting, you can set the Host Name and proxy server as needed.

The next step is to consider the negative configuration-partitioning and attaching the hard disk. This is a big difference from windows, so it is difficult to understand. Because I use the replaced hard disk, I chose to clear the entire hard disk and automatically partition it, in this way, the system automatically divides the hard disk into ext3 file partitions and swap partitions and mounts them.

Ubuntu is not the same as other systems because it does not have a root user. You need to set up an administrator user during installation, and then execute sudo in the management to exercise administrator privileges. Enter the user name and password as prompted to install the system. Ubuntu and freebsd have the same high network dependency. Therefore, it takes some time to scan the image site for updates. It takes 30 minutes to install my machine.

After the installation is complete, we can find that, although called LAMP, ftp software is not installed and data cannot be uploaded. Do not rush to install ftp first, install openssh first, so that you do not have to sit next to the server and enter it on the keyboard.

Ubuntu software installation is also very convenient. You can put the installation CD into the optical drive and use sudo apt-get install openssh-server to install openssh, in this way, you can use putty and other remote login software to manage your "servers" on your machine.

After logging on to the server, run the sudo apt-get install vsftpd command to install the vsftp server. However, in the default installation, only anonymous users can log on. This does not apply to website creation. Find the vsftp configuration file and use sudo vi/etc/vsftpd. run the conf command to modify the server settings: Change anonymous_enable = YES to anonymous_enable = NO.

Local_enable = YES
Write_enable = YES
Local_umask = 022

Before the three options, click # Delete. Then sudo/etc/init. d/vsftpd restart or restart the machine after debugging.

After ftp is set, the next step is the key apache. The default apache user is www-data, and the default directory of the document is/var/www. To simplify the process, I first use sudo passwd www-data to change the password of the www-data user, it is easy to upload data. Of course, it is best to create a user and specify the corresponding directory to create a website.

The biggest dissatisfaction with linux may be the permission issue. To simplify it, I

Cd/var
Sudo chmod 755? R www (set the website root directory to 755 permissions)

Sudo chown-R www-data.www-data www)

In this way, you can avoid a lot of permissions. You can lower the permission when you start using it.

After the permission is set, modify the apache configuration file. ubuntu has configured most of the settings for us. We need not modify much. modify the configuration file sudo vi/etc/apache2/apache2.conf.

This mainly refers
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps

Delete the # above two sentences so that apache can be combined with php. Otherwise, the php file will be used as a text file for you to download.

At the same time, there are still some problems with the default character encoding. If the webpage does not specify the Chinese encoding, the webpage will contain garbled characters, considering that most users use Chinese webpages, add AddDefaultCharset GB2312 or modify the default adddefacharcharset to change the default code of the webpage to GB2312.

Mysql and php are completely installed. The only thing that needs to be modified is that the root user password of mysql is empty by default, you 'd better modify the password.

In this way, restart the machine and use the ftp software to upload dede5 to your directory with the www-data user. Enter the ubuntu IP address. The familiar dede installation interface is displayed. After successful installation, you can go to the management backend. It is only a matter of time and you have not published a content test thumbnail.

Ubuntu installation is not complex, the device requirements are not high, and all software is open-source and free. You can use the obsolete machine as a linux server for dede installation and debugging. In this way, you can solve some problems even if you are using a linux virtual host. If the device is running normally and your IP address is a public IP address, you can apply for another domain name and resolve the domain name to your IP address so that others can access your website.

As described in the signature, I am a cainiao. The above are just some of my learning experiences and records. I hope it will be helpful for you to use dede.

Published an article found that the gd library has not been installed, use sudo apt-get install php5-gd to install it.
Related Article

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.