2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

modify ubuntu os other pkg

This commit is contained in:
junxiawang 2015-12-10 09:06:28 -05:00
parent ec9eb940a3
commit 8d53d3d6e4

View File

@ -32,57 +32,5 @@ Run ``updatenode -P`` otherpkgs to **install/update** the packages on the comput
Compute nodes can not access the internet
------------------------------------------
If compute nodes cannot access the internet, there are two ways to install additional packages:use apt proxy or use local mirror;
option 1: Use apt proxy
~~~~~~~~~~~~~~~~~~~~~~~
Step 1: Install **Squid** on the server which can access the internet (Here uses management node as the proxy server)::
apt-get install squid
Step 2: Edit the **Squid** configuration file **/etc/squid3/squid.conf**, find the line **"#http_access deny to_localhost"**. Add the following 2 lines behind this line.::
acl cn_apt src <compute node sub network>/<net mask length>
http_access allow cn_apt
For more refer Squid configuring.
Step 3: Restart the proxy service ::
service squid3 restart
Step 4: Create a postscript under **/install/postscripts/** directory, called aptproxy, add following lines ::
#!/bin/sh
PROXYSERVER=$1
if [ -z $PROXYSERVER ];then
PROXYSERVER=$MASTER
fi
PROXYPORT=$2
if [ -z $PROXYPORT ];then
PROXYPORT=3128
fi
if [ -e "/etc/apt/apt.conf" ];then
sed '/^Acquire::http::Proxy/d' /etc/apt/apt.conf &gt; /etc/apt/apt.conf.new
mv -f /etc/apt/apt.conf.new /etc/apt/apt.conf
fi
echo "Acquire::http::Proxy \"http://${PROXYSERVER}:$PROXYPORT\";" &gt;&gt; /etc/apt/apt.conf
Step 5: add this postscript to compute nodes, the **[proxy server ip]** and **[proxy server port]** are optional parameters for this postscript. If they are not specified, xCAT will use the management node ip and 3128 by default. ::
chdef <node range> -p postscripts="aptproxy [proxy server ip] [proxy server port]"
Step 6: Edit the otherpkglist file, add the require software packages' name.
Step 7: Edit the otherpkgdir attribute for os image object, can use the internet repositories directly.
Step 8: Run ``nodeset``, ``rsetboot``, rpower commands to provision the compute nodes.
Optional 2: Use local mirror
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To do will add link
If compute nodes cannot access the internet, there are two ways to install additional packages:use apt proxy or use local mirror to do will add link ;