LEMP: Difference between revisions

From ICO wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 33: Line 33:
<pre>apt-get install mysql-server php5-mysql</pre>
<pre>apt-get install mysql-server php5-mysql</pre>


MySQL root kasutaja parooli märamine. antud näites: password
MySQL root kasutaja parooli märamine. Antud näites: password
 


MySQLi aktiverimine
MySQLi aktiverimine
<pre>mysql_install_db</pre>
<pre>mysql_install_db</pre>
lõpetuseks joksuta skript
<pre>/usr/bin/mysql_secure_installation</pre>
Küsitakse root kasutaja parooli, sissestage see.
Küsitakse kas soovite vahetada root kasutaja parooli, vastake N
Järgmistele küsimustele vastake Y. Pärast seda MySQL taaskäivitub ja rakendab muudatused.
<pre>
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y                                           
... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
</pre>

Revision as of 16:57, 24 May 2014

Linux, nginx (Engine x), MySQL, PHP (LEMP) komplekti paigaltamine Ubuntu 12.04 serverisse

näites kasutatud server

RAM 512MB

HDD dynamicly allocated 8GB

2 Võrgukaarti

NIC1 - NAT (eth0 - Ubuntus)
NIC2 - HostOnly (eth1 – Ubuntus) [192.168.56.210]

OS Ubuntu-12.04-server-amd64


esimene samm

Selleks, et minna juurkasutajaks üle, kasuta käsklust.

sudo -i

Uuentame kohalikud tarkvara repositooriumid.

apt-get update


teine samm paigalda MySQL

MySQLi tarkvara paigaldamiseks kasuta Ubuntu serveri all käsklust

apt-get install mysql-server php5-mysql

MySQL root kasutaja parooli märamine. Antud näites: password


MySQLi aktiverimine

mysql_install_db

lõpetuseks joksuta skript

/usr/bin/mysql_secure_installation

Küsitakse root kasutaja parooli, sissestage see.

Küsitakse kas soovite vahetada root kasutaja parooli, vastake N

Järgmistele küsimustele vastake Y. Pärast seda MySQL taaskäivitub ja rakendab muudatused.

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y                                            
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...