Created
October 8, 2011 20:14
-
-
Save ericodc/1272814 to your computer and use it in GitHub Desktop.
definições para criar um lamp server em ubuntu/debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lamp no ubuntu e debian | |
baseado | |
https://help.ubuntu.com/community/ApacheMySQLPHP | |
pre-requisites: | |
apt-get update | |
apt-get install xclip git-core git-svn subversion nano curl links | |
git config --global user.name "Your Name" | |
git config --global user.email "your.name@youremail.com" | |
git config --global github.user "your github name" | |
git config --global github.token "your github token here" | |
ssh-keygen -t rsa -C "your.name@youremail.com" | |
Copy your new SSH key to the clipboard: | |
cat ~/.ssh/id_rsa.pub | xclip -sel clip | |
lamp stack | |
apache2 php5-mysql libapache2-mod-php5 mysql-server php5-mcrypt mysql-client php5-gd | |
inicia apache | |
sudo /etc/init.d/apache2 restart | |
checa apache | |
http://localhost : if you read "It works!", | |
nano /var/www/test.php | |
// test.php | |
<?php | |
phpinfo(); | |
?> | |
mysql -u root | |
mysql> USE mysql; | |
mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root'; | |
mysql> FLUSH PRIVILEGES; | |
apt-get install phpmyadmin | |
The phpmyadmin configuration file is located at: /etc/phpmyadmin folder. | |
To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf: | |
Include /etc/phpmyadmin/apache.conf | |
/etc/init.d/apache2 restart | |
Instalar RVM | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
$ cd | |
2 | |
$ nano .bashrc | |
Add the following line to the end of the user’s bash profile. | |
1 | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" | |
Load the script into the current shell session by reloading the user’s bash profile. This way, the rvm command will be made available. | |
1 | |
$ source .bashrc | |
You can verify whether the RVM script is working by entering the following command: | |
1 | |
$ type rvm | head -1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment