Tuesday, May 24, 2011

Setting up a LAMP server (on my new XVM)

with help from bbaren

1. Log in:
         $ ssh username@vmname.xvm.mit.edu
2. Can you sudo? Try sudo bash, if you get an "username is not in the sudoers file.  This incident will be reported." error, do
         su -
         gpasswd -a username sudo
         grep sudo /etc/group should show results
         (If you want to give user sudo powers)
3. If everything worked, you should see "It works!" here http://vmname.xvm.mit.edu/
4. The "It works!" page is at /var/www/index.html

Done!

Extra stuff:

Configurations are in /etc/apache2/.
1. cd /etc/apache2/sites-enabled/
2. ls -l
total 0
lrwxrwxrwx 1 root root 26 2011-05-23 20:27 000-default -> ../sites-available/default

The following changes the sites-enabled to sym link to an edited version:
3. cd ../sites-available/
4. sudo cp default default_1
5. cd ../sites-enabled/
6. sudo rm 000-default
7. sudo ln -s ../sites-available/default_1 000-default
8. sudo /etc/init.d/apache2 reload

No comments:

Post a Comment