Setup LAMP server
Last active
March 27, 2021 19:38
-
-
Save alexei/7d600c366960af152885 to your computer and use it in GitHub Desktop.
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
| sudo apt-get update | |
| sudo apt-get upgrade |
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
| sudo apt-get autoclean | |
| sudo apt-get clean | |
| sudo apt-get autoremove |
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
| sudo apt-get install htop | |
| sudo apt-get install git |
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
| sudo apt-get install apache2 |
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
| sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql | |
| sudo mysql_install_db | |
| sudo /usr/bin/mysql_secure_installation |
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
| sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt | |
| sudo vim /etc/apache2/mods-enabled/dir.conf | |
| # DirectoryIndex to index.php | |
| sudo vim /etc/apache2/apache2.conf | |
| # ServerSignature Off | |
| # ServerTokens Prod |
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
| sudo adduser --system --shell /bin/bash USER | |
| sudo groupadd GROUP | |
| sudo usermod -g GROUP USER | |
| sudo passwd USER |
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
| CREATE USER '%USERNAME%'@'localhost' IDENTIFIED BY '%PASSWORD%'; | |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, EVENT, TRIGGER, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON *.* TO '%USERNAME%'@'localhost' IDENTIFIED BY '%PASSWORD%' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0; | |
| CREATE DATABASE IF NOT EXISTS `%DATABASE%`; | |
| GRANT ALL PRIVILEGES ON `%DATABASE%`.* TO '%USERNAME%'@'localhost'; | |
| GRANT ALL PRIVILEGES ON `%DATABASE%\_localhost`.* TO '%USERNAME%'@'localhost'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment