Anda di halaman 1dari 2

Instalacao Lamp (linux, apache, mysql, php)

ubuntu@ubuntu-W55xEU:~$ lsb_release -a
No LSB modules are available.
Distributor ID:
Ubuntu
Description: Ubuntu 14.04.1 LTS
Release:
14.04
Codename: trusty
ubuntu@ubuntu-W55xEU:~$ sudo apt-get update
ubuntu@ubuntu-W55xEU:~$ sudo apt-get upgrade
****instalacao apache2 2.4.10*****
ubuntu@ubuntu-W55xEU:~$ sudo apt-get install apache2 apache2-utils
ubuntu@ubuntu-W55xEU:~$ apache2 -v
Server version: Apache/2.4.10 (Ubuntu)
Server built: Jul 22 2014 22:49:37
ubuntu@ubuntu-W55xEU:~$ dpkg -l | grep apache2
ii apache2
2.4.10-1+deb.sury.org~trusty+1
ii apache2-bin
2.4.10-1+deb.sury.org~trusty+1
ii apache2-data
2.4.10-1+deb.sury.org~trusty+1
ii apache2-utils
2.4.10-1+deb.sury.org~trusty+1
rc apache2.2-common
2.2.22-6ubuntu5.1

amd64
Apache HTTP Server
amd64
Apache HTTP Server (binary files and modules)
all
Apache HTTP Server (common files)
amd64
Apache HTTP Server (utility programs for web servers)
amd64
Apache HTTP Server common files

ubuntu@ubuntu-W55xEU:~$ sudo vi /etc/apache2/mods-available/dir.conf


ubuntu@ubuntu-W55xEU:~$ cat /etc/apache2/mods-available/dir.conf
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ubuntu@ubuntu-W55xEU:~$ sudo service apache2 restart
* Restarting web server apache2
AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ ls
000-default.conf default-ssl.conf revilsoft.loc

[ OK ]

ubuntu@ubuntu-W55xEU:~$ cat /etc/apache2/sites-available/revilsoft.loc.conf


<VirtualHost *:80>
ServerAdmin revilsoft@localhost
ServerName revilsoft.loc
ServerAlias www.revilsoft.loc
DocumentRoot /var/www/revilsoft/
<Directory /var/www/revilsoft/>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ sudo a2dissite 000-default.conf && sudo a2ensite revilsoft.loc
Site 000-default disabled.
To activate the new configuration, you need to run:
service apache2 reload
ERROR: Site revilsoft.loc does not exist!
ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ sudo service apache2 reload
* Reloading web server apache2

ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ sudo a2ensite revilsoft.loc


ERROR: Site revilsoft.loc does not exist!
ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ sudo mv revilsoft.loc revilsoft.loc.conf
ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ ls
000-default.conf default-ssl.conf revilsoft.loc.conf
ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ sudo a2ensite revilsoft.loc
Enabling site revilsoft.loc. conf
To activate the new configuration, you need to run:
service apache2 reload
ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ sudo service apache2 restart
* Reloading web server apache2
* The apache2 configtest failed. Not doing anything.
Output of config test was:
AH00526: Syntax error on line 7 of /etc/apache2/sites-enabled/revilsoft.loc.conf:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.

The Apache error log may have more information.


ubuntu@ubuntu-W55xEU:/etc/apache2/sites-available$ sudo a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
**** instalacao Mysql 5.5*****
ubuntu@ubuntu-W55xEU:~$ sudo apt-get install mysql-server libapache2-mod-auth-mysql
ubuntu@ubuntu-W55xEU:~$ mysql -V
mysql Ver 14.14 Distrib 5.5.38, for debian-linux-gnu (x86_64) using readline 6.3
ubuntu@ubuntu-W55xEU:~$ sudo mysql_secure_installation

***instalacao phpmayadmin****
ubuntu@ubuntu-W55xEU:~$ sudo install php5-mysql
ubuntu@ubuntu-W55xEU:~$ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

ubuntu@ubuntu-W55xEU:~$ sudo apt-get remove purge apache2 php5 mysql-server-5.0 phpmyadmin

Anda mungkin juga menyukai