ufw default denyAllow anything from local network
ufw allow 192.168.0.0/24Allow access to specific ports, in this case ssh and http
ufw allow 22/tcp ufw allow 80/tcpEnable the firewall
ufw enableReview the rules that were setup
ufw status
ufw default denyAllow anything from local network
ufw allow 192.168.0.0/24Allow access to specific ports, in this case ssh and http
ufw allow 22/tcp ufw allow 80/tcpEnable the firewall
ufw enableReview the rules that were setup
ufw status
apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-serverDownloaded joomla with:
wget http://joomlacode.org/gf/download/frsrelease/8897/32884/Joomla_1.5.8-Stable-Full_Package.zipUnzip the archive using:
sudo unzip Joomla_1.5.8-Stable-Full_Package.zip -d /var/www/joomlaChange the owner of the directory and the permissions
sudo chown -R www-data:www-data /var/www/joomla sudo find /var/www/joomla -type f -exec chmod 644 {} \; sudo find /var/www/joomla -type d -exec chmod 755 {} \;Create the database and set permissions:
mysqladmin -u root -p create joomla mysql -u root -p --database=joomla -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO 'joomlauser'@'localhost' IDENTIFIED BY 'joomlapass'" mysql -u root -p --database=joomla -e "FLUSH PRIVILEGES"Access http://servername/joomla/administrator to complete the installation
beans = { doFooTimerTask(org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean){ targetObject = ref("fooService") targetMethod = 'doFoo' } doFooScheduledTimerTask(org.springframework.scheduling.timer.ScheduledTimerTask){ delay = 60000 period = 60000 timerTask = ref('doFooTimerTask') } timerFactory(org.springframework.scheduling.timer.TimerFactoryBean){ scheduledTimerTasks = [ref('doFooScheduledTimerTask')] } }The code above uses Grails' Spring DSL to define the necessary beans to implement the needed functionality. The first segment defines a MethodInvokingTimerTaskFactoryBean which sets up the service and the metod to be called. The next segment defines a ScheduledTimerTask which setups the initial delay and the period between calls. The third and last bean initializes the timer factory which is a TimerFactoryBean which is responsible for running each timer task at the specified intervals.