mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-17 11:04:00 +01:00
CLOUDSTACK-3797: Including httpd permission and test page
- add a test page for the http service - startup on boot - configure iptables port :80 - cleanup iso files Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
3fec71e748
commit
03150fd6ee
@ -1,8 +1,10 @@
|
|||||||
# Clean up unneeded packages.
|
# Clean up unneeded packages.
|
||||||
yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
|
yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
|
||||||
yum -y clean all
|
yum -y clean all
|
||||||
|
|
||||||
#rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo
|
#rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo
|
||||||
rm -rf VBoxGuestAdditions_*.iso
|
rm -rf VBoxGuestAdditions_*.iso
|
||||||
|
rm -rf xs-tools*.iso
|
||||||
|
|
||||||
# Ensure that udev doesn't screw us with network device naming.
|
# Ensure that udev doesn't screw us with network device naming.
|
||||||
ln -sf /dev/null /lib/udev/rules.d/75-persistent-net-generator.rules
|
ln -sf /dev/null /lib/udev/rules.d/75-persistent-net-generator.rules
|
||||||
|
|||||||
@ -5,3 +5,6 @@ sudo mount -o loop xs-tools.iso /mnt
|
|||||||
|
|
||||||
#install the xs tools
|
#install the xs tools
|
||||||
sudo yes | sudo sh /mnt/Linux/install.sh
|
sudo yes | sudo sh /mnt/Linux/install.sh
|
||||||
|
|
||||||
|
#unmount and cleanup
|
||||||
|
sudo umount /mnt
|
||||||
|
|||||||
@ -27,15 +27,28 @@ install_packages() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_services() {
|
start_services() {
|
||||||
chkconfig httpd on
|
|
||||||
service httpd start
|
service httpd start
|
||||||
}
|
}
|
||||||
|
|
||||||
|
httpd_configure() {
|
||||||
|
# start httpd on boot
|
||||||
|
chkconfig httpd on
|
||||||
|
# open port 80
|
||||||
|
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
|
||||||
|
# create a test page
|
||||||
|
echo "<h1> Hello, World </h1>" > /var/www/html/test.html
|
||||||
|
# give 755 permissions and ownership
|
||||||
|
chmod -R 755 /var/www/html/
|
||||||
|
chown -R apache:apache /var/www/html/
|
||||||
|
}
|
||||||
|
|
||||||
begin=$(date +%s)
|
begin=$(date +%s)
|
||||||
|
|
||||||
install_packages
|
install_packages
|
||||||
|
httpd_configure
|
||||||
|
start_services
|
||||||
|
|
||||||
fin=$(date +%s)
|
fin=$(date +%s)
|
||||||
t=$((fin-begin))
|
t=$((fin-begin))
|
||||||
|
|
||||||
echo "Builtin baked in $t seconds"
|
echo "Testing Builtin baked in $t seconds"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user