Instalation from source code: Porovnání verzí
(Založena nová stránka: cs:Instalace ze zdrojových kódů TODO) |
|||
Řádek 1: | Řádek 1: | ||
[[cs:Instalace ze zdrojových kódů]] | [[cs:Instalace ze zdrojových kódů]] | ||
− | + | [[ru:Установка из исходного кода]] | |
+ | '''This manual is intended for FreenetIS developers, for distribution purposes is available [http://wiki.freenetis.org/index.php/Instalace installation of the packaging system].''' | ||
+ | |||
+ | FreenetIS can run on any server (including Windows), but the recommended platform is Linux. | ||
+ | |||
+ | = Linux = | ||
+ | |||
+ | These instructions assume the use of the Debian distribution. For other distributions the procedure will be similar. | ||
+ | |||
+ | == Preparation== | ||
+ | |||
+ | Installing PHP, Apache, MySQL and phpMyAdmin. You need to be logged in as root. | ||
+ | apt-get install apache2 php5 php5-mysql php5-curl mysql-server phpmyadmin | ||
+ | |||
+ | '''Supported versions of the''' | ||
+ | |||
+ | *'''PHP''' version 5.1.2 and higher | ||
+ | *'''MySQL''' version 5.1.0 and higher | ||
+ | |||
+ | === Locale === | ||
+ | For proper comparison function Czech strings in PHP must be installed Czech UTF-8 locale. so: | ||
+ | dpkg-reconfigure locales | ||
+ | |||
+ | Select: | ||
+ | |||
+ | en_US.UTF-8 | ||
+ | en_US.UTF-8 | ||
+ | |||
+ | and restart apache: | ||
+ | |||
+ | apache2ctl graceful | ||
+ | |||
+ | === Apache === | ||
+ | |||
+ | For proper running Apache edit configuration file for virtualhost. For Debian it can be found at the following: | ||
+ | * If you have any virtualhost not been setup yet, this is the file / etc/apache2/sites-available/default | ||
+ | * If you already have a virtualhost, it will probably be configured in some other files in the / etc/apache2/sites-available / | ||
+ | |||
+ | In this file, add the following lines: | ||
+ | |||
+ | <VirtualHost *> | ||
+ | ServerAdmin webmaster@example.org | ||
+ | ServerName freenetis.example.org | ||
+ | DocumentRoot / var / www / freenetis | ||
+ | <Directory /var/www/freenetis> | ||
+ | Options Indexes FollowSymLinks MultiViews | ||
+ | Order allow, deny | ||
+ | allow from all | ||
+ | </ Directory> | ||
+ | </ VirtualHost> | ||
+ | |||
+ | where, of course, place ServerAdmin and ServerName enter your data. | ||
+ | |||
+ | Finally, restart Apache command: | ||
+ | |||
+ | / etc/init.d/apache2 restart | ||
+ | |||
+ | == Optional: Enable mod_rewrite == | ||
+ | |||
+ | If it is not enabled, enable it: | ||
+ | |||
+ | a2enmod rewrite | ||
+ | |||
+ | In the virtualhost configuration and Apache (the crossing point), enable the directory FreenetIS possibility of readjusting the configuration file using Apache. Htaccess - Directory section to add the directive "AllowOverride All". This section Directory should then end up looking like this: | ||
+ | |||
+ | <Directory /var/www/freenetis> | ||
+ | Options Indexes FollowSymLinks MultiViews | ||
+ | AllowOverride All | ||
+ | Order allow, deny | ||
+ | allow from all | ||
+ | </ Directory> | ||
+ | |||
+ | Finally, restart Apache command: | ||
+ | |||
+ | / etc/init.d/apache2 restart | ||
+ | |||
+ | === MySQL === | ||
+ | |||
+ | To set MySQL database can be used numerous tools and procedures. For each of them, but you will need a user name and password for your MySQL server. After installation, there is only one user - root and the password is blank. If you forget it, you change it using | ||
+ | |||
+ | dpkg-reconfigure mysql-server-VERSION | ||
+ | |||
+ | where version is the version number of the MySQL server. In newer versions it is usually 5.1 for those older then 5.0. | ||
+ | |||
+ | ====Using phpMyAdmin==== | ||
+ | |||
+ | [http://cs.wikipedia.org/wiki/PhpMyAdmin PhpMyAdmin] is an advanced tool to manage MySQL database via a web interface. After installation is available at | ||
+ | |||
+ | <nowiki> http://printer_ip_address/ server / phpMyAdmin / </ nowiki> | ||
+ | |||
+ | or if you are working on localhost as well as on | ||
+ | |||
+ | <nowiki> http://localhost/phpmyadmin/ </ nowiki> | ||
+ | |||
+ | Click Permissions, and then click Add New User. Username Enter any (recommended freenetis). Select the local computer (important for safety). Set a strong password, preferably randomly generated (a good example is the generator [http://www.converter.cz/passgen/pswdgen.php here]. Choose "Create a database of the same name and grant all privileges" and the bottom right click on Execute . | ||
+ | |||
+ | ====Using the console==== | ||
+ | |||
+ | You can create the database manually. You must first log in to the database, you are prompted for a password database superuser. | ||
+ | |||
+ | mysql-u root-p | ||
+ | |||
+ | After logging in mysql console then type the following commands: | ||
+ | |||
+ | create database freenetis; | ||
+ | create user 'freenetis' @ 'localhost' IDENTIFIED BY 'password'; | ||
+ | grant all on freenetis. * it 'freenetis' @ 'localhost'; | ||
+ | |||
+ | ==download== | ||
+ | ===Download from SVN=== | ||
+ | |||
+ | If you do not have a SVN client, then | ||
+ | apt-get install subversion | ||
+ | |||
+ | Now you can download FreenetIS to the directory / var / www / freenetis (the trunk is the most stable version, another SVN is used for development and testing) | ||
+ | |||
+ | cd / var / www | ||
+ | svn checkout - username = username <nowiki> svn + ssh :/ / username@svn.code.sf.net / p / freenetis / code / freenetis / trunk freenetis </ nowiki> | ||
+ | |||
+ | Enable write to the folder freenetis, freenetis / upload and create a folder for logging freenetis / logs: | ||
+ | |||
+ | cd / var / www / freenetis | ||
+ | chmod ugo + w. upload | ||
+ | mkdir-m 0777 logs | ||
+ | |||
+ | FreenetIS is constantly evolving, you download the update command: | ||
+ | |||
+ | cd / var / www / freenetis | ||
+ | svn update | ||
+ | |||
+ | (which downloads only modified files) | ||
+ | |||
+ | ===Commit log=== | ||
+ | |||
+ | Log fixes stable version (trunk) is [http://freenetis.svn.sourceforge.net/viewvc/freenetis/freenetis/trunk/kohana/?view=log available here]. | ||
+ | |||
+ | Currently, we use a system development through various branches (eg, testing, etc.) and the main branch (trunk) send a functioning changes, so the number of errors is lower than in the situation of only one development branch, as it was before. | ||
+ | |||
+ | Summary [http://freenetis.svn.sourceforge.net/viewvc/freenetis/freenetis/?view=log log commit to all branches here]. | ||
+ | |||
+ | ==installation== | ||
+ | |||
+ | Now would be selected by entering your address into the browser FreenetIS installer should appear welcoming. | ||
+ | |||
+ | ===Configuration=== | ||
+ | |||
+ | In the first part of the installer informs you that you need to create a configuration file config.php. Click Next Step. | ||
+ | |||
+ | Now the installer prompts you to enter information to access the MySQL server. Use the information that you have used in the preparation of MySQL and click Send. | ||
+ | |||
+ | If you entered the correct information, the installer informs you that the configuration has been completed. Otherwise notifies you that failed to connect to the database with suggestions for possible problems. | ||
+ | |||
+ | When you manage to correct these errors, click Next Step. | ||
+ | |||
+ | ====Optional: Manually create config.php==== | ||
+ | |||
+ | If you do not have write access to the directory freenetis, the installer will generate code to copy and save it as config.php in the directory freenetis. '''Until you do so, the installation will be discontinued!''' | ||
+ | |||
+ | ===The installation=== | ||
+ | |||
+ | Now before you would be appearing the installation form with information about your association. After completing the installation should be done. | ||
+ | |||
+ | ==== Optional: Manually create. Htaccess ==== | ||
+ | |||
+ | If you have checked the Read URL and you do not have write access to the directory freenetis, the installer will generate code to copy and save it as a. Htaccess file in the directory freenetis. '''If you do not, your installation may not work properly!''' | ||
+ | |||
+ | ===Launching of "planning"=== | ||
+ | |||
+ | FreenetIS has a custom scheduler that is needed zpouštět regularly from cron. Do cron add this line: | ||
+ | |||
+ | # FreenetIS scheduler | ||
+ | ***** Root wget-O / dev / null http:// <hostname> / en / scheduler / run | ||
+ | |||
+ | If you are using SSL with unauthorized or invalid certificates, use: | ||
+ | |||
+ | # FreenetIS scheduler | ||
+ | ***** Root wget-O / dev / null https:// <hostname> / en / scheduler / run - no-check-certificate |
Aktuální verze z 10. 12. 2013, 13:05
This manual is intended for FreenetIS developers, for distribution purposes is available installation of the packaging system.
FreenetIS can run on any server (including Windows), but the recommended platform is Linux.
Linux
These instructions assume the use of the Debian distribution. For other distributions the procedure will be similar.
Preparation
Installing PHP, Apache, MySQL and phpMyAdmin. You need to be logged in as root.
apt-get install apache2 php5 php5-mysql php5-curl mysql-server phpmyadmin
Supported versions of the
- PHP version 5.1.2 and higher
- MySQL version 5.1.0 and higher
Locale
For proper comparison function Czech strings in PHP must be installed Czech UTF-8 locale. so:
dpkg-reconfigure locales
Select:
en_US.UTF-8 en_US.UTF-8
and restart apache:
apache2ctl graceful
Apache
For proper running Apache edit configuration file for virtualhost. For Debian it can be found at the following:
- If you have any virtualhost not been setup yet, this is the file / etc/apache2/sites-available/default
- If you already have a virtualhost, it will probably be configured in some other files in the / etc/apache2/sites-available /
In this file, add the following lines:
<VirtualHost *> ServerAdmin webmaster@example.org ServerName freenetis.example.org DocumentRoot / var / www / freenetis <Directory /var/www/freenetis> Options Indexes FollowSymLinks MultiViews Order allow, deny allow from all </ Directory> </ VirtualHost>
where, of course, place ServerAdmin and ServerName enter your data.
Finally, restart Apache command:
/ etc/init.d/apache2 restart
Optional: Enable mod_rewrite
If it is not enabled, enable it:
a2enmod rewrite
In the virtualhost configuration and Apache (the crossing point), enable the directory FreenetIS possibility of readjusting the configuration file using Apache. Htaccess - Directory section to add the directive "AllowOverride All". This section Directory should then end up looking like this:
<Directory /var/www/freenetis> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow, deny allow from all </ Directory>
Finally, restart Apache command:
/ etc/init.d/apache2 restart
MySQL
To set MySQL database can be used numerous tools and procedures. For each of them, but you will need a user name and password for your MySQL server. After installation, there is only one user - root and the password is blank. If you forget it, you change it using
dpkg-reconfigure mysql-server-VERSION
where version is the version number of the MySQL server. In newer versions it is usually 5.1 for those older then 5.0.
Using phpMyAdmin
PhpMyAdmin is an advanced tool to manage MySQL database via a web interface. After installation is available at
<nowiki> http://printer_ip_address/ server / phpMyAdmin / </ nowiki>
or if you are working on localhost as well as on
<nowiki> http://localhost/phpmyadmin/ </ nowiki>
Click Permissions, and then click Add New User. Username Enter any (recommended freenetis). Select the local computer (important for safety). Set a strong password, preferably randomly generated (a good example is the generator here. Choose "Create a database of the same name and grant all privileges" and the bottom right click on Execute .
Using the console
You can create the database manually. You must first log in to the database, you are prompted for a password database superuser.
mysql-u root-p
After logging in mysql console then type the following commands:
create database freenetis; create user 'freenetis' @ 'localhost' IDENTIFIED BY 'password'; grant all on freenetis. * it 'freenetis' @ 'localhost';
download
Download from SVN
If you do not have a SVN client, then
apt-get install subversion
Now you can download FreenetIS to the directory / var / www / freenetis (the trunk is the most stable version, another SVN is used for development and testing)
cd / var / www svn checkout - username = username <nowiki> svn + ssh :/ / username@svn.code.sf.net / p / freenetis / code / freenetis / trunk freenetis </ nowiki>
Enable write to the folder freenetis, freenetis / upload and create a folder for logging freenetis / logs:
cd / var / www / freenetis chmod ugo + w. upload mkdir-m 0777 logs
FreenetIS is constantly evolving, you download the update command:
cd / var / www / freenetis svn update
(which downloads only modified files)
Commit log
Log fixes stable version (trunk) is available here.
Currently, we use a system development through various branches (eg, testing, etc.) and the main branch (trunk) send a functioning changes, so the number of errors is lower than in the situation of only one development branch, as it was before.
Summary log commit to all branches here.
installation
Now would be selected by entering your address into the browser FreenetIS installer should appear welcoming.
Configuration
In the first part of the installer informs you that you need to create a configuration file config.php. Click Next Step.
Now the installer prompts you to enter information to access the MySQL server. Use the information that you have used in the preparation of MySQL and click Send.
If you entered the correct information, the installer informs you that the configuration has been completed. Otherwise notifies you that failed to connect to the database with suggestions for possible problems.
When you manage to correct these errors, click Next Step.
Optional: Manually create config.php
If you do not have write access to the directory freenetis, the installer will generate code to copy and save it as config.php in the directory freenetis. Until you do so, the installation will be discontinued!
The installation
Now before you would be appearing the installation form with information about your association. After completing the installation should be done.
Optional: Manually create. Htaccess
If you have checked the Read URL and you do not have write access to the directory freenetis, the installer will generate code to copy and save it as a. Htaccess file in the directory freenetis. If you do not, your installation may not work properly!
Launching of "planning"
FreenetIS has a custom scheduler that is needed zpouštět regularly from cron. Do cron add this line:
# FreenetIS scheduler ***** Root wget-O / dev / null http:// <hostname> / en / scheduler / run
If you are using SSL with unauthorized or invalid certificates, use:
# FreenetIS scheduler ***** Root wget-O / dev / null https:// <hostname> / en / scheduler / run - no-check-certificate