ubuntu command line for apache

Update your system:
sudo apt-get update && sudo apt-get upgrade =-=-=-=-=-=-=-=-=-=-=-
remove LAMP
sudo apt-get purge mysql-server apache2 php5 ==-=-=-=-=-=-=-=-=-=-=-
fully manage your lamp Server database, install phpmyadmin
sudo  apt-get  install  phpmyadmin =-=-=-=-=-=-=-=-=-=-=-=
Install Apache
sudo apt-get install apache2 apache2-doc apache2-utils =-=-=-=-=-=-=-=-=-=-=-=-=-
Edit the main Apache configuration file and turn off the KeepAlive setting:
/etc/apache2/apache2.conf KeepAlive Off =-=-=-=-=-=-=-=-=-=-=-=-=-=-
useradd
useradd -c “Damon Luong” damon =-=-=-=-=-=-=-=-=-=-=-=-=-=
usermod
usermod -c “damon” damon =-=-=-=-=-=-=-=-=-=-=-=-=-
add user to the www-data group
sudo useradd -g www-data damon =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
add a new user called vivek to supplementary groups called www-data and ftp,
sudo groupadd roy
sudo useradd -g roy -G www-data,ftp roy =-=-=-=-=-=-=-=-
Add a existing user to www-data group
sudo usermod -a -G www-data  linda
id linda
groups linda =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Add myself to the www-data:
sudo usermod -a -G www-data [myusername]
…….
Then, recursively grant group write permissions to the /var/www/html directory:
sudo chmod -R g+w /var/www/html

About Damon Luong

San Jose, California
This entry was posted in ubuntu. Bookmark the permalink.