Pessoal , preciso instalar e configurar um servidor web. Como faço isso? Pretendo usar o apache. E como posso acessar via : cliente- servidor?
tenho um servidor online instalado assim: -
(no terminal como root para aceder = Ctrl+Alt+T) depois coloque: -
sudo apt-get install apache2The above command will install some default modules, packages and libraries but you later install the ones you need. When installation is completed, type the address
http://localhost in the browser address bar and you will get a default apache page like this -
step 2. Installing MySQL
Execute the command -
sudo apt-get install mysql-serverand enter the root password during installation procedure. I’ve already covered a post in detail about how to install MySQL on Ubuntu.
step 3. Installing PHP
Execute the command -
sudo apt-get install php5 libapache2-mod-php5 php5-mysqlThen restart the Apache server to load php modules -
sudo /etc/init.d/apache2 restartTo test whether the PHP 5 has been successfully installed or not, create a file phpinfo.php and copy the following content (to the file) -
Crie um ficheiro na pasta:
sudo gedit /var/www/phpinfo.php
depois cole isto no documento e guarde:
<?php
print_r (phpinfo());
?>and put the file in root web directory (/var/www). Then open the address
http://localhost/phpinfo.php, then it should display the php configuration details like this -
sudo apt-get install phpmyadminWhen the installation is complete, move on to
http://localhost/phpmyadmin and login (using the MySQL login username(default is ‘root’) and the password (you entered during installation)) to start using it.
Want to learn web server administration (with LAMP) on Ubuntu Server ?
Having apache, MySQL, PHP installed locally on your system is good for learning about the server administration and other cool/great stuffs related to Linux but VPS is very cheap these days so you may want to try Ubuntu (with Apache or other web server) on a VPS for much better (and real) experience – I’ve been using Linode VPS @ $19.95/month (512 MB RAM, 20 GB space and 200GB bandwidth) for a while, and I am loving it.
Re: Can't open phpMyAdminHave you also installed the PHP support?
Code:
sudo apt-get install libapache2-mod-php php5-mysqlAlso, by default the phpmyadmin script is installed in /usr/share/phpmyadmin, a directory
that isn't access from Apache.
You'll want to do the following to get
http://localhost/phpmyadmin to work
Code:
cd /var/wwwsudo ln -s /usr/share/phpmyadmin phpmyadminDepois é necessário dar permissões no seu modem, normalmente permitindo a entrada e saída na porta 80, utilizada por defeito pelo apache e dando permissão de acesso para o IP da sua máquina.
Se fizer isto direito funciona que nem maravilha, pode enviar e receber ficheiros no seu servidor e tudo mais: tem de colocar os documentos na pasta /var/www nas tem de dar permissões de acesso para trabalhar com ela assim:
sudo chmod 777 /var/www -RBoa sorte e não desista linux é o melhor