Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user@server:~/Downloads/PMG Server Install$ vi PMGServerInstaller.sh
- sudo cp -f ./sources.list /etc/apt/sources.list
- sudo apt-get update
- sudo apt-get -y install mysql-server
- sudo apt-get -y install apache2
- sudo apt-get -y install php5
- sudo apt-get -y install php5-mysql
- sudo apt-get -y install phpmyadmin
- #Restart the MySql service
- /etc/init.d/mysql stop
- /etc/init.d/mysql start
- #Drop the PMG database if exists
- mysqladmin -f drop pmg --user=root --password=pmgadmin
- #Create the database with the name pmg
- mysqladmin create pmg --user=root --password=pmgadmin
- #Fill the database using the PMGDatabase.sql file
- mysql --verbose --user=root --password=pmgadmin pmg < ./PMGDatabase.sql
- #Grand access from remote locations for MySql
- sudo cp -f ./my.cnf /etc/mysql/
- #Restart the MySql Server (Needed to enable remote access)
- sudo /etc/init.d/mysql restart
- #Set the IP address to a static address
- #Copy the interfaces file
- sudo cp -f ./interfaces /etc/network/
- #Copy the resolv.conf file
- sudo cp -f ./resolv.conf /etc/
- #Copy the hosts file
- sudo cp -f ./hosts /etc/
- #Remove the DHCP client if available
- #sudo apt-get -y remove dhcp-client
- #Restart the network interface
- sudo /etc/init.d/networking restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement