User Tools

Site Tools


installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
installation [2014/03/18 17:05]
127.0.0.1 external edit
installation [2016/02/01 17:45] (current)
admin [Create Consistent Base URL]
Line 1: Line 1:
 ====== Installation Guide ====== ====== Installation Guide ======
  
-The installation process is a very simple task. There are steps:+The installation process is a very simple task. There are steps:
   - [[installation#​copy_the_files_to_your_server|Copy the files to your server]]   - [[installation#​copy_the_files_to_your_server|Copy the files to your server]]
   - [[installation#​create_your_database_and_database_user_and_password|Create your database and database user and password]]   - [[installation#​create_your_database_and_database_user_and_password|Create your database and database user and password]]
   - [[installation#​point_your_browser_to_your_site_and_follow_the_installation_process|Point your browser to your site and follow the installation process]]   - [[installation#​point_your_browser_to_your_site_and_follow_the_installation_process|Point your browser to your site and follow the installation process]]
-  - [[installation#​set_up_the_periodic_maintenance_task|Set up the periodic maintenance task]]+  ​- [[installation#​create_consistent_base_url|Create Consistent Base URL]] 
 +  ​- [[installation#​set_up_the_periodic_maintenance_task|Set up the periodic maintenance task (Cron Jobs)]]
  
 Also check out the post install steps. Also check out the post install steps.
Line 13: Line 14:
  
  
 +===== Copy the files to your server =====
  
 +Once you received the package file from us you need to unarchive it. It is compressed with the popular zip format and you need an unarchiving utility like [[http://​www.winzip.com|Winzip]] or the free [[http://​sourceforge.net/​project/​showfiles.php?​group_id=14481|7-Zip]] to unzip it. After unzip you will have a folder '​**etano**'​ on your computer. What you need to transfer to the server are all files inside the '​**etano**'​ folder.
  
-===== Copy the files to your server ===== +>>{{:etano-files.jpg|}}
- +
-Once you received the package file from us you need to unarchive it. It is compressed with the popular zip format and you need an unarchiving utility like [[http://​www.winzip.com|Winzip]] or the free [[http://​sourceforge.net/​project/​showfiles.php?​group_id=14481|7-Zip]] to unzip it. After unzip you will have a folder '​etano'​ on your computer. What you need to transfer to the server are all files inside this '​etano'​ folder.+
  
 To transfer the files to the server you need a ftp file transfer utility. If you don't know what that is you should try [[http://​sourceforge.net/​project/​showfiles.php?​group_id=21558|Filezilla]]. It's free and easy to use.  To transfer the files to the server you need a ftp file transfer utility. If you don't know what that is you should try [[http://​sourceforge.net/​project/​showfiles.php?​group_id=21558|Filezilla]]. It's free and easy to use. 
Line 61: Line 62:
   In this case please edit the .htaccess file and remove all lines starting with php_value or php_flag. ​   In this case please edit the .htaccess file and remove all lines starting with php_value or php_flag. ​
   These lines set the best environment for Etano but it can run even if you remove these lines.   These lines set the best environment for Etano but it can run even if you remove these lines.
- +  Once you have edited the .htaccess file then return to the install page. 
-Simply ​follow the instructions on screen.+  You may need to enter the full path ... http://​yoursite.com/​install/​ 
 +Then simply continue to follow the instructions on screen.
 The default username and password for the administration panel are:\\ The default username and password for the administration panel are:\\
 Username: admin\\ Username: admin\\
Line 75: Line 77:
  
 ===== Set up the periodic maintenance task ===== ===== Set up the periodic maintenance task =====
 +==== Cron Jobs - Scheduled Maintenance Tasks ====
 The application depends on a single periodic job to do all maintenance tasks like creating cache files for new members or blog posts, sending messages and emails from/to members, removing invalid members (and the ones marked for deletion by the administrator),​ cleaning up and optimizing the database, fetching news from foreign feeds, etc. This periodic job has to run every 5 minutes. Depending on the time of the day and the date, the script will do different tasks. The application depends on a single periodic job to do all maintenance tasks like creating cache files for new members or blog posts, sending messages and emails from/to members, removing invalid members (and the ones marked for deletion by the administrator),​ cleaning up and optimizing the database, fetching news from foreign feeds, etc. This periodic job has to run every 5 minutes. Depending on the time of the day and the date, the script will do different tasks.
 The site will seem non-functional until you activate this periodic job so it is very important that you set it up correctly from the beginning. The site will seem non-functional until you activate this periodic job so it is very important that you set it up correctly from the beginning.
Line 92: Line 94:
  
  
-==== Adding ​new cron job in cPanel ====+==== Setting up the Etano cron job using cPanel ==== 
 + 
 +**What is cPanel?**\\  
 +cPanel is the most widely used web based control panel tool provided by your host which helps you manage your web hosting account through ​web interface. If your host uses another control panel such as "​Plesk"​ you'll need to seek instructions from your host or another source. 
 + 
 +**What is the purpose of Cron Jobs?**\\  
 +Cron Jobs are designed to maintain a list of commands or tasks that the Etano system needs to run at various time intervals, including periodic maintenance. 
 +Having tasks run at various times also helps spread the load of resources used so your site runs as smooth and efficent as possible, which becomes especially important as your site grows where you begin to have lots of members online.\\ 
 + 
 +==== Important Note ==== 
 +**Please Read:**\\ 
 +Make sure that your host allows crons to be run every 5 minutes, some shared hosting plans do not allow crons to be run under 10 or even 15 minutes. GoDaddy and HostGator are a couple of examples, they only allow cron jobs under 15 minutes on their VPS and Dedicated server plans. Many hosts aren't up-front as to how frequently you can run cron jobs, so you may need to do some digging in their site terms or forums, or ask them directly. Most will allow you to make cron settings of 5 minutes in cPanel, but that doesn'​t necessarily mean it's going to actually work.\\ 
 +\\ 
 + 
 +==== Setting up the cron job in cPanel==== 
 + 
 +**1**) Access your cPanel interface and login, then click on the icon located in the Advanced section of your cPanel interface.\\ 
 +>>​{{:​cpanel_cronjobs.jpg|}}\\ 
 +You may next be asked to choose your experience level. If so choose '​Standard'​.\\ 
 + 
 +**2**) Select the predefined time periods shown below from the Common Settings drop-down menu.\\ 
 +>>​{{:​cron_settings.jpg|}}\\ 
 +The "​**Command**"​ field is where you enter the "​command to be run by cron" that you received at the end of the installation process, which should look something like this:\\ 
 +**/​usr/​bin/​php -f /​home/​your_user/​public_html/​tools/​cron/​cron.php**\\ 
 + 
 +If you failed to make a note of (or copy) the "​**command to be run by cron**"​ that you received at the end of the installation process, you will need to either go thru the install process again, or ask your host what the correct command is for your server. You can also try getting your correct server path by viewing the **includes/​defines.inc.php** file on your server, and looking at this line:\\ 
 + 
 +>>​define('​_BASEPATH_','​**/​home/​your_user/​public_html**'​);​\\ 
 + 
 +Then you would include the path in the cron command so it's like this:\\ 
 +>>​**/​usr/​bin/​php -f /​home/​your_user/​public_html/​tools/​cron/​cron.php**\\ 
 + 
 +Make sure that your cron jobs are set at */5 * * * * and not 5 * * * *\\ 
 + 
 +*/5 is for every 5 mins and capable of running crons every 5,​10,​15,​20,​25,​30,​35,​40,​45,​50,​55 minutes.\\ 
 + 
 +If you have the cron set at 5 * * * it will only run every 5 minutes but will not run any cron jobs set at other intervals less than one hour, and the Etano script has some key cron jobs that need to be run every 5 and 10 minutes.\\ 
 + 
 +**3**) This step is optional. Enter the email address where you want the cron output sent to. This can be beneficial if you're having issues with your cron jobs as you will be able to tell if the crons are working or failing.\\ 
 +>>​{{:​cron-job-email.jpg|}}\\ 
 + 
 +**Some common symptoms that you're crons might not be functioning properly:​**\\ 
 +When a new member joins, and after waiting 10 or 15 minutes, they don't appear in the search results or in the "​Latest Members"​ widget. New blogs don't show up after waiting 10 or 15 minutes. Certian email notifications not being sent out.\\ 
 + 
 +**Note:** Once you get the cron jobs working properly, it won't show members that were created while the crons weren'​t functioning,​ the only way they will be released and updated is by '​regenerating'​ your skin under the 'Skin Settings'​ in your Etano admin.\\ 
 +>>​{{:​regenerate_skins.jpg|}}\\ 
  
-1. Access your cPanel interface and login. You should have your login details and cPanel address in the welcome email you received from your host. 
-2. Find the "Cron jobs" menu and click on it (usually under the Advanced category). 
-3. It should ask you to choose your experience level. Choose '​Standard'​. 
-4. If you already have some other cron jobs you will see those listed first and at the bottom of the page, right above the 'Save Crontab'​ button there'​s an empty Entry - that's the one we'll use to add our job. If you don't have any other job set then you will see only an empty "Entry 1" waiting for us to fill in. 
-In the "​command to run" field you need to enter the "​command to be run by cron" you received at the end of the installation process. It should look like this: \\ 
-''/​usr/​bin/​php -f /​home/​your_user/​public_html/​tools/​cron/​cron.php''​ \\ 
-Then select "​**Every Five Minutes**"​ (not just 5 but Every Five Minutes) in the "​Minute(s)"​ box, "​**Every Hour**"​ in the "​Hour(s)"​ box, "​**Every Day**" in the "​Day(s) box, "​**Every Month**"​ in the "​Month(s)"​ box, "​**Every Week Day**" in the "​Weekday(s)"​ box and click on "Save Crontab"​. That's all. 
  
  
 ==== Adding a new cron job from the command line ==== ==== Adding a new cron job from the command line ====
  
-Adding cron jobs from the command line is for advanced ​members ​who know their way within the linux environment and it is not recommended for beginner. However, here are the steps:+Adding cron jobs from the command line is **for advanced ​users** ​who know their way within the linux environment and it is not recommended for beginner. However, here are the steps:
 1. In order to avoid permission conflicts you should run the periodic job as the same user with the one apache runs as for your site. Alternatively you can run the cron job as root.  1. In order to avoid permission conflicts you should run the periodic job as the same user with the one apache runs as for your site. Alternatively you can run the cron job as root. 
 2. enter ''​crontab -e''​ 2. enter ''​crontab -e''​
Line 135: Line 176:
 Replace '/​path/​to/​wget'​ with the actual path to wget, '​http://​www.yourserver.com'​ with the actual address of your site and '<<​license key>>'​ with the license number of your Etano. For example: ''/​usr/​bin/​wget -q -O /dev/null http://​www.myserver.com/​tools/​cron/​cron_web.php?​lk=1234''​ Replace '/​path/​to/​wget'​ with the actual path to wget, '​http://​www.yourserver.com'​ with the actual address of your site and '<<​license key>>'​ with the license number of your Etano. For example: ''/​usr/​bin/​wget -q -O /dev/null http://​www.myserver.com/​tools/​cron/​cron_web.php?​lk=1234''​
  
-If your server doesn'​t allow you to run cron jobs at all or if you are not allowed to run jobs as often as 5 minutes you can [[http://​www.datemill.com/​contact.php|contact us]] to discuss the possibility of having them run remotely from our server. 
  
 +===== Create Consistent Base URL =====
 +Some web servers treat URLs with **www** and **non www** as totally separate URLs or domains which can cause potential issues. For example if your BASE URL is defined with the the **www** prefix www.yoursite.com but you type in just **yoursite.com** into the browser'​s URL field, this can potentially cause problems if the URL changes with or without the **WWW** prefix while browsing or navigating to different pages.
 +
 +Most common issues are users being logged out when navigating the site, or during the registration process when a user attempts to select their state it continues to try and load but never actually loads.
  
 +To prevent this from potentially happening it's best to make it always rewrite with the www prefix by including ​ the following code in the top portion of your .htaccess file.
 +<​code>​Options +FollowSymLinks
 +RewriteEngine on
 +RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
 +RewriteRule ^(.*)$ http://​www.yoursite.com/​$1 [R=301,L]
 +</​code>​
 +Then in the **includes/​defines.inc.php** file on your server be sure your Base URL has the **WWW** prefix, which will be in line #7:
  
 +<​code>​define('​_BASEURL_','​http://​www.yoursite.com'​);//​ protocol required (http:// )</​code>​
  
 ==== Helper scripts ==== ==== Helper scripts ====
  
 If your cron job didn't run for a while (or not right after you finished the install process), some cache files might not have been generated. The cron job only generates cache files for new members and blog posts (approved in the last 10 minutes). It does not generate the cache for members who joined yesterday for example. In this case yesterday'​s members will not appear in search results, although nothing is wrong with the site. \\ If your cron job didn't run for a while (or not right after you finished the install process), some cache files might not have been generated. The cron job only generates cache files for new members and blog posts (approved in the last 10 minutes). It does not generate the cache for members who joined yesterday for example. In this case yesterday'​s members will not appear in search results, although nothing is wrong with the site. \\
-To regenerate the cache for **ALL** blog post caches you can access ''​http://​www.yourserver.com/​tools/​cron/​gen_blogs_full.php''​ from your browser. This script will eventually be moved to admin panel. \\+To regenerate the cache for **ALL** blog post caches you can access ''​http://​www.yourserver.com/​tools/​cron/​gen_blogs_full.php''​ from your browser. \\
 To regenerate the cache for **ALL** members go to your admin panel - Skin Settings (in the Site Setup menu category) and click on '​Regenerate all skins' link. To regenerate the cache for **ALL** members go to your admin panel - Skin Settings (in the Site Setup menu category) and click on '​Regenerate all skins' link.
installation.1395162335.txt.gz · Last modified: 2014/03/18 17:25 (external edit)