Wednesday, January 13, 2010

What Does The Vexilar Do

on dynamic virtual local host [03-03] - Fedora How-to

database activity
E 'necessary at this point to initialize a database
,
associate with the site and create

' s administrator
that. In the case of MySQL, you can find good tutorials
here and here
,
The instructions below are based on commands from the console, useful to understand the basics of management of the MySQL command line, if you want to use a graphical interface, you can use, as mentioned in post 01 of 03, or phpMyAdmin mysql-administrator, with which you can perform all the operations described below (and many more!). Back
management command line
To start the service
in console root: # service mysqld start
To stop

:
# service mysqld stop restart


For while it is running: # service mysqld restart

To test the operation of
MySQL, so as to verify if indeed it was activated and what the process is associated with: # pgrep mysqld
All ' application installation, MySQL automatically creates a administrator named root and a user named mysql, both without password. Although it is not essential for our installation, it should eliminate the possibility of access to the database so
anonymous and insecure.
To do this you must delete the users, except administrator, assign a password to the administrator, create the database that we are concerned (it can manage multiple MySQL database), create our user associated with a password, and allow the user 'access to the specific database. Let's see how. First enter the MySQL server as an administrator: # mysql-u root
The prompt will change to:
mysql>

To delete the users
(to do only the first initialization of the MySQL server, where the only user is the one created by default by the system if the server has already been used and have already created other users, this can damage
access to MySQL, it must be done sensibly):
mysql> mysql DELETE FROM WHERE User ='';
The semicolon at the end of the sentence is important because it is part of the syntax of MySQL and indicates end of command,''content is empty quotes.

update privileges
hours, to allow MySQL to recognize the change that we made: mysql> FLUSH PRIVILEGES;

At this point we set the administrator password
in the example below, the password is he43klc9 and is contained in quotes, replace it with one of your choice: mysql> mysql UPDATE . User Set Password = 'he43klc9' WHERE User = 'root';
So

create the database, called joomladb, and update the server. mysql> CREATE DATABASE joomladb; mysql> FLUSH PRIVILEGES;


To see databases that were created mysql> SHOW DATABASES;
To remove the database created: mysql> DROP DATABASE joomladb;
mysql> FLUSH PRIVILEGES;

then we create our

user (in this example is foo) and its

password (in the asdasd is) and the database created
associamolo
(in this example is joomladb) on the server localhost, and then update MySQL: mysql> GRANT ALL PRIVILEGES ON .* TO joomladb foo @ localhost IDENTIFIED BY 'asdasd' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; If
be created
more than one database and you want to associate the user to all databases created, the command becomes:
mysql> GRANT ALL PRIVILEGES ON *.* TO foo @ localhost IDENTIFIED BY 'asdasd' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES ;
To see users who can log
:

mysql> SELECT Host, User FROM mysql;


To delete a user

mysql> DELETE FROM mysql WHERE Host = 'localhost' AND User = 'foo';

mysql> FLUSH PRIVILEGES
where foo is the user and localhost is your host in the table.

To exit the MySQL type:
mysql> EXIT;

For
fall in MySQL, type: # mysql-u xxxxx-p where xxxxx is your user or administrator. The-p option is used to ensure that the server requests a password that you set before, if you had not set, remove the option (-p) before giving the command.


If
postgreSQL in root console, initializing the database, as described here
and

here will be:
# Service postgresql initdb
Starting the database
# service postgresql start

At this time, the only user recognized (and Loggable) in the database is postgres
. To create databases and more people
Loggable
is essential to log and start a session as postgres user.
# su-l postgres
Once logged in, we create another super user

(note the change of the reference of bash)
-bash-4.0 $ createuser - no-superuser - no-createdb - no-CreateRole - pwprompt username
We will request the '
password setting and its rekeying
for confirmation.
Now let's create a database with the same name
the newly created user. The syntax is: -bash-4.0 $ createdb-E utf8-W-O username username

will be asked to confirm the password you just set.

Now edit the configuration file of the security
PostgreSQL
-bash-4.0 $ nano / var / lib / pgsql / data / pg_hba.conf scroll with the sidebar to the bottom of the file and edit
replacing lines respectively to the local host and IPv4 values \u200b\u200bidentification: local all all trust host all all 127.0.0.1/32 md5 get something like this:





Instead of trust can be put md5 , for added security. Then type ^ O to save the file ^ X to exit nano and return to the shell (^ corresponds to the control key). Obviously, the nano can be used instead of the more complex there (to quit vi use the command: wq) Restart the database by typing

-bash-4.0 $ service postgresql reload
If bash give error
(eg.
because the user does not have sufficient privileges
to perform the requested operation), we open a new tab bash, we enter into with the + console root password and give the same command to reload Other settings can be found in the link shown.
Here you can find another good tutorial.

Now

close the console and launch the GUI pgAdmin III (in Fedora Menu -> Programming). The screen access to the database: insert data on this that we have set:
username
,
database name and password , insert as host 127.0.0.1
and our db is ready.




Use the Joomla!

Open the browser and launch http://127.0.0.1 and immediately check that the site is active, and that all settings are up and running, including the autofill configuration.php file.
If the automatic setting is not accepted (that was marked in red

)

not continue, close the browser, open the shell and, in the console root,
change permissions to the folder where the site a recursive command type # chmod 777-R / media/HD350GB/Serverspace so cut the bull's head. (NB remember to set the correct path of your folder) NB this
NOT 'GOOD
in terms of security, and it can serve only if your local server is not published
, otherwise they are trouble. The transaction is correct

replace the owner of the folder (right now you) with apache . With $ cat / etc / group verify the existence of the user 'apache'. With sudo chown-R apache: apache / media/HD350GB/Serverspace assign user and group apache recursively all the folders in Serverspace. If we want to tweak

directly to these folders (with full knowledge of the case) then the operation is more correct
add our user to the group with apache # gedit / etc / group

adding the user, with separate a point chosen by the other members to the group. Are you afraid to make mistakes typing, this can also be made via the menu Administration -> Users and Groups
will need to restart Apache So and restart the browser, I think the inclusion data, everything should work properly.
Also, if you have applied the procedure both databases, you can choose between MySQL and PostgreSQL, both functioning as RDBMS support. If you choose MySQL, use the option mysql and mysqli
not an option, especially for matters of convenience, in the Advanced Settings and verify that the parameter is set
jos_
.
At this point you should have passed all the obstacles, type in your initial customization (name of your website, email reference, password) and create your Joomla site.
Good site to everyone! :-) PS Thanks to Mirella for their help and patience in reviewing this tutorial.
(\u0026lt;- back to 02 to 03)

How To Get A Gecko To Eat A Pinkie

Site on dynamic virtual local host [02-03 ] - Fedora How-to






Virtual hosts on the local

We come to this point to the creation of virtual hosts

. Apache handles content locally folder / var / www /
, which is not exactly the best placement.
To make sure that Apache can reach, but also manage content
outside of this folder

is necessary to make some changes to the configuration file
.
Those proposals are the minimum necessary for the functioning of all, in addition, the permissions are applied

assume that there are problems of user access , that there is the need for special restrictions for specific users.
If so, the more detailed documentation, which deals with these issues, which were drawn from the information below you will find here (the site of Miranda)
, here (Apache - userdir) and
here (Apache - Public Folders)

.

We identify or create a folder where first of all we are interested to enter the material.
The syntax provides for the obligation of using the name
public_html , which is to provide a path like / ... / Public_html / foldername) but under the aspect of functionality is not strictly necessary. Then you do. Let's try , for example, and download the current stable version 1.5 in Italian: Joomla_1.5.15_ita-Stable.tgz
. in NB I have a 500 GB HD with multiple partitions, one of only 350GB of data formatted in EXT3
, this partition is the ideal for me to park a bit 'of sites for testing and development. So I created within this folder Serverspace
. Since the partition, called HD350GB is mounted in / media directory, the path absolute in this folder will / media/HD350GB/Serverspace . Once downloaded, I unzipped the downloaded file by Joomla! in a folder called joomla15ita
, which I cut and pasted within the folder Serverspace, obtaining the absolute path / media/HD350GB/Serverspace/joomla15ita . So I created, since that was missing (but in this case is not essential), the folder cgi-bin
joomla15ita within the folder. At this point, I typed in console root: # chmod 755-R / media/HD350GB/Serverspace # chmod 701-R /-R media/HD350GB/Serverspace/joomla15ita/cgi-bin
The recursive extended permissions to all folders, and this, that the allocation of permits, is crucial to the success of the initial automatic configuration of Joomla!, especially for the folder and the file Installation configuration.php to content 'inside the site. at this point to be created the alias , ie alternative pointers Apache, so I typed: # gedit / etc / httpd / conf.d / alias
and I put in the file, according to the syntax alias
/ URL-path / directory_del_file /
, the following lines: Alias \u200b\u200b / joomla15ita / media/HD350GB/Serverspace/joomla15ita
§ Directory / Media/HD350GB/Serverspace/joomla15ita §
Options Indexes FollowSymLinks AllowOverride All Order allow, deny Allow from all § / § Directory
The interesting thing is that if I other sites contained in other folders named, for es. sito02, sito03, etc.. and copy these folders within the folder Serverspace, after entering into the cgi-bin if it is missing and assigned permissions as before, I just put in the same file
other groups of commands like: Alias \u200b\u200b/ sito02 / media/HD350GB/Serverspace/sito02 § Directory / media/HD350GB/Serverspace/sito02 § Options Indexes FollowSymLinks
AllowOverride All Order allow, deny Allow from all § / § Directory
etc.. to make sure that Apache will recognize them.





But this step is not enough : You must also intervene in the heart of Apache configuration, ie in the httpd.conf file
# gedit / etc / httpd / conf / httpd.conf First of all we do is that the path / media/HD350GB/Serverspace /, as well as existing, is enabled

; to get it, you must enable, in the range of the line 350, function
UserDir , commenting (ie beginning of the sentence by inserting the hash mark #) the line "UserDir disabled", and uncomment the final line UserDir, affixing
the path of our interest, as shown below as an example:

§ IfModule mod_userdir .
c §
# # UserDir is disabled by default since it can confirm the presence # of a username
on the system (
Depending on home directory # permissions).
#
# UserDir disabled #
# To enable requests to / ~ user / to serve the user's public_html # directory, remove the "UserDir disabled" line above, and uncomment # The following line INSTEAD: # UserDir / media / HD350GB/Serverspace
§ / IfModule §

Come to this point of nell'intorno

line 975 which has the command NameVirtualHost *: 80 and decommentiamolo (ie we remove the hash mark # at the beginning of the sentence).


# NameVirtualHost *: 80 #


nell'intorno of
then go online and insert the 996

virtualhost § # VirtualHost *: 80 # §
ServerAdmin webmaster@dummy-host.example.com # DocumentRoot / www / docs / dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs / dummy-host.example.com -error_log # CustomLog logs / dummy-host.example.com -access_log common #§/VirtualHost§
§VirtualHost *:80§
DocumentRoot /media/HD350GB/Serverspace/joomla15ita
ServerName joomla15ita ScriptAlias /cgi-bin/ "/media/HD350GB/Serverspace/joomla15ita/cgi-bin/" §Directory /media/HD350GB/Serverspace/joomla15ita§ AllowOverride All Options All §/Directory§ §/VirtualHost§

§VirtualHost *:80§
DocumentRoot /media/HD350GB/Serverspace/sito02
ServerName sito02
ScriptAlias /cgi-bin/ "/media/HD350GB/Serverspace/sito02/cgi-bin/"
§Directory /media/HD350GB/Serverspace/sito02§
AllowOverride All Options All

§ / Directory
§ § / § VirtualHost

etc..

I recommend: Let the gates only in the initial sample strings (like the first block above, which will already be set in the script), remembering that a line that starts with a pound sign is interpreted as a simple statement as an instruction rather than irrelevant program.

At this point you quit gedit saving the file httpd amended, and launching the

restart Apache (the restart must be done every time you edit the httpd.conf file), with the following syntax:
# / etc / init.d / httpd restart

then change the hosts file:
# gedit / etc / hosts file inserting in a row for each configured host:
127.0.0.1 127.0.0.1 joomla15ita
sito02

al'uscita and saving. Each host


at this point can be invoked in the browser
with the syntax, eg.
http://joomla15ita


(\u0026lt;- back to all'01 03)



(go to 03 of 03 ->)



Swollen Joints And Hives

Site on dynamic virtual local host [01-03] - Fedora How-to





Last Revised: January 12 2011


A how-to
to run a dynamic site

locally under Fedora? With all the guides that are out there?
Maccome Yes, you say, just take a

open source CMS like Joomla
! , go to Joomla.org or Joomla.it
or
Joomlaitalia.com
, and is everything you want.
Mmmmmhhh, everything? Not really. There is always something that does not work, statement or not suitable, or a small hiccup interpretation, or a setting to review, and I broke the boxes to waste time.
This is a pro-
full memo that allows you to get to run a dynamic site (PHP
,

Perl, Python

) as Joomla, but Drupal
or other, locally on the virtual site to test it offline with all the templates we want, with
RDBMS - Relational database management system - running, passing across a line
problemini
normally meet and that it is very difficult to be taken into consideration all together for each of the individual sources, before the site is able to activate. short, a simple step by step
for noobs like me, like "you know, for example., Joomla? No? So, if you give me 20 minutes to prove you do it on your Linuxbox ..." :-D
NB for everything related to the ' yumex to install, easier to find if you select view groups or, alternatively, type the package installer in console root
provenance (

if you belong to the group sudo sudoers , or by logging in as root up with
(enter) and password (enter)) First step: I assume that we start from scratch , that in Linuxbox there is installed and activated a server LAMP / LAPP , a group of server-side: -

Linux - the operating system; - Apache http server - server Web - MySQL or PostgreSQL RDBMS - relational database management system server side - PHP - scripting language
. Two caveats:
- as is known, the second P can be, instead of PHP, Perl or Python, depending on the selected language.
- the server that you can be can be LAMP LAPP instead, which means that the RDBMS can be chosen (replacing the P M) between MySQL and Postgres . . Both of these are present in the RDBMS repository . The choice should be based on the actual support the hosting provider offers chosen (eg. Linux instead of Win). Create a system that is based on PostgreSQL to find that is not fully supported, unlike MySQL, it might not be nice. The privilege to postgreSQL imo would be given not only because this is RDBMS objectively superior to MySQL, PostgreSQL, but also because, besides being open source also , is still under development, while development of MySQL, after the recent acquisition by Oracle ,

Sun (Java, OpenOffice, Solaris, MySQL) and statements made by its CEO, remains for now, sadly, a great unknown.
Unfortunately for Postgres, its support in Joomla is more complex, so it is advisable for a quick installation using MySQL, however, listed below are the instructions for installation. Because LAMP is essential for our purposes, let's
download and activate it to
.
Linux. If you have not already installed, then go straight on Fedora project and download it. NB it will take a while for you 'more than 20 minutes ... :-DDD



Apache 2 # yum-y install httpd goes anyway checked that the following packages are also installed with the following command: # yum-y install httpd-manual install mod_perl mod_python mod_ssl mod_auth_mysql mod_auth_pgsql awstats distcache crypto-utils To start the server: # / etc / init. d / httpd start For verification, type in the browser http://localhost will see the welcome page of Apache To stop the server: # / etc / init.d / httpd stop To restart the server: # / etc / init.d / httpd restart
For simplicity, instead of
# / etc / init.d / servicename can commandname
be used # service servicename commandname The httpd: # service httpd restart

PHP [NB I do not want to look on the net the way to prevent php code to be written to interfere with native code which is written the blog, resulting in modified if not eliminated. The quickest way for all lines of php code that will follow, was to replace the initial element (\u0026lt;) and end (>) of a script with the element (§).
Obviously, the lines of code from this article copincollate may not work until the restoration of the original elements.]
# Yum install php -y install php

still has to be checked that they are also installed the following packages with the following command: # yum-y install php-mysql php-pgsql tomcat5 phpldapadmin phpmyadmin php-odbc php-ldap php php-pdo-pgsql perl-DBD-MySQL perl-DBI

To test it:

# / etc / init.d / httpd restart
# gedit / var / www / html / testphp.php
included in § this script file? php phpinfo ();? §

Save in the browser and type:
http://localhost/testphp.php


MySQL
# yum-y install mysql
still has to be checked that they are installed also the following packages with the following command:
# yum-y install mysql-server php-mysql MySQL-python libdbi-dbd-mysql mysql-devel mod_auth_mysql perl-DBD-MySQL mysql-gui-common mysql-gui-tools mysql mysql-libs-query-browser
To install the MySQL control center (the F14 release): # yum-y install mysql-workbench

or even, and probably better
# yum install phpMyAdmin

mysql-administrator is a ' graphical interface that is launched from the menu system.
phpMyAdmin, however, is a graphical browser that launches into space by writing the URL:
http://localhost/phpmyadmin/

This will be useful later (post 03 of 03) talking about the management of the database.

PostgreSQL

an alternative to MySQL

can install Postgres. # yum-y install postgresql
still has to be checked that they are also installed the following packages with the following command:
# yum-y install postgresql-jdbc postgresql-contrib postgresql-python libdbi-dbd-pgsql unixODBC perl-DBD- ODBC-Pg postgresql postgresql-test-utils rhdb qt-postgresql postgresql-server


Install pgSQL control center
# yum-y install phpPgAdmin pgAdmin3

(go to 02 of 03 ->)



Thursday, January 7, 2010

Funny Baby Card Message

Bay Magnetic





Sometimes you do not understand if you go forward or back:-D. The Mule is, the Mule is wrong, you have to go to the torrent, sawing the server, the Mule is better with Kad but is slow, the Bay is under attack, the Pirates are on the run .... Then a sudden stops, turns around and says: Stop! Now we have really wrecked ..... the tracker! :-D

Summary: The Pirate Bay, tired of going to court and not as it should monetize its business, shifting gears and

kills the torrent, and that's the beauty of the thing called on other sites tracker to do so as soon as possible.
To what end? Simple. Go once and for all
the magnet link
, that is, a decentralized system

multi-component which does not serve the file. torrent to download a file, but a hash

, that is the code assigned to the file to download.
The system, through the

DHT or Distributed Hash Tables

, allows you to connect to a bootstrap node

and from there to a set of nodes for the identification of
peers who can provide the hash searched. In practice, does the same thing does. Torrent, but without the. Torrent and without server support for tracking, in other words, achieves the same result
without breaking the law (and Is that enough):-P. So when they come to a page where you need a content, and this can be downloaded via magnet links, click on it with confidence, you will not be attached to the mouse or the keyboard.
The only negative is that you can get the browser to tell you that your loved one does not know how to open the link as
Protocol "

magnet" is not associated with any application
.
With Firefox and Opera no problem. First procuriamoci application that can handle such a protocol. I in Fedora, Gnome or KDE that is, use KTorrent

: it is valid, it is simple, it has a intuitive. Of course everyone has their own tastes. In this case, however, KTorrent (currently v. 3.3.1) does not support the protocol "magnet" (indeed, it is better to say that to me does not work, as some argue
going while others do not, and There is a lot of people likely around ...:-D), so I decided to fall back on standard Fedora repository, simple and intuitive, and supports the magnet.


Once installed yumex

, enter the reference in Firefox this:
the address bar type about: config and press enter step 1 right click -> key insert a "new" -> Boolean -> name:
network.protocol-handler.expose.magnet with value -> true dates and enter step 2 add another key Right "new" -> String -> name: network.protocol-handler.app.magnet with value ->
deluge and enter the dates
assigning a key step in the value False, when you click the magnet link Firefox will ask which application you want to associate the protocol. For
Opera the mechanism is:
menu Tools -> Preferences -> Advanced -> Programs

click on "add " and the "Protocol " enter the term in the action while magnet selected " open with another application "and type
/ usr / bin / deluge
(or go there with the" browse )
Good magnet link all :-) PS 05/02/201
0
Update: Mozilla's addons among Magnetiser 0.9 that achieves essentially the same result.