Difference between revisions of "SQLite: Instalasi SQLite Manager"

From OnnoWiki
Jump to navigation Jump to search
Line 8: Line 8:
 
  cd /var/www
 
  cd /var/www
 
  tar zxvf SQliteManager-1.2.4.tar.gz  
 
  tar zxvf SQliteManager-1.2.4.tar.gz  
 +
chown -R www-data:www-data SQLiteManager-*/
 +
chmod -R 600 SQLiteManager-*/
  
 +
Buat database untuk Apache
  
--------------
+
mkdir /usr/local/apache
1 - Unpack your download file into your 'DocumentRoot' folder (/usr/local/apache/htdocs/
+
mkdir /usr/local/apache/sqliteDb/
)
+
chown -R www-data:www-data /usr/local/apache/sqliteDb/
we are in /usr/src/ directory
 
  
 +
Isi database
  
chown -R apache:apache SQLiteManager-*/
+
mv /var/www/SQLiteManager-*/include/config.db /usr/local/apache/sqliteDb/
chmod -R 600 SQLiteManager-*/
+
chmod -R 700 /usr/local/apache/sqliteDb/
  
mkdir /usr/local/apache/sqliteDb/
+
Edit
chown -R apache:apache /usr/local/apache/sqliteDb/
 
  
3 - move config database to another directory
+
vi /var/www/SQLiteManager-*/include/user_defined.inc.php
-Create a new directory, for example:
 
  
 +
Set agar
  
 +
define("SQLiteDb", "/usr/local/apache/sqliteDb/config.db");
 +
define("DEFAULT_DB_PATH", "/usr/local/apache/sqliteDb/config.db");
 +
 +
Buang file
 +
 +
rm INSTALL TODO CHANGES LICENCE test.sqlite
 +
 +
==Membatasi Akses==
 +
 +
Untuk
  
-Move config database :
 
mv /usr/local/apache/htdocs/SQLiteManager-*/include/config.db /usr/local/apache/
 
sqliteDb/
 
 
-Set it writable:
 
chmod -R 700 /usr/local/apache/sqliteDb/
 
 
-Now you must edit the define file with your favorite editor:
 
vi /usr/local/apache/htdocs/SQLiteManager-*/include/user_defined.inc.php
 
set
 
define("SQLiteDb", "/usr/local/apache/sqliteDb/config.db");
 
define("DEFAULT_DB_PATH", "/usr/local/apache/sqliteDb/config.db"
 
);
 
 
- Remove useless files
 
rm INSTALL TODO CHANGES LICENCE test.sqlite
 
 
 
4 - Restricted access
 
4 - Restricted access
 
First you can edit you httpd.conf and add
 
First you can edit you httpd.conf and add

Revision as of 16:41, 12 February 2012

Download dari

Lakukan

mv SQliteManager-1.2.4.tar.gz /var/www
cd /var/www
tar zxvf SQliteManager-1.2.4.tar.gz 
chown -R www-data:www-data SQLiteManager-*/
chmod -R 600 SQLiteManager-*/

Buat database untuk Apache

mkdir /usr/local/apache
mkdir /usr/local/apache/sqliteDb/
chown -R www-data:www-data /usr/local/apache/sqliteDb/

Isi database

mv /var/www/SQLiteManager-*/include/config.db /usr/local/apache/sqliteDb/
chmod -R 700 /usr/local/apache/sqliteDb/

Edit

vi /var/www/SQLiteManager-*/include/user_defined.inc.php

Set agar

define("SQLiteDb", "/usr/local/apache/sqliteDb/config.db");
define("DEFAULT_DB_PATH", "/usr/local/apache/sqliteDb/config.db");

Buang file

rm INSTALL TODO CHANGES LICENCE test.sqlite

Membatasi Akses

Untuk

4 - Restricted access First you can edit you httpd.conf and add <Directory /usr/local/apache/htdocs/SQLiteManager-*/>

       DirectoryIndex index.php
       order deny,allow
       deny from all
       allow from 127.0.0.1 192.168.0.0/24

</Directory> You can authorize only access to computer or/and network

-By default authenticate is disable To set it edit define file: vi /usr/local/apache/htdocs/SQLiteManager-*/include/user_defined.inc.php

set define("WITH_AUTH", true); Now you can login with the default user: login : admin passwd : admin login : data passwd : data login : guest passwd : guest

You can manage all user and groupes where you are logged with 'Admin' ac count

5 - Use SQLiteManager with SQLite database version 3 Your php must load at startup the extension : 'php_pdo' and 'php_pdo_sqlite' fro m PECL open the user configuration file : user_defined.inc.php and set define('SQLITE3', true); Now all the database must be in version 3 The configuration database is in version 3 too




Referensi

Pranala Menarik