Embedded Development Server Architecture

Source: Internet
Author: User
Tags version control system
Document directory
  • Hardware configuration
  • Software Configuration
  • Operating System Installation
  • Application Software Installation
  • Development Kit Installation
  • Vsftp Configuration
  • NFS configuration
  • Tftpd Configuration
  • Wiki Server
  • BOOTP Server
  • Create Group
  • Create a member
  • Command Line explanation of the entire process

I. Requirements

As the number of embedded projects increases, the number of developers increases, which leads to many problems in the development process. For example, the differences in cross-compilation tools within the team lead to the exception or unavailability of the final software (this problem occurs in most cases due to the inconsistency of the operating system, the similarities and differences between cross-compilation environments are caused by different habits .), As well as the absence of detailed records of the place where the program was modified during the development process, all of these factors caused some losses to the company's resources and also caused a stumbling block to the smooth development of the project. Therefore, establishing a unified working environment and a good version control system is an urgent task.

[Edit]

Ii. server configuration [edit]

Hardware configuration
CPU: P4 2.86 (hyper-threading supported)
Memory: 1 GB ddr400
Motherboard North Bridge: 865pe
Hard drive: 120 GB
NIC: 8139d
Optical Drive: DVD
[Edit]

Software Configuration
System: Debian Sid
FTP: vsftp
SSH: SSH
Cross-compilation environment/debugging environment: scratchbox
NFS: nfs-kernel-Server
Web: Apache + PHP + MySQL + mediawiki1.7
[Edit]

Iii. Server Installation [edit]

Operating System Installation

Here we use the Debian Sid version, that is, the unstable version. One reason for installing this version is to ensure the degree of the new version of the software, but this also brings about some unstable factors, therefore, the stable version will be used after the server is improved in the future.

Here we use CD media for installation. Of course, you can also use the hard disk installation method. The general step is to put it on the CD, start it from the CD, enter linux26 to install kernel 2.6, and then install the basic system. However, please note that the server should not install the X environment, to avoid the emergence of a bug system. Now a stable version of Debian has been installed. Next we will upgrade this version to Sid version and edit/etc/APT/sources. list file, add the SID source. Below are some of my frequently used

deb ftp://ftp.linuxforum.net/debian/ sid main
deb http://mirrors.geekbone.org/debian/ sid main contrib non-free
deb http://scratchbox.org/debian ./
deb http://ftp.tw.debian.org/debian sid main contrib non-free
deb http://ftp.kr.debian.org/debian sid main contrib non-free

Then run the following command as root:

apt-get update
apt-get dist-upgrade

(At this time, you should be asked if you want to delete the current kernel, because we will install the new kernel later, others will ask you if you want to upgrade the current glibc and restart the service. Normally, there will be no problems .) If no kernel is found after the full upgrade, you can install one by yourself, but my latest version is 2.6.18.

apt-get install linux-image-2.6.18-4-686

(Currently the most stable version, you can search for the source to find the latest kernel version, which is not fixed here), after the installation is complete, our system is basically completed.

[Edit]

Application Software Installation

Our server has these features. After connecting to the server via SSH, our staff can port and write code related to software development, and compile and translate it through the scratchbox integrated environment, finally, git is used for version control and patch generation. FTP clients are used to log on to their home directories to upload and download the source code and some source code and work materials. Finally, the Web Service on the server provides a communication platform for every developer to write logs and organize relevant documents through wiki. In this way, developers do not have to unify the system and environment on their PCs, and further strengthen resource integration. Therefore, we need to install the following software:

apt-get install vsftpd
apt-get install ssh
apt-get install apache2
apt-get install mysql-server-5.0 mysql-client-5.0
apt-get install mediawiki1.7 php-pear php5-gd imagemagick mediawiki1.7-math memcached clamav
apt-get install tftpd
apt-get install git-core
apt-get install minicom ckermit
apt-get install scratchbox-core scratchbox-libs scratchbox-devkit-cputransp
scrat chbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-perl
scratchbox-toolchain-arm-gc c3.4-uclibc0.9.28 scratchbox-toolchain-arm-gcc4.1-uclibc20061004
scratchbox-toolchain-arm-linux- 2006q1-6 scratchbox-toolchain-arm-linux-2006q3-27
scratchbox-toolchain-arm-linux-cs344-2.3 scratc hbox-toolchain-arm-linux-ct401-2.3
scratchbox-toolchain-cs2005q3.2-glibc-arm scratchbox-toolchain -cs2005q3.2-glibc-i386
scratchbox-toolchain-host-gcc scratchbox-toolchain-i686-linux-ct4.1.0-2.3 .6tls

Of course, when installing scratchbox, you can choose to install several components without having to install them all.

[Edit]

Development Kit Installation
Apt-Get install libncurses5-dev # C graphics library, used in make menuconfig
Apt-Get install gcc-4.1 gcc-4.1-doc gcc-4.1-locales libc6-dev-amd64
Lib64gcclib64ssp0 # GCC development kit
[Edit]

Iv. server configuration [edit]

Vsftp Configuration

Edit/etc/vsftpd. conf and enter the following content:

Listen = Yes
Local_enable = yes # allow local users to log on
Write_enable = Yes
Local_umask = 022
Dirmessage_enable = Yes
Xferlog_enable = Yes
Connect_from_port_20 = Yes
Xferlog_file =/var/log/vsftpd. Log
Idle_session_timeout = 600
Data _ connection_timeout = 120
Ftpd_banner = welcome to thiz FTP service.
Chroot_list_enable = Yes
Chroot_list_file =/etc/vsftpd. chroot_list
Pam_service_name = vsftpd
Max_clients = 1000
Max_per_ip = 200
Pasv_max_port = 0
Pasv_min_port = 0

Finally,/etc/vsftpd is generated. chroot_list empty file. If necessary, you can add a developer in the file that can only be connected via FTP in their home directory, however, as a result, our soft links (such as TFTP and Sb-Home) cannot be normally accessed through TFTP.

[Edit]

NFS configuration

Edit/etc/exports

/Srv/nfs * (RW, no_root_squash, no_all_squash, sync, subtree_check)
/Home/developer Development Team/developer/nfs * (RW, no_root_squash, no_all_squash, sync, subtree_check)

And so on.

[Edit]

Tftpd Configuration

Edit/etc/inetd. conf and confirm that the following line exists.

tftp            dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /srv/tftp
[Edit]

Wiki Server

There is no configuration file to be modified, but some security settings may be needed. For example, it is best to create a new user in MySQL to manage the Wiki, in addition, his permissions only have all permissions in the Wiki database. The rest is not complicated, just follow the prompts. Some settings related to apache2 are/etc/apache2/CONF. d/mediawiki1.7.conf. There is nothing to modify here, and some personalized settings will follow you.

  • Some minor questions refer to Anthony wiki Installation notes
There is still a problem with the font! Spaces between equal-width English fonts are not equal-width! Detective: My notredame wiki is:
<HTML xmlns = "http://www.w3.org/1999/xhtml" XML: lang = "en" lang = "en" dir = "LTR">
Thizwiki is:
<HTML xmlns = "http://www.w3.org/1999/xhtml" XML: lang = "ZH-CN" lang = "ZH-CN" dir = "LTR">
Solution: Modify $ wglanguagecode = "en" in localsettings. php!
However, for a long time, it is still necessary to study the text support problems of Debian GNU/Linux.
  • Location of the Wiki logo

Mediawiki1.7 is available in

/Usr/share/mediawiki1.7/skins/common/images/wiki.png
The file is in PNG format with a transparent background of 135x135.
[Edit]

BOOTP Server

Edit/etc/bootptab as follows:

H9200m :/
: HA = "00: 11: 43: 43: 93: 5f":/# the MAC address of the machine can be obtained through DHCP.
: IP = 192.168.0.139:/# assigned IP Address
: Sm = 255.255.255.0:/# assigned Subnet Mask
: GW = 192.168.0.254:/# allocated gateway address
: DN = 192.168.0.254:/# The allocated domain name resolution address search
: DS = 192.168.0.254:/# assigned domain name resolution server address nameserver
: SA = 192.168.0.187:/# IP address of the boot server
: BF =/srv/TFTP/uimage:/# The Startup File is the kernel location.
: Rp =/home/embedded1/kamingli/nfs: # root file system directory
[Edit]

V. Server Management [editing]

Create Group
groupadd -g $1 $2
mkdir /home/$2
mkdir /srv/tftp/$2
chown root:$2 /home/$2
chmod 770 /home/$2
chown root:$2 /srv/tftp/$2
chmod 770 /srv/tftp/$2

$1 group ID, $2 group name

[Edit]

Create a member
useradd -G $1,20 -d /home/$2/$3 -p "/$1/$/EvVu1/$fOpTCICWLbqgjoCyV9fta/" -s
/bin/bash -m -c "$2's user" $3
mkdir /home/$2/$3/nfs
chown $3:$2 /home/$2/$3/nfs
echo “/home/$2/$3/nfs *(rw,no_root_squash,no_all_squash,sync,subtree_check)”>> /etc/exports
mkdir /srv/tftp/$2/$3
chown $3:$2 /srv/tftp/$2/$3
ln -s /srv/tftp/$2/$3 /home/$2/$3/tftp
sb-adduser $3
ln -s /scratchbox/users/$3/home/$3 /home/$2/$3/sb-home

$1 group ID, $2 group name, $3 member name

[Edit]

Command Line explanation of the entire process
groupadd -g 1001 embedded1

Our settings start from 1001 and are embedded in a group named embedded1 and the group ID is 1001.

mkdir /home/embedded1

Creates an embedded group of home directories for management group members.

mkdir /srv/tftp/embedded1

Creates a set of embedded TFTP home directories for managing member TFTP files

useradd -G 1001,20 -d /home/embedded1/temp -p "/$1/$/EvVu1/$fOpTCICWLbqgjoCyV9fta/" -s 
/bin/bash -m -c "embedded1's user" temp

Here we set to add the temp to the embedded group. The default password is 123456 (the password is worth noting here, And the MD5 verification code is different each time, however, the text entered in the passwd configuration file is worth special attention, so do you see that our MD5 has been modified with the original identifier ); the home directory is in the home directory of the embedded group and bash is used.

mkdir /home/embedded1/temp/nfs

Create an NFS main directory in the home directory for debugging your own kernel and file system.

chown temp:embedded1 /home/embedded1/temp/nfs

Change the attributes of a folder

echo “/home/embedded1/temp/nfs *(rw,no_root_squash,no_all_squash,sync,subtree_check)”>> /etc/exports

Add the directory to the NFS configuration file

mkdir /srv/tftp/embedded1/temp

Create a developer's TFTP directory

chown temp:embedded1 /srv/tftp/embedded1/temp

Change the attributes of a folder

ln -s /srv/tftp/embedded1/temp /home/embedded1/temp/tftp

Create a soft link to everyone's home directory

sb-adduser temp

Add temp to the scratchbox user

ln -s /scratchbox/users/temp/home/temp /home/embedded1/temp/sb-home

Connect the home directory under scratchbox to its home directory, so that FTP can upload files. The Home Directory of each developer is separated by group, by default, each developer's home directory contains the NFS and TFTP directories, and other information is managed by the individual. So far, the rest is the programmer's own settings, such as the configuration of minicom, and so on.]

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.