You should be able to do it using below command:
sc.exe delete <service name>
If you do not have sc on your system... check your resource disk.
sc.exe delete <service name>
If you do not have sc on your system... check your resource disk.
sudo gedit /etc/init.d/tomcat7
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
case $1 in
start)
sh /usr/share/tomcat7/bin/startup.sh
;;
stop)
sh /usr/share/tomcat7/bin/shutdown.sh
;;
restart)
sh /usr/share/tomcat7/bin/shutdown.sh
sh /usr/share/tomcat7/bin/startup.sh
;;
esac
exit 0
sudo chmod 755 /etc/init.d/tomcat7
sudo ln -s /etc/init.d/tomcat7 /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat7 /etc/rc2.d/S99tomcat
NA region | Apac Region |
Create a new key pair and save it. | |
Create a new small instance of Ubuntu AMI. | |
Create a 15GiB Volume in same region | |
Attach volume to new instance. e.g., ec2-attach-volume --region ap-southeast-1 -d /dev/sdh -i <instanceid> <volumeid> | |
Login to the new instance and give proper rights to the new volume sudo chmod a+rw /dev/sdh | |
Spin an instance of AMI that you want to transfer to apac region | |
Login to this AMI and run following command to transfer data to new volume that we created in apac region.. sudo dd if=/dev/sda1 | ssh -i your-apac-key.pem public-dns-of-apac-instance dd of=/dev/sdh1 This is a binary transfer so it takes a hell lot of time.. doesn’t give any message etc.. so all you need to do is wait and get a coffee for yourself.. | |
Stop the instance and Detach both volumes from apac instance ec2-detach-volume --region ap-southeast-1 -d /dev/sdh -i <instanceid> <volumeid> | |
Attach the new volume that we created to this instance | |
Lastly Update the instance with: /etc/apt$ sudo vi sources.list :1,$s/us-east-1/ap-southeast-1/ :wq sudo apt-get update sudo apt-get upgrade and now you can create a new AMI of this Instance.. It will be exactly the same as the one in NA region. |