Last active
August 29, 2015 14:10
-
-
Save macx/1d38e9283a7bf28c85f3 to your computer and use it in GitHub Desktop.
Set-up Amazon LAMP
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
# Connect to LAMP Server using a id_rsa | |
ssh -i ~/Projects/path-to/id_rsa username@servername | |
sudo bash # Set the correct user rights for this session | |
cd /var/www/ # Change directory to the parent of Doc Root | |
chown -R username html # Assign Doc Root to the user `username` | |
chgrp wheel html # Set Apache Group to the `html` Folder | |
# Apache im Bedarfsfall neu starten | |
sudo service httpd restart | |
# Start MySQL Server | |
/sbin/service mysqld start # Start MySQL Server | |
mysql -u root # Login to Database Server |
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
/* User des Projekts erstellen */ | |
CREATE USER 'myUser'@'localhost' IDENTIFIED BY 'myPassword'; | |
/* Zugriff erteilen und Benutzereinstellungen neu laden */ | |
GRANT ALL PRIVILEGES ON * . * TO 'myUser'@'localhost'; | |
FLUSH PRIVILEGES; | |
/* Datenbank anlegen */ | |
CREATE DATABASE tablename; | |
USE tablename; | |
/* Tabellen anlegen */ | |
CREATE TABLE `foobar` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`text` text NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
/* Kontrolle */ | |
DESCRIBE advent_profiles; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment