LEMP
Linux, nginx (Engine x), MySQL, PHP (LEMP) komplekti paigaltamine Ubuntu 12.04 serverisse
näites kasutame klient masinat Ubuntu Desktop 12.04 (64bit) ja serverit Ubuntu-12.04-server-amd64.
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...
Nginx paigaldamine
Paigaldame nginx
apt-get install nginx
Nginx käivitamine, nginx ei käivitu automatselt.
service nginx start
Kontrolimaks, et nginx töötab suuna oma brauser serveri IP-aadressile (192.168.56.210).