Advertisement
Guest User

Untitled

a guest
May 12th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.27 KB | None | 0 0
  1. user@server:~/Downloads/PMG Server Install$ vi PMGServerInstaller.sh
  2. sudo cp -f ./sources.list /etc/apt/sources.list
  3.  
  4. sudo apt-get update
  5.  
  6. sudo apt-get -y install mysql-server
  7. sudo apt-get -y install apache2
  8. sudo apt-get -y install php5
  9. sudo apt-get -y install php5-mysql
  10. sudo apt-get -y install phpmyadmin
  11.  
  12. #Restart the MySql service
  13.  
  14. /etc/init.d/mysql stop
  15. /etc/init.d/mysql start
  16.  
  17. #Drop the PMG database if exists
  18. mysqladmin -f drop pmg --user=root --password=pmgadmin
  19.  
  20. #Create the database with the name pmg
  21. mysqladmin create pmg --user=root --password=pmgadmin
  22.  
  23. #Fill the database using the PMGDatabase.sql file
  24. mysql --verbose --user=root --password=pmgadmin pmg < ./PMGDatabase.sql
  25.  
  26. #Grand access from remote locations for MySql
  27. sudo cp -f ./my.cnf /etc/mysql/
  28.  
  29. #Restart the MySql Server (Needed to enable remote access)
  30. sudo /etc/init.d/mysql restart
  31.  
  32. #Set the IP address to a static address
  33. #Copy the interfaces file
  34. sudo cp -f ./interfaces /etc/network/
  35.  
  36. #Copy the resolv.conf file
  37. sudo cp -f ./resolv.conf /etc/
  38.  
  39. #Copy the hosts file
  40. sudo cp -f ./hosts /etc/
  41.  
  42. #Remove the DHCP client if available
  43. #sudo apt-get -y remove dhcp-client
  44.  
  45. #Restart the network interface
  46. sudo /etc/init.d/networking restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement