Build a development environment on LINUX: apache + ftp + cvs + gnats + samba

Source: Internet
Author: User
Tags bug tracking system ssh ftp
Article title: building a development environment in LINUX: apache + ftp + cvs + gnats + samba. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: chelong chedong@bigfoot.com
Last Updated: 23:35:56
  
Copyright statement: you can reprint it at will. when you reprint it, be sure to indicate the original source and author information.
  
Keywords: linux develop environment cvs version contral gnats bug tracking samba dhcpd wget
  
Summary:
Built based on open-source software development environments, including: WEB service (APACHE), IP management (DHCP), FTP service (FTP), version control (CVS), file sharing (SAMBA ), database Server (MYSQL), backup mechanism (wget + rsync), each service provides a simple basic configuration demonstration.
  
The server plan is as follows:
  
Master server (Main) Backup server (Backup)
_________________________________
| Apache web server | File Backup |
| Samba file share |
| Dhcp server | DHCP Backup |
| Cvs server | MySQL server |
| Gnats server |
| Phorum server |
| Database backup |
---------------------------------
Hardware preparation: at least two servers are required
  
Theoretically, the crash of any system is only a matter of time, and no one can ensure that developers do not make mistakes.
Only backup, backup, backup ......
Operating system preparation
  
FreeBSD or GNU/Liunx. during system installation, the configuration in this article mainly runs on RedHat 8 as an example. Note: During installation, select the "development tools" category. many of the following tools require GCC for compilation, and some application scripts use PERL for running. The two master servers use the IP addresses 192.168.0.200 and 192.168.0.201 respectively.
  
Services installed on both machines: ssh ftp dhcp service
  
SSH: the basic login service, which is usually used by default for some internal development. However, we recommend that you set the following parameters in/etc/ssh/sshd_config:
Change PermitRootLogin yes to PermitRootLogin no
  
FTP: if FREEBSD is recommended to replace: http://www.proftpd.org with PROFTPD/
  
Installation: tar zxf proftpd-version.tar.gz; cd proftpd-version/;./configure; make install
  
Default configuration:/usr/local/etc/proftpd. conf
  
ServerName "ProFTPD"
ServerType standalone
DefaultServer on
AllowOverwrite on
Port 21
Umask 022
# Domain name of the login machine without reverse resolution
UseReverseDNS off
MaxInstances 30
User nobody
Group nogroup
DHCP service: to facilitate the management of developers' IP addresses and server IP addresses in the same LAN, it is best to arrange servers in a certain range of static IP addresses (such as 192.168.0.200 or above ), provide dynamic IP addresses for the client within the range of (192.168.0.10-200. Assume that the primary server (192.168.0.200) and the secondary development server (192.168.0.201) use a static IP address and provide the dynamic IP address allocation service 192.168.0.10-200 for the network segment. The DHCP service is installed on both servers. one master DHCP service is used to provide 70% IP addresses for the subnet IP address pool. The other is used for backup and has 30% of the IP address pool. In the example, 200 is responsible for 10-100,201 and 110-150. If the default dhcpd is not installed, find the DHCP package installation from the installation disk or download the source file compilation from the http://www.isc.org (the installation location and configuration file may be different ).
  
Default configuration: on the master server
  
Ddns-update-style none;
#2 days for each IP address by default
Default-lease-time 120000;
Max-lease-time 920000;
Option subnet-mask limit 255.0;
Option broadcast-address 192.168.0.255;
Option routers 192.168.0.1;
Option domain-name-servers 202.106.196.115, 202.96.199.20;
Option domain-name "example.com ";
  
Subnet 192.168.0.0 netmask 255.255.255.0 {
Range 192.168.0.10 192.168.0.100;
}
The only difference on the secondary server is:
  
  
Subnet 192.168.0.0 netmask 255.255.255.0 {
Range 192.168.0.110 192.168.0.150;
}
Application installation on the master server:
  
WEB service: APACHE
  
It is mainly used for file WEB sharing and front-end browsing of some applications (cvsweb gnatsweb phpmyadmin and so on). Apache still uses 1.3 because many applications, such as PHP running on 2.0, are not complete.
  
Installation: http://httpd.apache.org download the latest version:
  
