Na serveru mi je Ubuntu 12.04 32 bit, a napravio sam do sad sljedeće:
SSH na server....
- Kod: Označi sve
passwd
- Kod: Označi sve
adduser korisnik
- Kod: Označi sve
visudo
# User privilege specification
root ALL=(ALL:ALL) ALL
korisnik ALL=(ALL:ALL) ALL
Spremio
Potom:
- Kod: Označi sve
nano /etc/ssh/sshd_config
- Kod: Označi sve
Port 25000
(prije yes)PermitRootLogin no
na dno sshd_config sam dodao
- Kod: Označi sve
UseDNS no
AllowUsers korisnik
- Kod: Označi sve
reload ssh
Prijava i sve radi ok. Sada prilikom prijave koristim port i novo korisničko ime koje sam napravio.
LAMP stack
Apache instalacija:
- Kod: Označi sve
sudo apt-get update
sudo apt-get install apache2
Dobijem It works! poruku tako da Apache radi.
MySQL instalacija:
- Kod: Označi sve
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
Namjestio MySQL lozinku
- Kod: Označi sve
sudo mysql_install_db
- Kod: Označi sve
sudo /usr/bin/mysql_secure_installation
- Kod: Označi sve
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...
PHP instalacija:
- Kod: Označi sve
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
- Kod: Označi sve
sudo nano /etc/apache2/mods-enabled/dir.conf
- Kod: Označi sve
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
index.php sam stavio da mi prvo njega baci.
Sad me zanima da li mi je potreban još neki PHP modul, a dobijem ih cijelu hrpu kad pokrenem:
- Kod: Označi sve
apt-cache search php5-
Napravio sam info.php i pojavi mi se test stranica ok.