It is very practical to build a local source in Ubuntu. When many servers do not have a network or the network is slow, or you need to install the same software in batches, if each server is downloaded from the internet, is it slow, and not a maintenance engineer is willing to do this! So what's the best way? The following record is the installation method of ubuntu local source for your reference only. System Environment: Ubuntu12.04 1. The purpose of this experiment is to build common Ubuntu software on a Ubuntu12.04 server.
It is very practical to build a local source in Ubuntu. When many servers do not have a network or the network is slow, or you need to install the same software in batches, if each server is downloaded from the internet, is it slow, and not a maintenance engineer is willing to do this! So what's the best way? The following is a record of the Installation Method of Ubuntu 12.04 local source for your reference only.
System Environment: Ubuntu 12.04
I. Tutorial Purpose
A common software installation source for Ubuntu is built on an Ubuntu 12.04 server. Due to project requirements, many deb packages need to be installed, and consistent software and environment must be deployed on several machines on the LAN, first, we need to download the required software package from apt-get on the server side for cost-effectiveness. Then, several servers in the LAN automatically synchronize the installation source through scripts or kickstart.
Server ip: 192.9.117.140
Test Server ip Address: 192.9.117.141
Ii. Formal Installation
1. First install the required software in apt-get install on the server. After installation, we will find that, the software we just installed is stored in the/var/cache/apt/archives/directory. We can see that there are many software in this directory. deb file.
Create directory mkdir/data/soft-p // set the installation Source Path
Copy/var/cache/apt/archives/file to/data/soft command: cp-p/var/cache/apt/archives/*. deb/data/soft/
2. Install dpkg-dev
Install dpkg-dev and run dpkg-scanpackages to scan the dependency package and generate the dependency gz package:
Root @ ubuntu12-04 www.linuxidc.com :~ # Apt-get install dpkg-dev-y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Dpkg-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Root @ ubuntu12-04 www.linuxidc.com :~ #
Root @ ubuntu12-04 www.linuxidc.com :~ # Cd/data/
Root @ ubuntu12-04 www.linuxidc.com:/data # ls
Soft
Root @ ubuntu12-04 www.linuxidc.com:/data # dpkg-scanpackages soft/| gzip> soft/Packages.gz
3. Create a source link
Compile and install nginx for the web server of Ubuntu local source
Tar xzf nginx-1.2.0.tar.gz & cd nginx-1.2.0 &./configure./configure -- without-http_rewrite_module & make install.
Modify the nginx. conf release directory to the/data directory, and add autoindex on; in the http segment!
Start nginx/usr/local/nginx/sbin/nginx
Make sure that you can access http: // 192.9.117.140/and view the soft directory, indicating that nginx is successfully installed and configured.
Iii. Client Testing
Environment: the client cannot be connected to the Internet. After the server is configured, in order to connect the network with the client, disconnect the Internet network of the server and maintain the same network segment with the client, and then:
Modify source file/etc/apt/sources. list
Cp/etc/apt/sources. list/etc/apt/sources. list. back // backup file
You can create an empty/etc/apt/sources. list file.
Echo "deb http: // 192.9.117.140 soft/">/etc/apt/sources. list [Note source. the format of the list content. soft indicates the directory. Because 140 already specifies the/data directory, do not write/data/soft/here /]
After the above steps are completed, it will be OK!
Finally, execute apt-get update on the client as follows:
Now we can find the apt-get install software name from the source! Through the configuration of the above environment, we can refer to the other three, you can contact the script, kickstart and so on for automatic installation, so that you can learn more! Welcome to join us!
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2