Compilation option: in this way, all modules can be dynamically loaded through the configuration file to facilitate addition and deletion of other application modules:
./Configure -- prefix =/home/apache -- enable-shared = max -- enable-module = most
For more installation instructions, refer to APACHE installation notes.
  
Tips:
In In the module setting, the file name is truncated for more than 40 characters, so that the automatic directory index displays the complete file name:
  
# Add the NameWidth option and set the file name length to * (automatically adapts to the longest file name in the current directory)
IndexOptions FancyIndexing + NameWidth = *
For CGI development, how can users publish CGI programs in their own directories, such as http: // 192.168.0.200 /~ Chedong/cgi-bin/my_cgi:
   In module settings, add
  
ScriptAliasMatch ~ ([A-z] +)/cgi-bin/(. *)/home/$1/cgi-bin/$2
Version Control: CVS
  
By default, CVS is installed on almost all servers. you only need to perform the following initialization steps:
  
In/etc/profile:
Master server settings:
Export CVSROOT =/home/cvsroot
Settings in the secondary server:
Export CVSROOT =: ext: $ USER@192.168.0.200:/home/cvsroot
Export CVS_RSH = ssh
  
Then initialize cvs init on the master server:
  
For CVSWEB settings, repeat the CVSWEB section in the following CVS frequently used Command manual:
  
Download CVSWEB:
Http://www.spaghetti-code.de/software/linux/cvsweb/
  
Download and unpack:
Tar zxf cvsweb. tgz
Put the configuration file cvsweb. conf in a safe place (for example, in the same directory as apache configuration ),
Modify: cvsweb. cgi allows CGI to find the configuration file:
$ Config = $ ENV {'cvsweb _ config'} | '/path/to/apache/conf/CVSWEB. Conf ';
  
Go to/path/to/apache/conf and modify cvsweb. conf:
  
Modify the CVSROOT path settings:
% CVSROOT = (
'Development' => '/path/to/cvsroot', # <= modify the local cvsroot
);
By default, deleted documents are not displayed:
"Hideattic" => "1", # <= The deleted document is not displayed by default.
You can also customize the description of the page header in the configuration file cvsweb. conf. you can modify $ long_intro to the text you need.
First, you can import CVS to the database to install the above system.
  
GNATS: GNU bug tracking system installation
  
Installation steps
Configure and compile software
./Configure-with-full-gnats-with-gnats-root =/home/gnats
Make all
# Make install
Add in CRONTAB
0, 10, 20, 30, 40, 50 */usr/local/libexec/gnats/queue-pr-run
  
D. configure the mail alias/etc/aliases
Gnats-admin: address
Bug-q: "| exec-prefix/libexec/gnats/queue-pr-q"
Bug-log:/home/gnats-adm/bugs. log
Bugs: bug-q, bug-log
E. install daemon
/Etc/services support 1528/tcp # gnats
/Etc/inetd. conf support stream tcp nowait gnats/usr/loca/libexec/gnats/gnatsd
Start as XINETD:
/Etc/xinetd. d/gnatsd
Service gnatsd
{
Disable = no
Socket_type = stream
Protocol = tcp
Wait = no
User = gnats
Passenv =
Server =/usr/local/libexec/gnats/gnatsd
Server_args = gnatsd
}
Configure database
/Etc/gnats-db.conf/home/gnats: cs_db
Configure SENDMAIL
/Etc/smrsh ln/usr/local/libexec/gnats/queue-pr
System modification
Files under/home/gnats-adm:
Categories file category
Responsible
Address File
State file
  
Gnatsweb installation: gnatsweb is the WEB interface of GNATS.
Follow the instructions in INSTALL:
Download CGI. pm of 2. X series from CPAN and install
Http://www.cpan.org/modules/by-authors/Lincoln_D_Stein/
Download MIME from CPAN: BASE64 and install
Http://www.cpan.org/modules/by-module/MIME/
  
Modify gnatsweb. pl to point to the specified service port (assuming that the gnats server has been set to be accessible) and add the status color PATCH.
Diff gnatsweb. pl/home/apache/cgi-bin/gnatsweb-2.9.3/gnatsweb. pl
21c21
<$ Site_gnats_host = 'localhost ';
---
> $ Site_gnats_host = '2017. 16.11.234 ';
1934,193 7c1934, 1937
<Print"$ Id ";
<Print "<
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.