Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps of building Linux development server

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "Linux development server building steps", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "Linux development server building steps" bar!

After dealing with the linux server for so many years, to sum up, the most basic services that a Linux server needs to provide are as follows:

1 SSH, for remote access, the foundation of the foundation.

2 Apache + PHP, do some of the most basic web response, from a development point of view, there is indeed a trend of everything on web.

3 mysql: a basic relational database, which can meet the general database needs.

4 phpmyadmin: an web-based interface for managing mysql, which is an implementation of everything on web.

5 svn: version base management, which is a necessary collaboration tool for basic software development.

6 svn over http: svn provides a lot of flexibility after it is accessible on web.

7 zentaopms: Zen management system, is a relatively perfect project management, bug management, product management interface.

8 VNC: this * has a low priority requirement. It has been described in previous articles, but it is no longer covered in this article.

It looks complicated, but it's not much. Now take ubuntu16.04 as an example to illustrate:

1 system installation, standard USB disk installation can be done.

2 install ssh and vim in the display terminal, then you can put the server away, connect remotely, and no longer use the monitor.

The reason for reinstalling vim is that there is a problem with the built-in vim. After reinstallation, those keyboard commands (PgUp PgDn Del, etc.) will not be misparsed.

Sudo apt-get install ssh sudo apt-get install vim

3 then start installing apache2 and php. When I write this article, the default installation version of php is 7.0. if you need an earlier version, such as 5.6, you will need some special sources.

Sudo apt-get install apache2 sudo apt-get install php libapache2-mod-php sudo service apache2 start

After visiting SERVER_NAME in this way, the following page appears.

At this point, because php is also installed. You can put a phpinfo file under the root directory of the website (default / var/www/html) to query the php:

The version of php that works, the location of php.ini, and so on, is indicated here.

4 install mysql, the process of installation will ask you to enter the password of the database root user, remember to distinguish this password from the password and identity of the system administrator root. Mysql listens on port 3306 by default.

Sudo apt-get install mysql-server sudo service mysql start

5 install phpmyadmin, which is a mysql network management interface, on the one hand, if you do not have this, then you need to execute this command on the database command line, query, etc. With phpmyadmin, I use the UI of the web+ browser to manage the database. On the one hand, there is no pressure of GUI, and it is not as difficult to use as CUI. I had an earlier article comparing the advantages and disadvantages of these three situations.

Sudo apt-get install phpmyadmin

During this period, you will be asked to configure the password for phpmyadmin's own account, which should also be distinguished from mysql's root password.

Once the configuration is complete, you can directly use SERVER_NAME/phpmyadmin to manage the database.

6 next, begin to deploy the Zen system. There are many installation methods for Zen Tao, in fact, because we have already set up apache php mysql, the most stable and transparent installation method is source code installation. Download ZenTaoPMS.11.1.stable.zip directly to the official website and send it to the server with WinSCP.

It is also important to note that zentaopms requires the curl module of php, so install it first.

Sudo apt-get install php7.0-curl

Then put the zip copy to the root of the site, extract it, and get the code ready.

Cp ZenTaoPMS.11.1.stable.zip / var/www/html/ unzip ZenTaoPMS.11.1.stable.zip

Then go directly to SERVER_NAME/zentaopms/w and start the installation. Its install.php file is executed.

After the installation is complete, you will be prompted to enter a webmaster account. This account is the root account of the Zen system. Save the user name and password.

Once the installation is complete, you can use it. Very convenient:

The next step is to install SVN and svn over http. The steps for svn are as follows:

Sudo apt-get install subversion

When the installation is complete, the version library is about to be created. My habit is to put data under / data, because this directory can later load a separate high-capacity hard disk.

Create a directory

Mkdir / data cd / data mkdir SVN cd SVN

Then create your own version library under the directory:

Name of svnadmin create version library

Because there are other version libraries in the future, I recommend that you put the passwd and authz files in the SVN root directory for centralized management. Therefore, modify the file direction of the version library (here my version library name is delta_river):

Vi / data/SVN/delta_river/conf/svnserve.conf

Keep in mind here that the lines of the configuration file must have top spaces, no spaces or tab, and must be top spaces to avoid problems.

Then copy the passwd and authz files to the SVN root directory, as follows:

I will not elaborate on the instructions in passwd and authz format. This Internet is very clear.

And then execute

Svnserve-d-r / data/SVN

You can start the service:

You can write a script to start svn and put it under / etc/init.d/ to start it automatically. The command is as follows:

Lz@lz-HP-Compaq-8100-Elite-SFF-PC:~$ cat start_svn.sh #! / bin/bash svnserve-d-r / data/SVN/

After the service is started, you can use the svn client of windows to connect, or you can use the following command to see whether svn is running normally:

Svn list svn://10.239.46.134/delta_river

8 svn configuration is complete, and it's time to deal with svn over http. Libapache2-svn is required here

Sudo apt-get install libapache2-svn

The configuration file is as follows:

Sudo vi / etc/apache2/mods-available/dav_svn.conf

It is important to note that svn and svn over http use two sets of validation modes, and there is not much relationship between them. The verification of svn, as mentioned above, is passwd and authz, although svn over http also uses a similar *, but the file location can be irrelevant.

My dav_svn.conf is as follows:

You can see that I put the svn over http configuration under the / etc/apache2 directory.

There are several points to note here: * authz files can be copy directly from the SVN root directory, or build a symbolic link.

Second, the directory of SVN suggests changing owner to www-data:

Cd / data sudo chown-R www-data:www-data SVN/

Third, the content of dav_svn.passwd is encrypted and needs to be generated with htpasswd

Cd / etc/apache2/ sudo touch dav_svn.passwd

Sudo htpasswd dav_svn.passwd user name

Then enter the password twice and dav_svn.passwd will be fine.

The password here may not be the same as the password under the SVN root directory, but you can remember it anyway. Depending on the protocol, the password used can be different.

Then restart apache2.

Sudo service apache2 restart

At this point, both the svn protocol and the http protocol can be accessed by svn client, and the general contents of the file can be seen with the browser.

More useful commands:

Look at the services provided by the current server:

Sudo netstat-antp

Restart the apache service

Sudo service apache2 restart

Restart the mysql service

Sudo service mysql restart

Postscript: if you need a module for php5.6, you need to execute the following command. Mainly to find the installation source of 5.6:

$sudo apt-get install python-software-properties $sudo add-apt-repository ppa:ondrej/php $sudo apt-get update $sudo apt-get-y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip

After execution, the corresponding module for php5.6 will be installed:

The following additional packages will be installed:

Libapache2-mod-php5.6 libzip5 php5.6-common php5.6-json php5.6-opcache php5.6-readline php5.6-xml

The following NEW packages will be installed:

Libzip5 php5.6-curl php5.6-gd php5.6-intl php5.6-mcrypt php5.6-xml php5.6-xsl php5.6-zip

The following packages will be upgraded:

Libapache2-mod-php5.6 php5.6 php5.6-cli php5.6-common php5.6-json php5.6-mbstring php5.6-mysql php5.6-opcache php5.6-readline

9 upgraded, 8 newly installed, 0 to remove and 409 not upgraded.

Thank you for your reading, the above is the "Linux development server building steps" content, after the study of this article, I believe you have a deeper understanding of the Linux development server building steps, the specific use of the need for you to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report